Esempio n. 1
0
        public ActionResult ExportCandidatesFailToGetTheJobListByTemplate([DataSourceRequest] DataSourceRequest request, Rec_CandidateFailToGetTheJobSearchModel model)
        {
            //return GetListDataAndReturn<Rec_CandidateModel, Rec_CandidateEntity, Rec_EnrolledCandidateSearchModel>(request, model, ConstantSql.hrm_rec_sp_get_CandidatesFailToGetTheJob);

            string status = string.Empty;
            var isDataTable = false;
            object obj = new Rec_CandidateModel();
            var services = new BaseService();
            var result = GetListData<Rec_CandidateModel, Rec_CandidateEntity, Rec_CandidateFailToGetTheJobSearchModel>(request, model, ConstantSql.hrm_hr_sp_get_Relatives, 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_CandidateModel",
                    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));
        }
Esempio n. 2
0
 public ActionResult GetCandidatesFailToGetTheJob([DataSourceRequest] DataSourceRequest request, Rec_CandidateFailToGetTheJobSearchModel model)
 {
     return GetListDataAndReturn<Rec_CandidateModel, Rec_CandidateEntity, Rec_CandidateFailToGetTheJobSearchModel>(request, model, ConstantSql.hrm_rec_sp_get_CandidatesFailToGetTheJob);
 }