using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using QMFrameWork.Common.Encrypt;
using QMAPP.Entity.Sys;
using QMAPP.DAL.Sys;
namespace QMAPP.BLL.Sys
{
///
/// 登录管理
/// 创建者:李炳海
/// 创建日期:2013.1.30
///
public class LoginBLL:BaseBLL
{
#region 检验登录信息
///
/// 检验登录信息
///
/// 登录信息
/// 登录信息,Message为null时登录成功。
public LoginInfo IsLogin(LoginInfo login)
{
try
{
login.PassWord = QMFrameWork.Common.Encrypt.DESEncrypt.Encrypt(login.PassWord);
login= new LoginDAL().IsLogin(login);
if (login == null)
return null;
if (login.UserType.ToUpper() == "MS")
{
login.IsAdmin = "True";
}
else
{
login.IsAdmin = "False";
}
return login;
}
catch (Exception ex)
{
throw;
}
}
#endregion
#region 获取嵌入式客户端菜单
///
/// 获取嵌入式客户端菜单
///
/// 系统标识
/// 用户主键
/// 客户端菜单
public DataTable GetEmbeddedMenus(string systemID, string userID)
{
try
{
return new LoginDAL().GetEmbeddedMenus(systemID, userID);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
public List GetPower(LoginInfo login)
{
LoginDAL dal = new LoginDAL();
return dal.GetPower(login);
}
}
}