public ActionResult LoadDepartmentAssigmentgridControl(Search search) { var tcService = new DepartmentAssignmentService(); DataTable tPivotTable = new DataTable(); tPivotTable = tcService.DynamicGroupByTracerColumns(search); try { string JSONString = string.Empty; JsonResult jr = new JsonResult(); JSONString = JsonConvert.SerializeObject(tPivotTable); var _result = new { outputData = JSONString, ExceedFlag = tcService.ExceedLimit, RecordStatus = tcService.RecordStatus }; jr = Json(_result, JsonRequestBehavior.AllowGet); jr.MaxJsonLength = Int32.MaxValue; jr.RecursionLimit = 100; return(jr); } catch (Exception ex) { ExceptionLog exceptionLog = new ExceptionLog { ExceptionText = "Reports: " + ex.Message, PageName = "_TracerDepartmentAssignment", MethodName = "LoadDepartmentAssigmentgridControl", UserID = Convert.ToInt32(AppSession.UserID), SiteId = Convert.ToInt32(AppSession.SelectedSiteId), TransSQL = "", HttpReferrer = null }; exceptionService.LogException(exceptionLog); return(RedirectToAction("Error", "Transfer")); } }
public ActionResult LoadDepartmentAssigmentTab(Search search) { TracerDepartmentAssignmentInput model = new TracerDepartmentAssignmentInput(); try { var tcService = new DepartmentAssignmentService(); List <TracerFrequency> result = tcService.GetValidFrequencyForDepartmentAssignmentData(search); if (result.Count > 0) { model.DefaultFrequencyNames = result.Select(x => x.TracerObsFrequencyTypeName).ToList(); model.ActiveFrequencyName = model.DefaultFrequencyNames.First(); model.FrequencyName = string.Join(",", model.DefaultFrequencyNames); } return(PartialView("_TracerDepartmentAssignment", model)); } catch (Exception ex) { ExceptionLog exceptionLog = new ExceptionLog { ExceptionText = "Reports: " + ex.Message, PageName = "_TracerDepartmentAssignment", MethodName = "LoadDepartmentAssigmentTab", UserID = Convert.ToInt32(AppSession.UserID), SiteId = Convert.ToInt32(AppSession.SelectedSiteId), TransSQL = "", HttpReferrer = null }; exceptionService.LogException(exceptionLog); return(RedirectToAction("Error", "Transfer")); } }