Example #1
0
        public IEnumerable <Otittrackline> OTITTrackLineLoad(int iTrackNo)
        {
            var results = new List <Otittrackline>();

            var pdsotittrackline = new pdsotittracklineDataSet();

            string cErrorMessage = string.Empty;


            NLogLoggerP.Trace("OTITTrackLineLoad - Asotinquiry - Before Call");
            StopwatchUtil.Time(
                () =>
            {
                using (var poAsotinquiryproxy = this.proxyAppObject.CreatePO_asotinquiryproxy())
                {
                    this.SetRequiredContextParameters();
                    poAsotinquiryproxy.OTITTrackLineLoad(ref pdsContext, iTrackNo, out pdsotittrackline, out cErrorMessage);
                }
            });
            NLogLoggerP.Info("OTITTrackLineLoad - Asotinquiry - After Call");


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

            foreach (DataRow row in pdsotittrackline.ttblotittrackline)
            {
                results.Add(Otittrackline.BuildOtittracklineFromRow(row));
            }
            return(results);
        }
Example #2
0
        public AsotentryOTETAddPOLineUpdateResponseAPI OTETAddPOLineUpdate(AsotentryOTETAddPOLineUpdateRequestAPI AsotentryOTETAddPOLineUpdateRequestAPI)
        {
            var result = new AsotentryOTETAddPOLineUpdateResponseAPI();

            var pdsotettrackdetail = new pdsotettrackdetailDataSet();

            var pdsotetaddpolines = new pdsotetaddpolinesDataSet();

            var pdsotittrackline = new pdsotittracklineDataSet();

            var pdsotaddons = new pdsotaddonsDataSet();

            var pdsmessaging = new pdsmessagingDataSet();

            string cErrorMessage = string.Empty;

            foreach (var obj in AsotentryOTETAddPOLineUpdateRequestAPI.otetaddpolines)
            {
                DataRow ttblotetaddpolinesRow = pdsotetaddpolines.ttblotetaddpolines.NewttblotetaddpolinesRow();
                Otetaddpolines.UpdateRowFromOtetaddpolines(ref ttblotetaddpolinesRow, obj);
                pdsotetaddpolines.ttblotetaddpolines.AddttblotetaddpolinesRow((pdsotetaddpolinesDataSet.ttblotetaddpolinesRow)ttblotetaddpolinesRow);
            }

            DataRow ttblotettrackdetailRow = pdsotettrackdetail.ttblotettrackdetail.NewttblotettrackdetailRow();

            Otettrackdetail.UpdateRowFromOtettrackdetail(ref ttblotettrackdetailRow, AsotentryOTETAddPOLineUpdateRequestAPI.otettrackdetail);
            pdsotettrackdetail.ttblotettrackdetail.AddttblotettrackdetailRow((pdsotettrackdetailDataSet.ttblotettrackdetailRow)ttblotettrackdetailRow);


            NLogLoggerP.Trace("OTETAddPOLineUpdate - Asotentry - Before Call");
            StopwatchUtil.Time(
                () =>
            {
                using (var poAsotentryproxy = this.proxyAppObject.CreatePO_asotentryproxy())
                {
                    this.SetRequiredContextParameters();
                    poAsotentryproxy.OTETAddPOLineUpdate(ref pdsContext, ref pdsotettrackdetail, pdsotetaddpolines, out pdsotittrackline, out pdsotaddons, out pdsmessaging, out cErrorMessage);
                }
            });
            NLogLoggerP.Info("OTETAddPOLineUpdate - Asotentry - After Call");


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

            foreach (DataRow row in pdsmessaging.ttblmessaging)
            {
                result.messaging.Add(Messaging.BuildMessagingFromRow(row));
            }
            foreach (DataRow row in pdsotaddons.ttblotaddons)
            {
                result.otaddons.Add(Otaddons.BuildOtaddonsFromRow(row));
            }
            if (pdsotettrackdetail.ttblotettrackdetail.Count > 0)
            {
                result.otettrackdetail = Otettrackdetail.BuildOtettrackdetailFromRow(pdsotettrackdetail.ttblotettrackdetail[0]);
            }

            foreach (DataRow row in pdsotittrackline.ttblotittrackline)
            {
                result.otittrackline.Add(Otittrackline.BuildOtittracklineFromRow(row));
            }

            return(result);
        }