Example #1
0
        public AsvaentryVAEASplitInitializeResponseAPI VAEASplitInitialize(Lotcutresults lotcutresults)
        {
            var result = new AsvaentryVAEASplitInitializeResponseAPI();

            var pdsiclotcutresults = new pdsiclotcutresultsDataSet();

            var pdsvaeasplit = new pdsvaeasplitDataSet();

            var pdsmessaging = new pdsmessagingDataSet();

            DataRow ttbllotcutresultsCriteria = pdsiclotcutresults.ttbllotcutresults.NewttbllotcutresultsRow();

            Lotcutresults.UpdateRowFromLotcutresults(ref ttbllotcutresultsCriteria, lotcutresults);
            pdsiclotcutresults.ttbllotcutresults.AddttbllotcutresultsRow((pdsiclotcutresultsDataSet.ttbllotcutresultsRow)ttbllotcutresultsCriteria);

            string cErrorMessage = string.Empty;


            NLogLoggerP.Trace("VAEASplitInitialize - Asvaentry - Before Call");
            StopwatchUtil.Time(
                () =>
            {
                using (var poAsvaentryproxy = this.proxyAppObject.CreatePO_asvaentryproxy())
                {
                    this.SetRequiredContextParameters();
                    poAsvaentryproxy.VAEASplitInitialize(ref pdsContext, pdsiclotcutresults, out pdsvaeasplit, out pdsmessaging, out cErrorMessage);
                }
            });
            NLogLoggerP.Info("VAEASplitInitialize - Asvaentry - After Call");


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

            foreach (DataRow row in pdsmessaging.ttblmessaging)
            {
                result.messaging.Add(Messaging.BuildMessagingFromRow(row));
            }
            if (pdsvaeasplit.ttblvaeasplitdata.Count > 0)
            {
                result.vaeasplitdata = Vaeasplitdata.BuildVaeasplitdataFromRow(pdsvaeasplit.ttblvaeasplitdata[0]);
            }


            return(result);
        }
Example #2
0
        public IEnumerable <Messaging> VAEASplitSave(Vaeasplitdata vaeasplitdata)
        {
            var results = new List <Messaging>();

            var pdsvaeasplit = new pdsvaeasplitDataSet();

            var pdsmessaging = new pdsmessagingDataSet();

            DataRow ttblvaeasplitdataCriteria = pdsvaeasplit.ttblvaeasplitdata.NewttblvaeasplitdataRow();

            Vaeasplitdata.UpdateRowFromVaeasplitdata(ref ttblvaeasplitdataCriteria, vaeasplitdata);
            pdsvaeasplit.ttblvaeasplitdata.AddttblvaeasplitdataRow((pdsvaeasplitDataSet.ttblvaeasplitdataRow)ttblvaeasplitdataCriteria);

            string cErrorMessage = string.Empty;


            NLogLoggerP.Trace("VAEASplitSave - Asvaentry - Before Call");
            StopwatchUtil.Time(
                () =>
            {
                using (var poAsvaentryproxy = this.proxyAppObject.CreatePO_asvaentryproxy())
                {
                    this.SetRequiredContextParameters();
                    poAsvaentryproxy.VAEASplitSave(ref pdsContext, pdsvaeasplit, out pdsmessaging, out cErrorMessage);
                }
            });
            NLogLoggerP.Info("VAEASplitSave - Asvaentry - After Call");


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

            foreach (DataRow row in pdsmessaging.ttblmessaging)
            {
                results.Add(Messaging.BuildMessagingFromRow(row));
            }
            return(results);
        }