Beispiel #1
0
 private void UpdateDBUserInfo(ref tbl_LMSUser existingDBUser, ref UserEntity userEntity)
 {
     existingDBUser.Name               = userEntity.Name;
     existingDBUser.Password           = userEntity.Password;
     existingDBUser.MobileNo           = userEntity.MobileNo;
     existingDBUser.EmailId            = userEntity.EmailId;
     existingDBUser.Role               = userEntity.Role;
     existingDBUser.IsActive           = userEntity.IsActive;
     existingDBUser.IsLocked           = userEntity.IsLocked;
     existingDBUser.SecurityQuestionId = userEntity.SecurityQuestionId;
     existingDBUser.Answer             = userEntity.Answer;
     existingDBUser.CreatedDate        = DateTime.Now;
     existingDBUser.CreatedBy          = "1";
 }
Beispiel #2
0
 public void Insert(UserEntity userEntity)
 {
     using (var dbContext = new LoanManagementSystemEntities())
     {
         tbl_LMSUser dbUser = new tbl_LMSUser();
         dbUser.Name               = userEntity.Name;
         dbUser.Password           = userEntity.Password;
         dbUser.MobileNo           = userEntity.MobileNo;
         dbUser.EmailId            = userEntity.EmailId;
         dbUser.Role               = userEntity.Role;
         dbUser.IsActive           = userEntity.IsActive;
         dbUser.IsLocked           = userEntity.IsLocked;
         dbUser.SecurityQuestionId = userEntity.SecurityQuestionId;
         dbUser.Answer             = userEntity.Answer;
         dbContext.tbl_LMSUser.Add(dbUser);
         dbContext.SaveChanges();
     }
 }