Exemplo n.º 1
0
        public AswtlineWTLineNonStockFinalResponseAPI WTLineNonStockFinal(AswtlineWTLineNonStockFinalRequestAPI AswtlineWTLineNonStockFinalRequestAPI)
        {
            var result = new AswtlineWTLineNonStockFinalResponseAPI();

            var pdswtline = new pdswtlineDataSet();

            var pdswtlinenonstockhdr = new pdswtlinenonstockhdrDataSet();

            var pdswtlinenonstock = new pdswtlinenonstockDataSet();

            var pdsmessaging = new pdsmessagingDataSet();

            string cErrorMessage = string.Empty;

            DataRow ttblwtlineRow = pdswtline.ttblwtline.NewttblwtlineRow();

            Wtline.UpdateRowFromWtline(ref ttblwtlineRow, AswtlineWTLineNonStockFinalRequestAPI.wtline);
            pdswtline.ttblwtline.AddttblwtlineRow((pdswtlineDataSet.ttblwtlineRow)ttblwtlineRow);

            DataRow ttblwtlinenonstockRow = pdswtlinenonstock.ttblwtlinenonstock.NewttblwtlinenonstockRow();

            Wtlinenonstock.UpdateRowFromWtlinenonstock(ref ttblwtlinenonstockRow, AswtlineWTLineNonStockFinalRequestAPI.wtlinenonstock);
            pdswtlinenonstock.ttblwtlinenonstock.AddttblwtlinenonstockRow((pdswtlinenonstockDataSet.ttblwtlinenonstockRow)ttblwtlinenonstockRow);

            DataRow ttblwtlinenonstockhdrRow = pdswtlinenonstockhdr.ttblwtlinenonstockhdr.NewttblwtlinenonstockhdrRow();

            Wtlinenonstockhdr.UpdateRowFromWtlinenonstockhdr(ref ttblwtlinenonstockhdrRow, AswtlineWTLineNonStockFinalRequestAPI.wtlinenonstockhdr);
            pdswtlinenonstockhdr.ttblwtlinenonstockhdr.AddttblwtlinenonstockhdrRow((pdswtlinenonstockhdrDataSet.ttblwtlinenonstockhdrRow)ttblwtlinenonstockhdrRow);


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


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

            foreach (DataRow row in pdsmessaging.ttblmessaging)
            {
                result.messaging.Add(Messaging.BuildMessagingFromRow(row));
            }
            if (pdswtlinenonstock.ttblwtlinenonstock.Count > 0)
            {
                result.wtlinenonstock = Wtlinenonstock.BuildWtlinenonstockFromRow(pdswtlinenonstock.ttblwtlinenonstock[0]);
            }


            return(result);
        }
Exemplo n.º 2
0
        public AswtlineWTLineUpdateResponseAPI WTLineUpdate(AswtlineWTLineUpdateRequestAPI AswtlineWTLineUpdateRequestAPI)
        {
            var result = new AswtlineWTLineUpdateResponseAPI();

            var pdswtline = new pdswtlineDataSet();

            var pdsmessaging = new pdsmessagingDataSet();

            string cErrorMessage  = string.Empty;
            string cUpdateMessage = string.Empty;

            DataRow ttblwtlineRow = pdswtline.ttblwtline.NewttblwtlineRow();

            Wtline.UpdateRowFromWtline(ref ttblwtlineRow, AswtlineWTLineUpdateRequestAPI.wtline);
            pdswtline.ttblwtline.AddttblwtlineRow((pdswtlineDataSet.ttblwtlineRow)ttblwtlineRow);

            foreach (var obj in AswtlineWTLineUpdateRequestAPI.wtlnties)
            {
                DataRow ttblwtlntiesRow = pdswtline.ttblwtlnties.NewttblwtlntiesRow();
                Wtlnties.UpdateRowFromWtlnties(ref ttblwtlntiesRow, obj);
                pdswtline.ttblwtlnties.AddttblwtlntiesRow((pdswtlineDataSet.ttblwtlntiesRow)ttblwtlntiesRow);
            }

            var lMaintMode = AswtlineWTLineUpdateRequestAPI.lMaintMode;

            var cChangeList = AswtlineWTLineUpdateRequestAPI.cChangeList;


            NLogLoggerP.Trace("WTLineUpdate - Aswtline - Before Call");
            StopwatchUtil.Time(
                () =>
            {
                using (var poAswtlineproxy = this.proxyAppObject.CreatePO_aswtlineproxy())
                {
                    this.SetRequiredContextParameters();
                    poAswtlineproxy.WTLineUpdate(ref pdsContext, lMaintMode, cChangeList, ref pdswtline, out pdsmessaging, out cErrorMessage, out cUpdateMessage);
                }
            });
            NLogLoggerP.Info("WTLineUpdate - Aswtline - After Call");


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

            foreach (DataRow row in pdsmessaging.ttblmessaging)
            {
                result.messaging.Add(Messaging.BuildMessagingFromRow(row));
            }
            if (pdswtline.ttblwtline.Count > 0)
            {
                result.wtline = Wtline.BuildWtlineFromRow(pdswtline.ttblwtline[0]);
            }

            result.cUpdateMessage = cUpdateMessage;

            return(result);
        }
Exemplo n.º 3
0
        public AswtlineWTLineNonStockLeaveFieldResponseAPI WTLineNonStockLeaveField(AswtlineWTLineNonStockLeaveFieldRequestAPI AswtlineWTLineNonStockLeaveFieldRequestAPI)
        {
            var result = new AswtlineWTLineNonStockLeaveFieldResponseAPI();

            var pdswtline = new pdswtlineDataSet();

            var pdswtlinenonstockhdr = new pdswtlinenonstockhdrDataSet();

            var pdswtlinenonstock = new pdswtlinenonstockDataSet();

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

            DataRow ttblwtlineRow = pdswtline.ttblwtline.NewttblwtlineRow();

            Wtline.UpdateRowFromWtline(ref ttblwtlineRow, AswtlineWTLineNonStockLeaveFieldRequestAPI.wtline);
            pdswtline.ttblwtline.AddttblwtlineRow((pdswtlineDataSet.ttblwtlineRow)ttblwtlineRow);

            DataRow ttblwtlinenonstockRow = pdswtlinenonstock.ttblwtlinenonstock.NewttblwtlinenonstockRow();

            Wtlinenonstock.UpdateRowFromWtlinenonstock(ref ttblwtlinenonstockRow, AswtlineWTLineNonStockLeaveFieldRequestAPI.wtlinenonstock);
            pdswtlinenonstock.ttblwtlinenonstock.AddttblwtlinenonstockRow((pdswtlinenonstockDataSet.ttblwtlinenonstockRow)ttblwtlinenonstockRow);

            DataRow ttblwtlinenonstockhdrRow = pdswtlinenonstockhdr.ttblwtlinenonstockhdr.NewttblwtlinenonstockhdrRow();

            Wtlinenonstockhdr.UpdateRowFromWtlinenonstockhdr(ref ttblwtlinenonstockhdrRow, AswtlineWTLineNonStockLeaveFieldRequestAPI.wtlinenonstockhdr);
            pdswtlinenonstockhdr.ttblwtlinenonstockhdr.AddttblwtlinenonstockhdrRow((pdswtlinenonstockhdrDataSet.ttblwtlinenonstockhdrRow)ttblwtlinenonstockhdrRow);

            var cFieldName = AswtlineWTLineNonStockLeaveFieldRequestAPI.cFieldName;


            NLogLoggerP.Trace("WTLineNonStockLeaveField - Aswtline - Before Call");
            StopwatchUtil.Time(
                () =>
            {
                using (var poAswtlineproxy = this.proxyAppObject.CreatePO_aswtlineproxy())
                {
                    this.SetRequiredContextParameters();
                    poAswtlineproxy.WTLineNonStockLeaveField(ref pdsContext, cFieldName, pdswtline, pdswtlinenonstockhdr, ref pdswtlinenonstock, out cErrorMessage, out cWarningMessage);
                }
            });
            NLogLoggerP.Info("WTLineNonStockLeaveField - Aswtline - After Call");


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

            if (pdswtlinenonstock.ttblwtlinenonstock.Count > 0)
            {
                result.wtlinenonstock = Wtlinenonstock.BuildWtlinenonstockFromRow(pdswtlinenonstock.ttblwtlinenonstock[0]);
            }

            result.cWarningMessage = cWarningMessage;

            return(result);
        }
Exemplo n.º 4
0
        public IEnumerable <Messaging> WTETLineDelete(AswtlineWTETLineDeleteRequestAPI AswtlineWTETLineDeleteRequestAPI)
        {
            var results = new List <Messaging>();

            var pdswtline = new pdswtlineDataSet();

            var pdsmessaging = new pdsmessagingDataSet();

            string cErrorMessage = string.Empty;

            DataRow ttblwtlineRow = pdswtline.ttblwtline.NewttblwtlineRow();

            Wtline.UpdateRowFromWtline(ref ttblwtlineRow, AswtlineWTETLineDeleteRequestAPI.wtline);
            pdswtline.ttblwtline.AddttblwtlineRow((pdswtlineDataSet.ttblwtlineRow)ttblwtlineRow);

            foreach (var obj in AswtlineWTETLineDeleteRequestAPI.wtlinecriteria)
            {
                DataRow ttblwtlinecriteriaRow = pdswtline.ttblwtlinecriteria.NewttblwtlinecriteriaRow();
                Wtlinecriteria.UpdateRowFromWtlinecriteria(ref ttblwtlinecriteriaRow, obj);
                pdswtline.ttblwtlinecriteria.AddttblwtlinecriteriaRow((pdswtlineDataSet.ttblwtlinecriteriaRow)ttblwtlinecriteriaRow);
            }

            DataRow ttblwtlntiesRow = pdswtline.ttblwtlnties.NewttblwtlntiesRow();

            Wtlnties.UpdateRowFromWtlnties(ref ttblwtlntiesRow, AswtlineWTETLineDeleteRequestAPI.wtlnties);
            pdswtline.ttblwtlnties.AddttblwtlntiesRow((pdswtlineDataSet.ttblwtlntiesRow)ttblwtlntiesRow);


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


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

            foreach (DataRow row in pdsmessaging.ttblmessaging)
            {
                results.Add(Messaging.BuildMessagingFromRow(row));
            }
            return(results);
        }