Example #1
0
 public JsonResult Save([Bind(Include = "Id, UserTypeId, EmployeeId, RoleId, Username, Password, PasswordAgeLimit, IsPasswordChanged, IsLocked, WrongPasswordTryLimit, IsSuperAdmin, IsActive")] UserInformationModel userInformation, bool isInsert)
 {
     if (isInsert)
     {
         userInformation.SetCreateProperties(LoginInformation.UserInformation.Id);
         userInformation.Id = _userInformationService.Insert(userInformation);
     }
     else
     {
         userInformation.SetUpdateProperties(LoginInformation.UserInformation.Id);
         _userInformationService.Update(userInformation);
     }
     return(new JsonResult {
         Data = _userInformationService.GetById(userInformation.Id)
     });
 }