Exemplo n.º 1
0
        public IEnumerable <Messaging> POLineNonStockValidate(AspolinePOLineNonStockValidateRequestAPI AspolinePOLineNonStockValidateRequestAPI)
        {
            var results = new List <Messaging>();

            var pdspoline = new pdspolineDataSet();

            var pdspolinenonstockhdr = new pdspolinenonstockhdrDataSet();

            var pdspolinenonstock = new pdspolinenonstockDataSet();

            var pdsmessaging = new pdsmessagingDataSet();

            string cErrorMessage = string.Empty;

            DataRow ttblpolineRow = pdspoline.ttblpoline.NewttblpolineRow();

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

            DataRow ttblpolinenonstockRow = pdspolinenonstock.ttblpolinenonstock.NewttblpolinenonstockRow();

            Polinenonstock.UpdateRowFromPolinenonstock(ref ttblpolinenonstockRow, AspolinePOLineNonStockValidateRequestAPI.polinenonstock);
            pdspolinenonstock.ttblpolinenonstock.AddttblpolinenonstockRow((pdspolinenonstockDataSet.ttblpolinenonstockRow)ttblpolinenonstockRow);

            DataRow ttblpolinenonstockhdrRow = pdspolinenonstockhdr.ttblpolinenonstockhdr.NewttblpolinenonstockhdrRow();

            Polinenonstockhdr.UpdateRowFromPolinenonstockhdr(ref ttblpolinenonstockhdrRow, AspolinePOLineNonStockValidateRequestAPI.polinenonstockhdr);
            pdspolinenonstockhdr.ttblpolinenonstockhdr.AddttblpolinenonstockhdrRow((pdspolinenonstockhdrDataSet.ttblpolinenonstockhdrRow)ttblpolinenonstockhdrRow);


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


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

            foreach (DataRow row in pdsmessaging.ttblmessaging)
            {
                results.Add(Messaging.BuildMessagingFromRow(row));
            }
            return(results);
        }
Exemplo n.º 2
0
 public IEnumerable <Messaging> POLineNonStockValidate(AspolinePOLineNonStockValidateRequestAPI AspolinePOLineNonStockValidateRequestAPI)
 {
     return(this.repository.POLineNonStockValidate(AspolinePOLineNonStockValidateRequestAPI));
 }