Exemplo n.º 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);
        }
Exemplo n.º 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);
        }