Example #1
0
        public static bool ModifyPwd(Sys_Userlogon model)
        {
            model.SULChangePwdTime = DateTime.Now;
            var updateColumns = new List <Sys_UserlogonFields>()
            {
                Sys_UserlogonFields.SULPassword, Sys_UserlogonFields.SULChangePwdTime
            };

            return(UserLogOnAccess.Update(model, updateColumns) > 0 ? true : false);
        }
Example #2
0
        public static int UpdateInfo(Sys_Userlogon model)
        {
            var updateColumns = new List <Sys_UserlogonFields>()
            {
                Sys_UserlogonFields.SULAllowMultiUserOnline, Sys_UserlogonFields.SULQuestion
                , Sys_UserlogonFields.SULAnswerQuestion, Sys_UserlogonFields.SULCheckIPAddress
                , Sys_UserlogonFields.SULLanguage, Sys_UserlogonFields.SULTheme
            };

            return(UserLogOnAccess.Update(model, updateColumns));
        }
Example #3
0
 public static new int Insert(Sys_Userlogon model)
 {
     model.SULLastVisitTime  = DateTime.Now;
     model.SULSecretKey      = string.Empty;
     model.SULPassword       = model.SULPassword.DESEncrypt(model.SULSecretKey).MD5Encrypt();
     model.SULAnswerQuestion = string.Empty;
     model.SULQuestion       = string.Empty;
     model.SULLoginCount     = 0;
     model.SULIsOnLine       = 0;
     return(UserLogOnAccess.Insert(model));
 }
Example #4
0
        public static int UpdateLogin(Sys_Userlogon model)
        {
            model.SULIsOnLine      = 1;
            model.SULPrevVisitTime = model.SULLastVisitTime;
            model.SULLastVisitTime = DateTime.Now;
            model.SULLoginCount   += 1;
            var updateColumns = new List <Sys_UserlogonFields>()
            {
                Sys_UserlogonFields.SULIsOnLine, Sys_UserlogonFields.SULPrevVisitTime
                , Sys_UserlogonFields.SULLastVisitTime, Sys_UserlogonFields.SULLoginCount
            };

            return(UserLogOnAccess.Update(model, updateColumns));
        }
Example #5
0
 public static int Delete(params string[] userIds)
 {
     return(UserLogOnAccess.Delete(userIds));
 }
Example #6
0
 public static Sys_Userlogon GetByAccount(int userId)
 {
     return(UserLogOnAccess.GetByAccount(userId));
 }