コード例 #1
0
ファイル: Rec_GetDataController.cs プロジェクト: dtafe/vnr
        public ActionResult ExportRecruitmentHistoryListByTemplate([DataSourceRequest] DataSourceRequest request, Rec_RecruitmentHistorySearchModelNew model)
        {
            request.PageSize = 10000000;
            string status = string.Empty;
            var isDataTable = false;
            object obj = new Rec_RecruitmentHistoryModel();
            var result = GetListData<Rec_RecruitmentHistoryModel, Rec_RecruitmentHistoryEntity, Rec_RecruitmentHistorySearchModelNew>(request, model, ConstantSql.hrm_rec_sp_get_RecruitmentHistory, ref status);
            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 = "Rec_RecruitmentHistoryModel",
                    OutPutPath = path,
                    // HeaderInfo = listHeaderInfo,
                    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));
        }
コード例 #2
0
ファイル: Rec_GetDataController.cs プロジェクト: dtafe/vnr
 public ActionResult ExportAllRecruitmentHistoryListNew([DataSourceRequest] DataSourceRequest request, Rec_RecruitmentHistorySearchModelNew model)
 {
     return ExportAllAndReturn<Rec_RecruitmentHistoryEntity, Rec_RecruitmentHistoryModel, Rec_RecruitmentHistorySearchModelNew>(request, model, ConstantSql.hrm_rec_sp_get_RecruitmentHistory);
 }