Ejemplo n.º 1
0
        public AswtlineWTEELineUpdateResponseAPI WTEELineUpdate(AswtlineWTEELineUpdateRequestAPI AswtlineWTEELineUpdateRequestAPI)
        {
            var result = new AswtlineWTEELineUpdateResponseAPI();

            var pdswteelines = new pdswteelinesDataSet();

            var pdsmessaging = new pdsmessagingDataSet();

            string cErrorMessage = string.Empty;

            foreach (var obj in AswtlineWTEELineUpdateRequestAPI.wteelines)
            {
                DataRow ttblwteelinesRow = pdswteelines.ttblwteelines.NewttblwteelinesRow();
                Wteelines.UpdateRowFromWteelines(ref ttblwteelinesRow, obj);
                pdswteelines.ttblwteelines.AddttblwteelinesRow((pdswteelinesDataSet.ttblwteelinesRow)ttblwteelinesRow);
            }

            DataRow ttblwteelinesummaryRow = pdswteelines.ttblwteelinesummary.NewttblwteelinesummaryRow();

            Wteelinesummary.UpdateRowFromWteelinesummary(ref ttblwteelinesummaryRow, AswtlineWTEELineUpdateRequestAPI.wteelinesummary);
            pdswteelines.ttblwteelinesummary.AddttblwteelinesummaryRow((pdswteelinesDataSet.ttblwteelinesummaryRow)ttblwteelinesummaryRow);

            var cActionType = AswtlineWTEELineUpdateRequestAPI.cActionType;

            var cReasUnAvTy = AswtlineWTEELineUpdateRequestAPI.cReasUnAvTy;


            NLogLoggerP.Trace("WTEELineUpdate - Aswtline - Before Call");
            StopwatchUtil.Time(
                () =>
            {
                using (var poAswtlineproxy = this.proxyAppObject.CreatePO_aswtlineproxy())
                {
                    this.SetRequiredContextParameters();
                    poAswtlineproxy.WTEELineUpdate(ref pdsContext, cActionType, cReasUnAvTy, ref pdswteelines, out pdsmessaging, out cErrorMessage);
                }
            });
            NLogLoggerP.Info("WTEELineUpdate - Aswtline - After Call");


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

            foreach (DataRow row in pdsmessaging.ttblmessaging)
            {
                result.messaging.Add(Messaging.BuildMessagingFromRow(row));
            }
            foreach (DataRow row in pdswteelines.ttblwteelines)
            {
                result.wteelines.Add(Wteelines.BuildWteelinesFromRow(row));
            }
            if (pdswteelines.ttblwteelinesummary.Count > 0)
            {
                result.wteelinesummary = Wteelinesummary.BuildWteelinesummaryFromRow(pdswteelines.ttblwteelinesummary[0]);
            }


            return(result);
        }
Ejemplo n.º 2
0
        public AswtlineWTEELinesRetrieveResponseAPI WTEELinesRetrieve(int iWtNo, int iWtSuf, int iJrnlNo)
        {
            var result = new AswtlineWTEELinesRetrieveResponseAPI();

            var pdswteelines = new pdswteelinesDataSet();

            var pdsmessaging = new pdsmessagingDataSet();

            string cErrorMessage = string.Empty;


            NLogLoggerP.Trace("WTEELinesRetrieve - Aswtline - Before Call");
            StopwatchUtil.Time(
                () =>
            {
                using (var poAswtlineproxy = this.proxyAppObject.CreatePO_aswtlineproxy())
                {
                    this.SetRequiredContextParameters();
                    poAswtlineproxy.WTEELinesRetrieve(ref pdsContext, iWtNo, iWtSuf, iJrnlNo, out pdswteelines, out pdsmessaging, out cErrorMessage);
                }
            });
            NLogLoggerP.Info("WTEELinesRetrieve - Aswtline - After Call");


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

            foreach (DataRow row in pdsmessaging.ttblmessaging)
            {
                result.messaging.Add(Messaging.BuildMessagingFromRow(row));
            }
            foreach (DataRow row in pdswteelines.ttblwteelines)
            {
                result.wteelines.Add(Wteelines.BuildWteelinesFromRow(row));
            }
            if (pdswteelines.ttblwteelinesummary.Count > 0)
            {
                result.wteelinesummary = Wteelinesummary.BuildWteelinesummaryFromRow(pdswteelines.ttblwteelinesummary[0]);
            }


            return(result);
        }