Example #1
0
 public FrmAddEmployee(AdminMsg LoginUser)
 {
     be        = new BEmployee(LoginUser.SqlConn);
     SystemMsg = LoginUser;
     InitializeComponent();
     BOperation = new BOperationRecord(LoginUser.SqlConn);
     log        = new Log(PublicValues.LogFilePath);
 }
Example #2
0
 public FrmChangePass(AdminMsg LoginMsg)
 {
     InitializeComponent();
     LoginInMsg = LoginMsg;
     bu         = new B_User(LoginInMsg.SqlConn);
     BOperation = new BOperationRecord(LoginInMsg.SqlConn);
     log        = new Log(PublicValues.LogFilePath);
 }
Example #3
0
 public FrmAllot(AdminMsg LoginUser)
 {
     InitializeComponent();
     be       = new BEmployee(LoginUser.SqlConn);
     LoginMsg = LoginUser;
     InitializeComponent();
     BOperation   = new BOperationRecord(LoginUser.SqlConn);
     BAllotHandle = new BAllotHandle(LoginUser);
     log          = new Log(PublicValues.LogFilePath);
 }
Example #4
0
        /// <summary>
        /// 获取AdminMsg对象信息信息
        /// </summary>
        /// <param name="code"></param>
        /// <param name="Pass"></param>
        /// <returns></returns>
        public Models.AdminMsg GetAdminMsg(string code, string Pass)
        {
            string IP = GetLocalIP();

            Models.User user = this.GetUserInfo(code, Pass);
            AdminMsg    msg  = new AdminMsg();

            msg.AdminGuid      = user.UserGuid;
            msg.AdminLoginCode = user.UserCode;
            msg.AdminNickName  = user.UserNickName;
            msg.AdminSex       = user.UserSex;
            msg.Token          = GetLoginToken(user.UserGuid, IP);
            msg.LoginTime      = DateTime.Now;
            msg.LoginIP        = IP;
            //用户行为记录
            BOperation = new BOperationRecord(SqlConn);
            BOperation.RecordHandle(user.UserGuid, BOperationRecord.Level.Daily, string.Format("登入系统,IP:{0}", IP));
            return(msg);
        }