public ActionResult ExportHistoryApproveECLAIMByTemplate([DataSourceRequest] DataSourceRequest request, FIN_HistoryApproveECLAIMSearchModel model) { string status = string.Empty; var baseService = new BaseService(); var isDataTable = false; object obj = new FIN_HistoryApproveECLAIMModel(); ListQueryModel lstModel = new ListQueryModel { PageSize = int.MaxValue - 1, PageIndex = 1, Filters = ExtractFilterAttributes(request), Sorts = ExtractSortAttributes(request), AdvanceFilters = ExtractAdvanceFilterAttributes(model) }; var result = baseService.GetData<FIN_HistoryApproveECLAIMModel>(lstModel, ConstantSql.hrm_hr_sp_get_HistoryApprovedClaim, UserLogin, ref status); if (model != null && model.IsCreateTemplate) { var path = Common.GetPath("Templates"); ExportService exportService = new ExportService(); ConfigExport cfgExport = new ConfigExport() { Object = new FIN_HistoryApproveECLAIMModel(), FileName = "FIN_HistoryApproveECLAIM", OutPutPath = path, DownloadPath = Hrm_Main_Web + "Templates", IsDataTable = isDataTable }; 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 GetHistoryApproveECLAIMList([DataSourceRequest] DataSourceRequest request, FIN_HistoryApproveECLAIMSearchModel model) { return GetListDataAndReturn<FIN_HistoryApproveECLAIMModel, FIN_HistoryApproveECLAIMEntity, FIN_HistoryApproveECLAIMSearchModel>(request, model, ConstantSql.hrm_hr_sp_get_HistoryApprovedClaim); }