123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- using ProjectBase.Data.BaseDAL;
- using ProjectBase.Data.Encrypt;
- using ProjectBase.Data.Logs;
- using SIASUN.Autopilot.DAL.IDALSQL;
- using SIASUN.Autopilot.Model;
- using System;
- namespace SIASUN.Autopilot.BLL
- {
- public class BlAuthoryUser : BaseBLL<MoAuthoryUser>
- {
- private IDalAuthoryUser dalAuthoryUser;
- /// <summary>
- /// 构造函数
- /// </summary>
- public BlAuthoryUser() : base()
- {
- base.Init(this.GetType().FullName, System.Reflection.Assembly.GetExecutingAssembly().GetName().Name);
- dalAuthoryUser = base.baseDal as IDalAuthoryUser;
- dalAuthoryUser.OnOperationLog += new OperationLogEventHandler(BlLogOperation.OnOperationLog);
- }
-
- /// <summary>
- /// 登录账户和密码验证
- /// </summary>
- /// <param name="userAccount">账户</param>
- /// <param name="userPasswd">密码</param>
- /// <param name="message">反馈信息</param>
- /// <returns></returns>
- //public bool VerifyLogin(string userAccount, string userPasswd, out string message)
- //{
- // try
- // {
- // message = "";
- // MoAuthoryUser user = FindByID(userAccount);
- // if (user == null)
- // {
- // message = "不存在账号!";
- // return false;
- // }
- // //string encrptPasswd = EncodeHelper.MD5Encrypt(userPasswd);
- // //如果该用户的密码是初始密码,让用户修改密码
- // if (user.LoginPasswd.Equals(EncodeHelper.EncryptString("000000")))
- // {
- // message = "您的密码为初始密码,请点击开始菜单修改密码!";
- // return false;
- // }
- // if (userPasswd.Equals(user.LoginPasswd))
- // {
- // SysEnvironment.CurrentLoginName = user.UserName;
- // SysEnvironment.CurrentLoginGroupId = user.GroupId;
- // //bool flag = BLLFactory<BlackWhite>.Instance.VerifyBlackWhite(user.LoginAccount,SysEnvironment.Ip,out message);
- // //if (!flag)
- // //{
- // // return false;
- // //}
- // ////登录成功后记录到用户登录日志中
- // //MoLogLogIn moLogIn = new MoLogLogIn
- // //{
- // // Account = user.LoginAccount,
- // // Name = user.UserName,
- // // GroupId = user.GroupId,
- // // Description = "用户登录",
- // // Ip = SysEnvironment.Ip,
- // // Mac = SysEnvironment.Mac,
- // // Time = DateTime.Now
- // //};
- // //if (BLLFactory<BlLogLogIn>.Instance.Insert(moLogIn))
- // //{
- // // return true;
- // //}
- // //else
- // //{
- // // message = "记录用户登录日志失败";
- // // return false;
- // //}
- // }
- // else
- // {
- // message = "密码错误!";
- // return false;
- // }
- // }
- // catch (Exception ex)
- // {
- // LogHelper.log.Error(string.Format("修改数据库plc_info出现错误:{0}", ex));
- // message = ex.ToString();
- // return false;
- // }
- //}
- }
- }
|