public IActionResult SaveItem(string Id = null) { USUsersModel data = new USUsersModel(); string ControllerName = this.ControllerContext.RouteData.Values["controller"].ToString(); int IdDC = Int32.Parse(MyModels.Decode(Id, API.Models.Settings.SecretId + ControllerName).ToString()); data.SearchData = new SearchUSUsers() { CurrentPage = 0, ItemsPerPage = 10, Keyword = "" }; data.ListItemsGroups = USGroupsService.GetListSelectItems(); data.ListItemsStatus = USUsersService.GetStatusSelectItems(); data.ListDMCoQuan = DMCoQuanService.GetListByLoaiCoQuan(0, 1); data.ListDMChucVu = DMChucVuService.GetListSelectItems(); if (IdDC == 0) { data.Item = new USUsers(); } else { data.Item = USUsersService.GetItem(IdDC, API.Models.Settings.SecretId + ControllerName); } return(View(data)); }
public IActionResult Info() { USUsersModel data = new USUsersModel(); string ControllerName = this.ControllerContext.RouteData.Values["controller"].ToString(); int IdDC = int.Parse(HttpContext.Request.Headers["Id"]); data.SearchData = new SearchUSUsers() { CurrentPage = 0, ItemsPerPage = 10, Keyword = "" }; data.ListItemsGroups = USGroupsService.GetListSelectItems(); data.ListItemsStatus = USUsersService.GetStatusSelectItems(); data.ListDMChucVu = DMChucVuService.GetListSelectItems(); if (IdDC == 0) { data.Item = new USUsers(); } else { data.Item = USUsersService.GetItem(IdDC, API.Models.Settings.SecretId + ControllerName); } return(View(data)); }