//ToLE public ActionResult ExportRecCandidateHistoryListByTemplate([DataSourceRequest] DataSourceRequest request, Hre_ProfileCandidateHistorySearchModel model) { string status = string.Empty; var isDataTable = false; object obj = new Hre_CandidateHistoryModel(); var result = GetListData<Hre_CandidateHistoryModel, Hre_CandidateHistoryEntity, Hre_ProfileCandidateHistorySearchModel>(request, model, ConstantSql.hrm_hr_sp_get_RecCandidateHistory, ref status); if (model.IsCreateTemplateForDynamicGrid) if (model.IsCreateTemplateForDynamicGrid) { obj = result; isDataTable = false; } if (model != null && model.IsCreateTemplate) { var path = Common.GetPath("Templates"); ExportService exportService = new ExportService(); ConfigExport cfgExport = new ConfigExport() { Object = obj, FileName = "Hre_CandidateHistoryModel", 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 ExportListRecCandidateHistory([DataSourceRequest] DataSourceRequest request, Hre_ProfileCandidateHistorySearchModel model) { return ExportAllAndReturn<Hre_CandidateHistoryEntity, Hre_CandidateHistoryModel, Hre_ProfileCandidateHistorySearchModel>(request, model, ConstantSql.hrm_hr_sp_get_RecCandidateHistory); }