public FrmAddEmployee(AdminMsg LoginUser) { be = new BEmployee(LoginUser.SqlConn); SystemMsg = LoginUser; InitializeComponent(); BOperation = new BOperationRecord(LoginUser.SqlConn); log = new Log(PublicValues.LogFilePath); }
public FrmChangePass(AdminMsg LoginMsg) { InitializeComponent(); LoginInMsg = LoginMsg; bu = new B_User(LoginInMsg.SqlConn); BOperation = new BOperationRecord(LoginInMsg.SqlConn); log = new Log(PublicValues.LogFilePath); }
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); }
/// <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); }