public ActionResult PrintDismissalList(string beginDate, string endDate, int? departmentId, int? requestStatusId, int? typeId, string userName, int? sortBy, bool? sortDescending) { DismissalListModel model = new DismissalListModel { BeginDate = parseDateTime(beginDate), EndDate = parseDateTime(endDate), DepartmentId = departmentId.HasValue ? departmentId.Value : 0, StatusId = requestStatusId.HasValue ? requestStatusId.Value : 0, TypeId = typeId.HasValue ? typeId.Value : 0, UserName = string.IsNullOrEmpty(userName) ? string.Empty : Server.UrlDecode(userName), SortBy = sortBy.HasValue ? sortBy.Value : 0, SortDescending = sortDescending.HasValue ? sortDescending.Value : new bool?(), }; RequestBl.SetDismissalListModel(model, !ValidateModel(model)); return View(model); }
public ActionResult DismissalList(DismissalListModel model) { RequestBl.SetDismissalListModel(model, !ValidateModel(model)); ModelState.Clear(); return View(model); }