예제 #1
0
        public void UpdateUserLogin(UserHistory userHistory)
        {
            using (var uow = new UnitOfWork())
            {
                if (userHistory != null)
                {
                    var userLogin = uow.GetRepository<UserLogin>().Items.FirstOrDefault(x => x.Id == userHistory.UserloginId);
                    userLogin.PasswordCap = userHistory.PasswordCap;
                    userLogin.Captcha = userHistory.Captcha;
                    uow.GetRepository<UserLogin>().Update(userLogin);
                    uow.SaveChanges();
                }
            }

        }
예제 #2
0
        public UserHistory AddUserHistory(UserHistory userHistory)
        {
            using (var uow = new UnitOfWork())
            {
                var userHstryFmDb = uow.GetRepository<UserHistory>().Items.FirstOrDefault(x => x.Captcha == userHistory.Captcha && x.IpAddress == userHistory.IpAddress);

                if (userHstryFmDb == null)
                {
                    var userHstry = new UserHistory()
                    {
                        IpAddress = userHistory.IpAddress,
                        CreatedDate = DateTime.Now,
                        Captcha = userHistory.Captcha,
                        saltkey = userHistory.saltkey,
                        UserloginId = userHistory.UserloginId,
                        PasswordCap = userHistory.PasswordCap
                    };
                    uow.GetRepository<UserHistory>().Insert(userHstry);
                    uow.SaveChanges();
                    UpdateUserLogin(userHstry);
                }
                return userHistory;
            }

        }
예제 #3
0
 public void UpdateUserLogin(UserHistory userHistory)
 {
     _userRepository.UpdateUserLogin(userHistory);
 }
예제 #4
0
 public UserHistory AddUserHistory(UserHistory userHistory)
 {
     var userHistry = _userRepository.AddUserHistory(userHistory);
     return userHistry;
 }
예제 #5
0
 public UserHistory AddUserHistory(UserHistory userHistory)
 {
     var userHstry = _userBl.AddUserHistory(userHistory);
     return userHstry;
 }
예제 #6
0
 public void UpdateUserLogin(UserHistory userHistory)
 {
     _userBl.UpdateUserLogin(userHistory);
 }