public IActionResult ListCallCenterUser() { var list = _authService.GetAllCallCenterUser(); List <CallCenterUserModel> modelList = new List <CallCenterUserModel>(); foreach (var item in list) { CallCenterUserModel model = new CallCenterUserModel() { Id = item.Id, CreatedDate = item.CreatedDate, FullName = item.FullName, IsActive = item.IsActive }; modelList.Add(model); } return(View(modelList)); }
public IActionResult CreateCallCenterUser(CallCenterUserModel model) { if (model.FullName == null || model.Password == null) { return(View()); } User user = new User() { IsActive = model.IsActive, FullName = model.FullName, Password = _authService.PasswordHasher(model.Password), CreatedDate = DateTime.Now, RoleId = 4, CreatedBy = 2 }; _authService.CreateCallCenter(user); return(RedirectToAction("ListCallCenterUser", "CallCenter")); }