public ActionResult ExportProfileIsBackList([DataSourceRequest] DataSourceRequest request, Hre_ProfileSearchIsBackListModel model) { #region Validate string message = string.Empty; var checkValidate = ValidatorService.OnValidateData<Hre_ProfileSearchIsBackListModel>(model, "Hre_ReportProfileIsBackList", ref message); if (!checkValidate) { return Json(message); } #endregion var service = new Hre_ReportServices(); var hrService = new Hre_ProfileServices(); string status = string.Empty; object obj = new Hre_ProfileSearchIsBackListModel(); ListQueryModel lstModel = new ListQueryModel { PageSize = int.MaxValue - 1, PageIndex = 1, Filters = ExtractFilterAttributes(request), Sorts = ExtractSortAttributes(request), AdvanceFilters = ExtractAdvanceFilterAttributes(model) }; var result = GetListData<Hre_ReportProfileIsBackListModel, Hre_ReportProfileIsBackListEntity, Hre_ProfileSearchIsBackListModel>(request, model, ConstantSql.hrm_hr_sp_get_ProfileIsBackList, ref status); if (model != null && model.IsCreateTemplate) { var path = Common.GetPath("Templates"); ExportService exportService = new ExportService(); ConfigExport cfgExport = new ConfigExport() { Object = new Hre_ReportProfileIsBackListModel(), FileName = "Hre_ReportProfileIsBackList", OutPutPath = path, //HeaderInfo = listHeaderInfo, DownloadPath = Hrm_Main_Web + "Templates", IsDataTable = false }; var str = exportService.CreateTemplate(cfgExport); return Json(str); } if (model.ExportID != Guid.Empty) { var fullPath = ExportService.Export(model.ExportID, result, null, model.ExportType); return Json(fullPath); } return Json(result.ToDataSourceResult(request)); }
public ActionResult GetProfileIsBackList([DataSourceRequest] DataSourceRequest request, Hre_ProfileSearchIsBackListModel model) { return GetListDataAndReturn<Hre_ProfileModel, Hre_ProfileEntity, Hre_ProfileSearchIsBackListModel>(request, model, ConstantSql.hrm_hr_sp_get_ProfileIsBackList); }