Пример #1
0
        public AspoinquiryPOITCTallyCalcTotalsResponseAPI POITCTallyCalcTotals(AspoinquiryPOITCTallyCalcTotalsRequestAPI AspoinquiryPOITCTallyCalcTotalsRequestAPI)
        {
            var result = new AspoinquiryPOITCTallyCalcTotalsResponseAPI();

            var pdspoitcheader = new pdspoitcheaderDataSet();

            var pdspoitccomponent = new pdspoitccomponentDataSet();

            string cErrorMessage = string.Empty;

            foreach (var obj in AspoinquiryPOITCTallyCalcTotalsRequestAPI.poitccomponent)
            {
                DataRow ttblpoitccomponentRow = pdspoitccomponent.ttblpoitccomponent.NewttblpoitccomponentRow();
                Poitccomponent.UpdateRowFromPoitccomponent(ref ttblpoitccomponentRow, obj);
                pdspoitccomponent.ttblpoitccomponent.AddttblpoitccomponentRow((pdspoitccomponentDataSet.ttblpoitccomponentRow)ttblpoitccomponentRow);
            }

            DataRow ttblpoitcheaderRow = pdspoitcheader.ttblpoitcheader.NewttblpoitcheaderRow();

            Poitcheader.UpdateRowFromPoitcheader(ref ttblpoitcheaderRow, AspoinquiryPOITCTallyCalcTotalsRequestAPI.poitcheader);
            pdspoitcheader.ttblpoitcheader.AddttblpoitcheaderRow((pdspoitcheaderDataSet.ttblpoitcheaderRow)ttblpoitcheaderRow);


            NLogLoggerP.Trace("POITCTallyCalcTotals - Aspoinquiry - Before Call");
            StopwatchUtil.Time(
                () =>
            {
                using (var poAspoinquiryproxy = this.proxyAppObject.CreatePO_aspoinquiryproxy())
                {
                    this.SetRequiredContextParameters();
                    poAspoinquiryproxy.POITCTallyCalcTotals(ref pdsContext, ref pdspoitcheader, ref pdspoitccomponent, out cErrorMessage);
                }
            });
            NLogLoggerP.Info("POITCTallyCalcTotals - Aspoinquiry - After Call");


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

            foreach (DataRow row in pdspoitccomponent.ttblpoitccomponent)
            {
                result.poitccomponent.Add(Poitccomponent.BuildPoitccomponentFromRow(row));
            }
            if (pdspoitcheader.ttblpoitcheader.Count > 0)
            {
                result.poitcheader = Poitcheader.BuildPoitcheaderFromRow(pdspoitcheader.ttblpoitcheader[0]);
            }


            return(result);
        }
Пример #2
0
        public Poitccomponent POITCComponentFieldLeave(AspoinquiryPOITCComponentFieldLeaveRequestAPI AspoinquiryPOITCComponentFieldLeaveRequestAPI)
        {
            var result = new Poitccomponent();

            var pdspoitcheader = new pdspoitcheaderDataSet();

            var pdspoitccomponent = new pdspoitccomponentDataSet();

            string cErrorMessage = string.Empty;

            DataRow ttblpoitccomponentRow = pdspoitccomponent.ttblpoitccomponent.NewttblpoitccomponentRow();

            Poitccomponent.UpdateRowFromPoitccomponent(ref ttblpoitccomponentRow, AspoinquiryPOITCComponentFieldLeaveRequestAPI.poitccomponent);
            pdspoitccomponent.ttblpoitccomponent.AddttblpoitccomponentRow((pdspoitccomponentDataSet.ttblpoitccomponentRow)ttblpoitccomponentRow);

            DataRow ttblpoitcheaderRow = pdspoitcheader.ttblpoitcheader.NewttblpoitcheaderRow();

            Poitcheader.UpdateRowFromPoitcheader(ref ttblpoitcheaderRow, AspoinquiryPOITCComponentFieldLeaveRequestAPI.poitcheader);
            pdspoitcheader.ttblpoitcheader.AddttblpoitcheaderRow((pdspoitcheaderDataSet.ttblpoitcheaderRow)ttblpoitcheaderRow);

            var cField = AspoinquiryPOITCComponentFieldLeaveRequestAPI.cField;


            NLogLoggerP.Trace("POITCComponentFieldLeave - Aspoinquiry - Before Call");
            StopwatchUtil.Time(
                () =>
            {
                using (var poAspoinquiryproxy = this.proxyAppObject.CreatePO_aspoinquiryproxy())
                {
                    this.SetRequiredContextParameters();
                    poAspoinquiryproxy.POITCComponentFieldLeave(ref pdsContext, cField, pdspoitcheader, ref pdspoitccomponent, out cErrorMessage);
                }
            });
            NLogLoggerP.Info("POITCComponentFieldLeave - Aspoinquiry - After Call");


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

            if (pdspoitccomponent.ttblpoitccomponent.Count > 0)
            {
                result = Poitccomponent.BuildPoitccomponentFromRow(pdspoitccomponent.ttblpoitccomponent[0]);
            }


            return(result);
        }