Пример #1
0
        public AspoheaderPOHeaderRetrieveResponseAPI POHeaderRetrieve(Poheaderretrievecriteria poheaderretrievecriteria)
        {
            var result = new AspoheaderPOHeaderRetrieveResponseAPI();

            var pdspoheaderretrieve = new pdspoheaderretrieveDataSet();

            var pdspohdr = new pdspohdrDataSet();

            var pdswlstatus = new pdswlstatusDataSet();

            var pdsmessaging = new pdsmessagingDataSet();

            DataRow ttblpoheaderretrievecriteriaCriteria = pdspoheaderretrieve.ttblpoheaderretrievecriteria.NewttblpoheaderretrievecriteriaRow();

            Poheaderretrievecriteria.UpdateRowFromPoheaderretrievecriteria(ref ttblpoheaderretrievecriteriaCriteria, poheaderretrievecriteria);
            pdspoheaderretrieve.ttblpoheaderretrievecriteria.AddttblpoheaderretrievecriteriaRow((pdspoheaderretrieveDataSet.ttblpoheaderretrievecriteriaRow)ttblpoheaderretrievecriteriaCriteria);

            string cErrorMessage = string.Empty;


            NLogLoggerP.Trace("POHeaderRetrieve - Aspoheader - Before Call");
            StopwatchUtil.Time(
                () =>
            {
                using (var poAspoheaderproxy = this.proxyAppObject.CreatePO_aspoheaderproxy())
                {
                    this.SetRequiredContextParameters();
                    poAspoheaderproxy.POHeaderRetrieve(ref pdsContext, pdspoheaderretrieve, out pdspohdr, out pdswlstatus, out pdsmessaging, out cErrorMessage);
                }
            });
            NLogLoggerP.Info("POHeaderRetrieve - Aspoheader - After Call");


            this.ReportErrors(cErrorMessage);
            this.ReportErrors(this.pdsContext);
            this.ReportErrors(pdspoheaderretrieve);

            foreach (DataRow row in pdsmessaging.ttblmessaging)
            {
                result.messaging.Add(Messaging.BuildMessagingFromRow(row));
            }
            if (pdspohdr.ttblpohdr.Count > 0)
            {
                result.pohdr = Pohdr.BuildPohdrFromRow(pdspohdr.ttblpohdr[0]);
            }

            if (pdswlstatus.ttblwlstatus.Count > 0)
            {
                result.wlstatus = Wlstatus.BuildWlstatusFromRow(pdswlstatus.ttblwlstatus[0]);
            }


            return(result);
        }
Пример #2
0
        public AspoheaderPOHeaderFieldLeaveResponseAPI POHeaderFieldLeave(AspoheaderPOHeaderFieldLeaveRequestAPI AspoheaderPOHeaderFieldLeaveRequestAPI)
        {
            var result = new AspoheaderPOHeaderFieldLeaveResponseAPI();

            var pdspohdr = new pdspohdrDataSet();

            string cErrorMessage   = string.Empty;
            string cWarningMessage = string.Empty;

            DataRow ttblpohdrRow = pdspohdr.ttblpohdr.NewttblpohdrRow();

            Pohdr.UpdateRowFromPohdr(ref ttblpohdrRow, AspoheaderPOHeaderFieldLeaveRequestAPI.pohdr);
            pdspohdr.ttblpohdr.AddttblpohdrRow((pdspohdrDataSet.ttblpohdrRow)ttblpohdrRow);

            var cField = AspoheaderPOHeaderFieldLeaveRequestAPI.cField;


            NLogLoggerP.Trace("POHeaderFieldLeave - Aspoheader - Before Call");
            StopwatchUtil.Time(
                () =>
            {
                using (var poAspoheaderproxy = this.proxyAppObject.CreatePO_aspoheaderproxy())
                {
                    this.SetRequiredContextParameters();
                    poAspoheaderproxy.POHeaderFieldLeave(ref pdsContext, cField, ref pdspohdr, out cErrorMessage, out cWarningMessage);
                }
            });
            NLogLoggerP.Info("POHeaderFieldLeave - Aspoheader - After Call");


            this.ReportErrors(cErrorMessage);
            this.ReportErrors(this.pdsContext);
            this.ReportErrors(pdspohdr);

            if (pdspohdr.ttblpohdr.Count > 0)
            {
                result.pohdr = Pohdr.BuildPohdrFromRow(pdspohdr.ttblpohdr[0]);
            }

            result.cWarningMessage = cWarningMessage;

            return(result);
        }
Пример #3
0
        public AspoheaderPOHeaderCreateResponseAPI POHeaderCreate(Pohdr pohdr)
        {
            var result = new AspoheaderPOHeaderCreateResponseAPI();

            var pdspohdr = new pdspohdrDataSet();

            var pdsmessaging = new pdsmessagingDataSet();

            DataRow ttblpohdrCriteria = pdspohdr.ttblpohdr.NewttblpohdrRow();

            Pohdr.UpdateRowFromPohdr(ref ttblpohdrCriteria, pohdr);
            pdspohdr.ttblpohdr.AddttblpohdrRow((pdspohdrDataSet.ttblpohdrRow)ttblpohdrCriteria);

            int    iNewPONo      = 0;
            string cErrorMessage = string.Empty;


            NLogLoggerP.Trace("POHeaderCreate - Aspoheader - Before Call");
            StopwatchUtil.Time(
                () =>
            {
                using (var poAspoheaderproxy = this.proxyAppObject.CreatePO_aspoheaderproxy())
                {
                    this.SetRequiredContextParameters();
                    poAspoheaderproxy.POHeaderCreate(ref pdsContext, pdspohdr, out pdsmessaging, out iNewPONo, out cErrorMessage);
                }
            });
            NLogLoggerP.Info("POHeaderCreate - Aspoheader - After Call");


            this.ReportErrors(cErrorMessage);
            this.ReportErrors(this.pdsContext);
            this.ReportErrors(pdspohdr);

            foreach (DataRow row in pdsmessaging.ttblmessaging)
            {
                result.messaging.Add(Messaging.BuildMessagingFromRow(row));
            }
            result.iNewPONo = iNewPONo;

            return(result);
        }
Пример #4
0
        public IEnumerable <Messaging> POHeaderUpdate(AspoheaderPOHeaderUpdateRequestAPI AspoheaderPOHeaderUpdateRequestAPI)
        {
            var results = new List <Messaging>();

            var pdspohdr = new pdspohdrDataSet();

            var pdsmessaging = new pdsmessagingDataSet();

            string cErrorMessage = string.Empty;

            DataRow ttblpohdrRow = pdspohdr.ttblpohdr.NewttblpohdrRow();

            Pohdr.UpdateRowFromPohdr(ref ttblpohdrRow, AspoheaderPOHeaderUpdateRequestAPI.pohdr);
            pdspohdr.ttblpohdr.AddttblpohdrRow((pdspohdrDataSet.ttblpohdrRow)ttblpohdrRow);

            var cType = AspoheaderPOHeaderUpdateRequestAPI.cType;


            NLogLoggerP.Trace("POHeaderUpdate - Aspoheader - Before Call");
            StopwatchUtil.Time(
                () =>
            {
                using (var poAspoheaderproxy = this.proxyAppObject.CreatePO_aspoheaderproxy())
                {
                    this.SetRequiredContextParameters();
                    poAspoheaderproxy.POHeaderUpdate(ref pdsContext, cType, pdspohdr, out pdsmessaging, out cErrorMessage);
                }
            });
            NLogLoggerP.Info("POHeaderUpdate - Aspoheader - After Call");


            this.ReportErrors(cErrorMessage);
            this.ReportErrors(this.pdsContext);
            this.ReportErrors(pdspohdr);

            foreach (DataRow row in pdsmessaging.ttblmessaging)
            {
                results.Add(Messaging.BuildMessagingFromRow(row));
            }
            return(results);
        }
Пример #5
0
 public AspoheaderPOHeaderCreateResponseAPI POHeaderCreate(Pohdr pohdr)
 {
     return(this.repository.POHeaderCreate(pohdr));
 }
Пример #6
0
 public AspoheaderPOHeaderCreateResponseAPI POHeaderCreate(Pohdr pohdr)
 {
     return(this.adapter.POHeaderCreate(pohdr));
 }