Пример #1
0
        public IEnumerable <Messaging> SAEAActionUpdate(AssaentrySAEAActionUpdateRequestAPI AssaentrySAEAActionUpdateRequestAPI)
        {
            var results = new List <Messaging>();

            var pdssaeaaction = new pdssaeaactionDataSet();

            var pdssaealistcust = new pdssaealistcustDataSet();

            var pdssaealistreg = new pdssaealistregDataSet();

            var pdssaealistprod = new pdssaealistprodDataSet();

            var pdssaealistpcat = new pdssaealistpcatDataSet();

            var pdssaealistvend = new pdssaealistvendDataSet();

            var pdssaealistwhse = new pdssaealistwhseDataSet();

            var pdsmessaging = new pdsmessagingDataSet();

            string cErrorMessage = string.Empty;

            DataRow ttblsaeaactionRow = pdssaeaaction.ttblsaeaaction.NewttblsaeaactionRow();

            Saeaaction.UpdateRowFromSaeaaction(ref ttblsaeaactionRow, AssaentrySAEAActionUpdateRequestAPI.saeaaction);
            pdssaeaaction.ttblsaeaaction.AddttblsaeaactionRow((pdssaeaactionDataSet.ttblsaeaactionRow)ttblsaeaactionRow);

            foreach (var obj in AssaentrySAEAActionUpdateRequestAPI.saealistcust)
            {
                DataRow ttblsaealistcustRow = pdssaealistcust.ttblsaealistcust.NewttblsaealistcustRow();
                Saealistcust.UpdateRowFromSaealistcust(ref ttblsaealistcustRow, obj);
                pdssaealistcust.ttblsaealistcust.AddttblsaealistcustRow((pdssaealistcustDataSet.ttblsaealistcustRow)ttblsaealistcustRow);
            }

            foreach (var obj in AssaentrySAEAActionUpdateRequestAPI.saealistpcat)
            {
                DataRow ttblsaealistpcatRow = pdssaealistpcat.ttblsaealistpcat.NewttblsaealistpcatRow();
                Saealistpcat.UpdateRowFromSaealistpcat(ref ttblsaealistpcatRow, obj);
                pdssaealistpcat.ttblsaealistpcat.AddttblsaealistpcatRow((pdssaealistpcatDataSet.ttblsaealistpcatRow)ttblsaealistpcatRow);
            }

            foreach (var obj in AssaentrySAEAActionUpdateRequestAPI.saealistprod)
            {
                DataRow ttblsaealistprodRow = pdssaealistprod.ttblsaealistprod.NewttblsaealistprodRow();
                Saealistprod.UpdateRowFromSaealistprod(ref ttblsaealistprodRow, obj);
                pdssaealistprod.ttblsaealistprod.AddttblsaealistprodRow((pdssaealistprodDataSet.ttblsaealistprodRow)ttblsaealistprodRow);
            }

            foreach (var obj in AssaentrySAEAActionUpdateRequestAPI.saealistreg)
            {
                DataRow ttblsaealistregRow = pdssaealistreg.ttblsaealistreg.NewttblsaealistregRow();
                Saealistreg.UpdateRowFromSaealistreg(ref ttblsaealistregRow, obj);
                pdssaealistreg.ttblsaealistreg.AddttblsaealistregRow((pdssaealistregDataSet.ttblsaealistregRow)ttblsaealistregRow);
            }

            foreach (var obj in AssaentrySAEAActionUpdateRequestAPI.saealistvend)
            {
                DataRow ttblsaealistvendRow = pdssaealistvend.ttblsaealistvend.NewttblsaealistvendRow();
                Saealistvend.UpdateRowFromSaealistvend(ref ttblsaealistvendRow, obj);
                pdssaealistvend.ttblsaealistvend.AddttblsaealistvendRow((pdssaealistvendDataSet.ttblsaealistvendRow)ttblsaealistvendRow);
            }

            foreach (var obj in AssaentrySAEAActionUpdateRequestAPI.saealistwhse)
            {
                DataRow ttblsaealistwhseRow = pdssaealistwhse.ttblsaealistwhse.NewttblsaealistwhseRow();
                Saealistwhse.UpdateRowFromSaealistwhse(ref ttblsaealistwhseRow, obj);
                pdssaealistwhse.ttblsaealistwhse.AddttblsaealistwhseRow((pdssaealistwhseDataSet.ttblsaealistwhseRow)ttblsaealistwhseRow);
            }


            NLogLoggerP.Trace("SAEAActionUpdate - Assaentry - Before Call");
            StopwatchUtil.Time(
                () =>
            {
                using (var poAssaentryproxy = this.proxyAppObject.CreatePO_assaentryproxy())
                {
                    this.SetRequiredContextParameters();
                    poAssaentryproxy.SAEAActionUpdate(ref pdsContext, pdssaeaaction, pdssaealistcust, pdssaealistreg, pdssaealistprod, pdssaealistpcat, pdssaealistvend, pdssaealistwhse, out pdsmessaging, out cErrorMessage);
                }
            });
            NLogLoggerP.Info("SAEAActionUpdate - Assaentry - After Call");


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

            foreach (DataRow row in pdsmessaging.ttblmessaging)
            {
                results.Add(Messaging.BuildMessagingFromRow(row));
            }
            return(results);
        }
Пример #2
0
        public AssaentrySAEAActionSetupResponseAPI SAEAActionSetup(Saeaaction saeaaction)
        {
            var result = new AssaentrySAEAActionSetupResponseAPI();

            var pdssaeaaction = new pdssaeaactionDataSet();

            var pdssaeaflds = new pdssaeafldsDataSet();

            var pdssaealistcust = new pdssaealistcustDataSet();

            var pdssaealistreg = new pdssaealistregDataSet();

            var pdssaealistprod = new pdssaealistprodDataSet();

            var pdssaealistpcat = new pdssaealistpcatDataSet();

            var pdssaealistvend = new pdssaealistvendDataSet();

            var pdssaealistwhse = new pdssaealistwhseDataSet();

            var pdssaeawho = new pdssaeawhoDataSet();

            DataRow ttblsaeaactionCriteria = pdssaeaaction.ttblsaeaaction.NewttblsaeaactionRow();

            Saeaaction.UpdateRowFromSaeaaction(ref ttblsaeaactionCriteria, saeaaction);
            pdssaeaaction.ttblsaeaaction.AddttblsaeaactionRow((pdssaeaactionDataSet.ttblsaeaactionRow)ttblsaeaactionCriteria);

            string cErrorMessage = string.Empty;


            NLogLoggerP.Trace("SAEAActionSetup - Assaentry - Before Call");
            StopwatchUtil.Time(
                () =>
            {
                using (var poAssaentryproxy = this.proxyAppObject.CreatePO_assaentryproxy())
                {
                    this.SetRequiredContextParameters();
                    poAssaentryproxy.SAEAActionSetup(ref pdsContext, ref pdssaeaaction, out pdssaeaflds, out pdssaealistcust, out pdssaealistreg, out pdssaealistprod, out pdssaealistpcat, out pdssaealistvend, out pdssaealistwhse, out pdssaeawho, out cErrorMessage);
                }
            });
            NLogLoggerP.Info("SAEAActionSetup - Assaentry - After Call");


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

            if (pdssaeaaction.ttblsaeaaction.Count > 0)
            {
                result.saeaaction = Saeaaction.BuildSaeaactionFromRow(pdssaeaaction.ttblsaeaaction[0]);
            }

            foreach (DataRow row in pdssaeaflds.ttblsaeafldsamt)
            {
                result.saeafldsamt.Add(Saeafldsamt.BuildSaeafldsamtFromRow(row));
            }
            foreach (DataRow row in pdssaeaflds.ttblsaeafldschar)
            {
                result.saeafldschar.Add(Saeafldschar.BuildSaeafldscharFromRow(row));
            }
            foreach (DataRow row in pdssaeaflds.ttblsaeafldsdate)
            {
                result.saeafldsdate.Add(Saeafldsdate.BuildSaeafldsdateFromRow(row));
            }
            foreach (DataRow row in pdssaeaflds.ttblsaeafldsprc)
            {
                result.saeafldsprc.Add(Saeafldsprc.BuildSaeafldsprcFromRow(row));
            }
            foreach (DataRow row in pdssaealistcust.ttblsaealistcust)
            {
                result.saealistcust.Add(Saealistcust.BuildSaealistcustFromRow(row));
            }
            foreach (DataRow row in pdssaealistpcat.ttblsaealistpcat)
            {
                result.saealistpcat.Add(Saealistpcat.BuildSaealistpcatFromRow(row));
            }
            foreach (DataRow row in pdssaealistprod.ttblsaealistprod)
            {
                result.saealistprod.Add(Saealistprod.BuildSaealistprodFromRow(row));
            }
            foreach (DataRow row in pdssaealistreg.ttblsaealistreg)
            {
                result.saealistreg.Add(Saealistreg.BuildSaealistregFromRow(row));
            }
            foreach (DataRow row in pdssaealistvend.ttblsaealistvend)
            {
                result.saealistvend.Add(Saealistvend.BuildSaealistvendFromRow(row));
            }
            foreach (DataRow row in pdssaealistwhse.ttblsaealistwhse)
            {
                result.saealistwhse.Add(Saealistwhse.BuildSaealistwhseFromRow(row));
            }
            foreach (DataRow row in pdssaeawho.ttblsaeawho)
            {
                result.saeawho.Add(Saeawho.BuildSaeawhoFromRow(row));
            }

            return(result);
        }