コード例 #1
0
        public ActionResult IVS284_SearchData(doIVS284SearchCondition searchParam)
        {
            IVS284_ScreenParameter param = GetScreenObject <IVS284_ScreenParameter>();

            ObjectResultData res = new ObjectResultData();

            res.MessageType = MessageModel.MESSAGE_TYPE.WARNING;

            try
            {
                if (searchParam == null || CommonUtil.IsNullAllField(searchParam))
                {
                    res.AddErrorMessage(MessageUtil.MODULE_COMMON, MessageUtil.MessageList.MSG0006);
                }
                else
                {
                    IInventoryHandler service = ServiceContainer.GetService <IInventoryHandler>() as IInventoryHandler;
                    var lst = service.GetStockReport_InprocessToInstall(searchParam);
                    param.LastSearchParam = searchParam;
                    res.ResultData        = CommonUtil.ConvertToXml(lst, @"Inventory\IVS284_SearchResult", CommonUtil.GRID_EMPTY_TYPE.VIEW);
                }
            }
            catch (Exception ex)
            {
                res.MessageType = MessageModel.MESSAGE_TYPE.INFORMATION;
                res.AddErrorMessage(ex);
            }

            return(Json(res));
        }
コード例 #2
0
        public ActionResult IVS284_GenerateReportSummary(doIVS284SearchCondition reportParam)
        {
            IVS284_ScreenParameter param = GetScreenObject <IVS284_ScreenParameter>();

            ObjectResultData res = new ObjectResultData();

            res.MessageType = MessageModel.MESSAGE_TYPE.WARNING;

            try
            {
                if (reportParam == null || 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_InprocessToInstall(new doIVS284SearchCondition()
                    {
                        ReportType           = param.LastSearchParam.ReportType,
                        ContractCode         = null,
                        ContractCodeSelected = reportParam.ContractCodeSelected,
                        YearMonth            = reportParam.YearMonth,
                    });
                    IInventoryDocumentHandler docService = ServiceContainer.GetService <IInventoryDocumentHandler>() as IInventoryDocumentHandler;
                    param.PendingDownloadFilePath = docService.GenerateIVS284InprocessToInstallReportSummary(param.LastSearchParam.ReportType, lst, param.LastSearchParam);
                    param.PendingDownloadFileName = "InprocessToInstallReport.xlsx";
                    res.ResultData = true;
                }
            }
            catch (Exception ex)
            {
                res.MessageType = MessageModel.MESSAGE_TYPE.INFORMATION;
                res.AddErrorMessage(ex);
            }

            return(Json(res));
        }
コード例 #3
0
        public ActionResult IVS284_GetDetail(doIVS284SearchCondition searchParam)
        {
            IVS284_ScreenParameter param = GetScreenObject <IVS284_ScreenParameter>();

            ObjectResultData res = new ObjectResultData();

            res.MessageType = MessageModel.MESSAGE_TYPE.WARNING;

            try
            {
                IInventoryHandler service = ServiceContainer.GetService <IInventoryHandler>() as IInventoryHandler;
                var lst = service.GetStockReport_InprocessToInstall_Detail(searchParam);
                param.LastSearchParam = searchParam;
                res.ResultData        = CommonUtil.ConvertToXml(lst, @"Inventory\IVS284_Detail", CommonUtil.GRID_EMPTY_TYPE.VIEW);
            }
            catch (Exception ex)
            {
                res.MessageType = MessageModel.MESSAGE_TYPE.INFORMATION;
                res.AddErrorMessage(ex);
            }

            return(Json(res));
        }