public ActionResult GetReportHDTJobDecisionAssignWork([DataSourceRequest] DataSourceRequest request, Hre_ReportHDTJobDecisionAssignWorkSearchModel Model) { HeaderInfo headerInfo1 = new HeaderInfo() { Name = "DateFrom", Value = Model.DateFrom }; HeaderInfo headerInfo2 = new HeaderInfo() { Name = "DateTo", Value = Model.DateTo }; List<HeaderInfo> listHeaderInfo = new List<HeaderInfo>() { headerInfo1, headerInfo2 }; if (Model != null && Model.IsCreateTemplate) { var path = Common.GetPath("Templates"); ExportService exportService = new ExportService(); ConfigExport cfgExport = new ConfigExport() { Object = new Hre_HDTJobModel(), FileName = "Hre_HDTJob", OutPutPath = path, HeaderInfo = listHeaderInfo, DownloadPath = Hrm_Main_Web + "Templates", IsDataTable = false }; var str = exportService.CreateTemplate(cfgExport); return Json(str); } #region Validate string message = string.Empty; var checkValidate = ValidatorService.OnValidateData<Hre_ReportHDTJobDecisionAssignWorkSearchModel>(Model, "Hre_ReportHDTJobDecisionAssignWork", ref message); if (!checkValidate) { return Json(message, JsonRequestBehavior.AllowGet); } #endregion var ReportServices = new Hre_ReportServices(); var result = ReportServices.GetReportHDTJobDecisionAssignWork(Model.DateFrom, Model.OrgStructureID, Model.PositionID, Model.JobTitleID, Model.ProfileName, Model.CodeEmp, UserLogin).Translate<Hre_HDTJobModel>(); if (Model.ExportId != Guid.Empty) { var fullPath = ExportService.Export(Model.ExportId, result, listHeaderInfo, Model.ExportType); return Json(fullPath); } return Json(result.ToDataSourceResult(request)); }