Пример #1
0
        public ImportMaterialReceivingSrvResponse process(ImportMaterialReceivingSrvRequest importMaterialReceivingSrvRequest)
        {
            logger.Info("\r\n");
            logger.Info("WebsSrvice Start......");
            ImportMaterialReceivingSrvResponse importMaterialReceivingSrvResponse = new ImportMaterialReceivingSrvResponse();
            ImportMaterialReceivingController  importMaterialReceivingController  = new ImportMaterialReceivingController();

            importMaterialReceivingSrvResponse = importMaterialReceivingController.Read(importMaterialReceivingSrvRequest);
            logger.Info(importMaterialReceivingSrvResponse);
            logger.Info("WebsSrvice End......");
            return(importMaterialReceivingSrvResponse);
        }
Пример #2
0
        public List <ImportMaterialReceivingSrvCollection> GetCollection(ImportMaterialReceivingSrvRequest importMaterialReceivingSrvRequest)
        {
            List <ImportMaterialReceivingSrvCollection> importMaterialReceivingSrvCollection = new List <ImportMaterialReceivingSrvCollection>();

            try
            {
                importMaterialReceivingSrvCollection = importMaterialReceivingSrvRequest.SrvCollection;
            }
            catch (Exception e)
            {
                logger.Info("获取Collection失败:" + e.Message);
            }
            return(importMaterialReceivingSrvCollection);
        }
Пример #3
0
        public MsgHeader GetMsgheader(ImportMaterialReceivingSrvRequest importMaterialReceivingSrvRequest)
        {
            MsgHeader msgHeader = new MsgHeader();

            try
            {
                msgHeader = importMaterialReceivingSrvRequest.MsgHeader;
            }
            catch (Exception e)
            {
                logger.Info("获取MsgHeader失败:" + e.Message);
            }
            return(msgHeader);
        }
Пример #4
0
        public ImportMaterialReceivingSrvResponse Read(ImportMaterialReceivingSrvRequest importMaterialReceivingSrvRequest)
        {
            ImportMaterialReceivingService     importMaterialReceivingService     = new ImportMaterialReceivingService();
            ImportMaterialReceivingSrvResponse importMaterialReceivingSrvResponse = new ImportMaterialReceivingSrvResponse();
            MsgHeader msgHeader = new MsgHeader();
            List <ImportMaterialReceivingSrvCollection> importMaterialReceivingSrvCollection = new List <ImportMaterialReceivingSrvCollection>();
            List <ErrorCollection> errorCollections = new List <ErrorCollection>();
            String    error           = "";
            DataTable Collections     = new DataTable("Collections");
            DataTable Infos           = new DataTable("Infos");
            DataTable ErrorCollection = new DataTable("ErrorCollection");

            msgHeader = importMaterialReceivingService.GetMsgheader(importMaterialReceivingSrvRequest);
            error     = importMaterialReceivingService.CheckMsgheader(msgHeader);
            importMaterialReceivingSrvResponse.ERROR_FLAG = "Y";
            if (error.Length != 0)
            {
                return(FastResponse(error));
            }
            importMaterialReceivingSrvCollection = importMaterialReceivingService.GetCollection(importMaterialReceivingSrvRequest);
            error = importMaterialReceivingService.CheckCollection(importMaterialReceivingSrvCollection);
            if (error.Length != 0)
            {
                return(FastResponse(error));
            }
            error = importMaterialReceivingService.TransformData(msgHeader, importMaterialReceivingSrvCollection, Collections, Infos);
            if (error.Length != 0)
            {
                return(FastResponse(error));
            }
            error = importMaterialReceivingService.LoadData(Collections, Infos);
            if (error.Length != 0)
            {
                return(FastResponse(error));
            }
            error = importMaterialReceivingService.CheckData(errorCollections);
            return(importMaterialReceivingSrvResponse);
        }