Esempio n. 1
0
        public int addUserAllAccessPass(DLModel.UserAllAccessPass userAllAccessPass)
        {
            var _res = _userRepository.GetById(userAllAccessPass.UserID);

            userAllAccessPass.UserSubscriptionID = _userSubscriptionRepository.GetAll(rk => rk.OrganizationID == _res.OrganizationID).SingleOrDefault().UserSubscriptionID;
            int UserAllAccessPassID = _userAllAccessPassRepository.Add(userAllAccessPass).UserAllAccessPassID;

            // update the UserAllAccessPassID in user table against UserID
            DLModel.User _user = new DLModel.User();
            _user = _userRepository.GetById(userAllAccessPass.UserID);
            _user.IsAllAccessPricing  = true;
            _user.UserAllAccessPassID = UserAllAccessPassID;
            _userRepository.Update(_user);
            return(UserAllAccessPassID);
        }
Esempio n. 2
0
        public void UpdateUserPassword(int uid, string pwd)
        {
            DLModel.User s = new DLModel.User
            {
                UID                = uid,
                FirstName          = "",
                LastName           = "",
                Password           = pwd,
                EmailID            = "",
                Company            = "",
                Phone              = "",
                ProfessionalTitle  = "",
                IsActive           = true,
                IsLocked           = false,
                FailedAttemptCount = 0,
                LastLoginDate      = System.DateTime.Now.Date.AddDays(1)
            };

            _userRepository.Update((DLModel.User) new DLModel.User().InjectFrom(s), hp => hp.Password, hp => hp.IsLocked, hp => hp.FailedAttemptCount);
        }
Esempio n. 3
0
 public int ClearedUserDetail(int UserID, bool?_isCleared)
 {
     DLModel.User _user = new DLModel.User
     {
         FirstName          = "",
         LastName           = "",
         Password           = "",
         EmailID            = "",
         Company            = "",
         Phone              = "",
         ProfessionalTitle  = "",
         IsActive           = true,
         IsLocked           = false,
         FailedAttemptCount = 0,
         LastLoginDate      = System.DateTime.Now.Date.AddDays(1),
         UID       = UserID,
         IsCleared = _isCleared,
         ClearedBy = UserID,
     };
     return(_userRepository.Update((DLModel.User) new DLModel.User().InjectFrom(_user), hp => hp.IsCleared));
 }