Ejemplo n.º 1
0
 public AspolinePOLineUpdateResponseAPI POLineUpdate(AspolinePOLineUpdateRequestAPI AspolinePOLineUpdateRequestAPI)
 {
     return(this.adapter.POLineUpdate(AspolinePOLineUpdateRequestAPI));
 }
Ejemplo n.º 2
0
 public AspolinePOLineUpdateResponseAPI POLineUpdate(AspolinePOLineUpdateRequestAPI AspolinePOLineUpdateRequestAPI)
 {
     return(this.repository.POLineUpdate(AspolinePOLineUpdateRequestAPI));
 }
Ejemplo n.º 3
0
        public AspolinePOLineUpdateResponseAPI POLineUpdate(AspolinePOLineUpdateRequestAPI AspolinePOLineUpdateRequestAPI)
        {
            var result = new AspolinePOLineUpdateResponseAPI();

            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, AspolinePOLineUpdateRequestAPI.poline);
            pdspoline.ttblpoline.AddttblpolineRow((pdspolineDataSet.ttblpolineRow)ttblpolineRow);

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

            var cMaintMode = AspolinePOLineUpdateRequestAPI.cMaintMode;

            var cChangeList = AspolinePOLineUpdateRequestAPI.cChangeList;


            NLogLoggerP.Trace("POLineUpdate - Aspoline - Before Call");
            StopwatchUtil.Time(
                () =>
            {
                using (var poAspolineproxy = this.proxyAppObject.CreatePO_aspolineproxy())
                {
                    this.SetRequiredContextParameters();
                    poAspolineproxy.POLineUpdate(ref pdsContext, cMaintMode, cChangeList, ref pdspoline, ref pdspolineties, out pdsmessaging, out cErrorMessage, out cUpdateMessage);
                }
            });
            NLogLoggerP.Info("POLineUpdate - 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]);
            }

            foreach (DataRow row in pdspolineties.ttblpolineties)
            {
                result.polineties.Add(Polineties.BuildPolinetiesFromRow(row));
            }
            result.cUpdateMessage = cUpdateMessage;

            return(result);
        }