You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
81 lines
2.1 KiB
81 lines
2.1 KiB
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
|
|
{
|
|
/// <summary>
|
|
/// 登录管理
|
|
/// 创建者:李炳海
|
|
/// 创建日期:2013.1.30
|
|
/// </summary>
|
|
public class LoginBLL:BaseBLL
|
|
{
|
|
#region 检验登录信息
|
|
|
|
/// <summary>
|
|
/// 检验登录信息
|
|
/// </summary>
|
|
/// <param name="login">登录信息</param>
|
|
/// <returns>登录信息,Message为null时登录成功。</returns>
|
|
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 获取嵌入式客户端菜单
|
|
/// <summary>
|
|
/// 获取嵌入式客户端菜单
|
|
/// </summary>
|
|
/// <param name="systemID">系统标识</param>
|
|
/// <param name="userID">用户主键</param>
|
|
/// <returns>客户端菜单</returns>
|
|
public DataTable GetEmbeddedMenus(string systemID, string userID)
|
|
{
|
|
try
|
|
{
|
|
return new LoginDAL().GetEmbeddedMenus(systemID, userID);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
public List<string> GetPower(LoginInfo login)
|
|
{
|
|
LoginDAL dal = new LoginDAL();
|
|
return dal.GetPower(login);
|
|
}
|
|
}
|
|
}
|
|
|