Ejemplo n.º 1
0
 public ActionResult ExportProfileWaitingHireByTemplate([DataSourceRequest] DataSourceRequest request, Hre_ProfileWaitingHireSearchModel model)
 {
     string status = string.Empty;
     var isDataTable = false;
     object obj = new Hre_ProfileModel();
     var result = GetListData<Hre_ProfileModel, Hre_ProfileEntity, Hre_ProfileWaitingHireSearchModel>(request, model, ConstantSql.hrm_hr_sp_get_ProfileWaitingHire, ref status);
     if (model != null && model.IsCreateTemplate)
     {
         var path = Common.GetPath("Templates");
         ExportService exportService = new ExportService();
         ConfigExport cfgExport = new ConfigExport()
         {
             Object = new Hre_ProfileModel(),
             FileName = "Hre_Profile",
             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));
 }
Ejemplo n.º 2
0
 public ActionResult ExportProfileWaitingHireList([DataSourceRequest] DataSourceRequest request, Hre_ProfileWaitingHireSearchModel model)
 {
     return ExportAllAndReturn<Hre_ProfileModel, Hre_ProfileEntity, Hre_ProfileWaitingHireSearchModel>(request, model, ConstantSql.hrm_hr_sp_get_ProfileWaitingHire);
 }