Beispiel #1
0
        public AspolinePOCoreAllocationUpdateResponseAPI POCoreAllocationUpdate(AspolinePOCoreAllocationUpdateRequestAPI AspolinePOCoreAllocationUpdateRequestAPI)
        {
            var result = new AspolinePOCoreAllocationUpdateResponseAPI();

            var pdspocoreallocation = new pdspocoreallocationDataSet();

            var pdspocoreallocationupdate = new pdspocoreallocationupdateDataSet();

            var pdsmessaging = new pdsmessagingDataSet();

            string cErrorMessage = string.Empty;

            DataRow ttblpocoreallocationcriteriaRow = pdspocoreallocation.ttblpocoreallocationcriteria.NewttblpocoreallocationcriteriaRow();

            Pocoreallocationcriteria.UpdateRowFromPocoreallocationcriteria(ref ttblpocoreallocationcriteriaRow, AspolinePOCoreAllocationUpdateRequestAPI.pocoreallocationcriteria);
            pdspocoreallocation.ttblpocoreallocationcriteria.AddttblpocoreallocationcriteriaRow((pdspocoreallocationDataSet.ttblpocoreallocationcriteriaRow)ttblpocoreallocationcriteriaRow);

            foreach (var obj in AspolinePOCoreAllocationUpdateRequestAPI.pocoreallocationresults)
            {
                DataRow ttblpocoreallocationresultsRow = pdspocoreallocation.ttblpocoreallocationresults.NewttblpocoreallocationresultsRow();
                Pocoreallocationresults.UpdateRowFromPocoreallocationresults(ref ttblpocoreallocationresultsRow, obj);
                pdspocoreallocation.ttblpocoreallocationresults.AddttblpocoreallocationresultsRow((pdspocoreallocationDataSet.ttblpocoreallocationresultsRow)ttblpocoreallocationresultsRow);
            }

            DataRow ttblpocoreallocationsingleRow = pdspocoreallocation.ttblpocoreallocationsingle.NewttblpocoreallocationsingleRow();

            Pocoreallocationsingle.UpdateRowFromPocoreallocationsingle(ref ttblpocoreallocationsingleRow, AspolinePOCoreAllocationUpdateRequestAPI.pocoreallocationsingle);
            pdspocoreallocation.ttblpocoreallocationsingle.AddttblpocoreallocationsingleRow((pdspocoreallocationDataSet.ttblpocoreallocationsingleRow)ttblpocoreallocationsingleRow);


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


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

            foreach (DataRow row in pdsmessaging.ttblmessaging)
            {
                result.messaging.Add(Messaging.BuildMessagingFromRow(row));
            }
            if (pdspocoreallocationupdate.ttblpocoreallocationupdate.Count > 0)
            {
                result.pocoreallocationupdate = Pocoreallocationupdate.BuildPocoreallocationupdateFromRow(pdspocoreallocationupdate.ttblpocoreallocationupdate[0]);
            }


            return(result);
        }
Beispiel #2
0
 public AspolinePOCoreAllocationLoadResponseAPI POCoreAllocationLoad(Pocoreallocationcriteria pocoreallocationcriteria)
 {
     return(this.repository.POCoreAllocationLoad(pocoreallocationcriteria));
 }