public ActionResult ISS100_ExportExcelData(doInstallationReport dtInstallation) { ISS100_ScreenParameter param = GetScreenObject <ISS100_ScreenParameter>(); ObjectResultData res = new ObjectResultData(); res.MessageType = MessageModel.MESSAGE_TYPE.WARNING; try { if (!this.ModelState.IsValid) { res.MessageType = MessageModel.MESSAGE_TYPE.WARNING; ValidatorUtil.BuildErrorMessage(res, this); return(Json(res)); } if (dtInstallation == null || CommonUtil.IsNullAllField(dtInstallation)) { res.AddErrorMessage(MessageUtil.MODULE_COMMON, MessageUtil.MessageList.MSG0006); } else { IInstallationHandler handler = ServiceContainer.GetService <IInstallationHandler>() as IInstallationHandler; ICommonHandler chandler = ServiceContainer.GetService <ICommonHandler>() as ICommonHandler; var lst = handler.GetInstallationReportExcelFile(dtInstallation); if (lst == null || lst.Count == 0) { res.AddErrorMessage(MessageUtil.MODULE_COMMON, MessageUtil.MessageList.MSG0001); res.MessageType = MessageModel.MESSAGE_TYPE.INFORMATION; return(Json(res)); } IInstallationDocumentHandler docService = ServiceContainer.GetService <IInstallationDocumentHandler>() as IInstallationDocumentHandler; param.PendingDownloadFilePath = docService.GenerateISR120Report(lst, dtInstallation); param.PendingDownloadFileName = "ISR120Report.xlsx"; res.ResultData = true; } } catch (Exception ex) { res.MessageType = MessageModel.MESSAGE_TYPE.INFORMATION; res.AddErrorMessage(ex); } return(Json(res)); }