public ActionResult IVS286_GenerateReport(doIVS286SearchCondition reportParam) { IVS286_ScreenParameter param = GetScreenObject <IVS286_ScreenParameter>(); ObjectResultData res = new ObjectResultData(); res.MessageType = MessageModel.MESSAGE_TYPE.WARNING; try { if (reportParam.ContractCodeSelected == null || reportParam.ContractCodeSelected.Length == 0) { res.AddErrorMessage(MessageUtil.MODULE_COMMON, MessageUtil.MessageList.MSG0006); } else { if (param.LastSearchParam == null) { param.LastSearchParam = reportParam; } IInventoryHandler service = ServiceContainer.GetService <IInventoryHandler>() as IInventoryHandler; var lst = service.GetStockReport_InProcess_Detail(new doIVS286SearchCondition() { ReportType = param.LastSearchParam.ReportType, ContractCode = null, ProcessDate = param.LastSearchParam.ProcessDate, ContractCodeSelected = reportParam.ContractCodeSelected, }); IInventoryDocumentHandler docService = ServiceContainer.GetService <IInventoryDocumentHandler>() as IInventoryDocumentHandler; param.PendingDownloadFilePath = docService.GenerateIVS286InProcessReport(param.LastSearchParam.ReportType, lst, param.LastSearchParam); param.PendingDownloadFileName = "InprocessReport.xlsx"; res.ResultData = true; } } catch (Exception ex) { res.MessageType = MessageModel.MESSAGE_TYPE.INFORMATION; res.AddErrorMessage(ex); } return(Json(res)); }