Пример #1
0
        public AspolinePOLineValidateResponseAPI POLineValidate(AspolinePOLineValidateRequestAPI AspolinePOLineValidateRequestAPI)
        {
            var result = new AspolinePOLineValidateResponseAPI();

            var pdspoline = new pdspolineDataSet();

            var pdspolineties = new pdspolinetiesDataSet();

            var pdsmessaging = new pdsmessagingDataSet();

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

            DataRow ttblpolineRow = pdspoline.ttblpoline.NewttblpolineRow();

            Poline.UpdateRowFromPoline(ref ttblpolineRow, AspolinePOLineValidateRequestAPI.poline);
            pdspoline.ttblpoline.AddttblpolineRow((pdspolineDataSet.ttblpolineRow)ttblpolineRow);

            foreach (var obj in AspolinePOLineValidateRequestAPI.polineties)
            {
                DataRow ttblpolinetiesRow = pdspolineties.ttblpolineties.NewttblpolinetiesRow();
                Polineties.UpdateRowFromPolineties(ref ttblpolinetiesRow, obj);
                pdspolineties.ttblpolineties.AddttblpolinetiesRow((pdspolinetiesDataSet.ttblpolinetiesRow)ttblpolinetiesRow);
            }

            var cMaintMode = AspolinePOLineValidateRequestAPI.cMaintMode;

            var cChangeList = AspolinePOLineValidateRequestAPI.cChangeList;


            NLogLoggerP.Trace("POLineValidate - Aspoline - Before Call");
            StopwatchUtil.Time(
                () =>
            {
                using (var poAspolineproxy = this.proxyAppObject.CreatePO_aspolineproxy())
                {
                    this.SetRequiredContextParameters();
                    poAspolineproxy.POLineValidate(ref pdsContext, cMaintMode, cChangeList, ref pdspoline, pdspolineties, out pdsmessaging, out cErrorMessage, out cUpdateMessage);
                }
            });
            NLogLoggerP.Info("POLineValidate - Aspoline - After Call");


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

            foreach (DataRow row in pdsmessaging.ttblmessaging)
            {
                result.messaging.Add(Messaging.BuildMessagingFromRow(row));
            }
            if (pdspoline.ttblpoline.Count > 0)
            {
                result.poline = Poline.BuildPolineFromRow(pdspoline.ttblpoline[0]);
            }

            result.cUpdateMessage = cUpdateMessage;

            return(result);
        }
Пример #2
0
 public AspolinePOLineValidateResponseAPI POLineValidate(AspolinePOLineValidateRequestAPI AspolinePOLineValidateRequestAPI)
 {
     return(this.repository.POLineValidate(AspolinePOLineValidateRequestAPI));
 }
Пример #3
0
 public AspolinePOLineValidateResponseAPI POLineValidate(AspolinePOLineValidateRequestAPI AspolinePOLineValidateRequestAPI)
 {
     return(this.adapter.POLineValidate(AspolinePOLineValidateRequestAPI));
 }