public AswtlineWTLineUpdateResponseAPI WTLineUpdate(AswtlineWTLineUpdateRequestAPI AswtlineWTLineUpdateRequestAPI) { var result = new AswtlineWTLineUpdateResponseAPI(); var pdswtline = new pdswtlineDataSet(); var pdsmessaging = new pdsmessagingDataSet(); string cErrorMessage = string.Empty; string cUpdateMessage = string.Empty; DataRow ttblwtlineRow = pdswtline.ttblwtline.NewttblwtlineRow(); Wtline.UpdateRowFromWtline(ref ttblwtlineRow, AswtlineWTLineUpdateRequestAPI.wtline); pdswtline.ttblwtline.AddttblwtlineRow((pdswtlineDataSet.ttblwtlineRow)ttblwtlineRow); foreach (var obj in AswtlineWTLineUpdateRequestAPI.wtlnties) { DataRow ttblwtlntiesRow = pdswtline.ttblwtlnties.NewttblwtlntiesRow(); Wtlnties.UpdateRowFromWtlnties(ref ttblwtlntiesRow, obj); pdswtline.ttblwtlnties.AddttblwtlntiesRow((pdswtlineDataSet.ttblwtlntiesRow)ttblwtlntiesRow); } var lMaintMode = AswtlineWTLineUpdateRequestAPI.lMaintMode; var cChangeList = AswtlineWTLineUpdateRequestAPI.cChangeList; NLogLoggerP.Trace("WTLineUpdate - Aswtline - Before Call"); StopwatchUtil.Time( () => { using (var poAswtlineproxy = this.proxyAppObject.CreatePO_aswtlineproxy()) { this.SetRequiredContextParameters(); poAswtlineproxy.WTLineUpdate(ref pdsContext, lMaintMode, cChangeList, ref pdswtline, out pdsmessaging, out cErrorMessage, out cUpdateMessage); } }); NLogLoggerP.Info("WTLineUpdate - Aswtline - After Call"); this.ReportErrors(cErrorMessage); this.ReportErrors(this.pdsContext); this.ReportErrors(pdswtline); foreach (DataRow row in pdsmessaging.ttblmessaging) { result.messaging.Add(Messaging.BuildMessagingFromRow(row)); } if (pdswtline.ttblwtline.Count > 0) { result.wtline = Wtline.BuildWtlineFromRow(pdswtline.ttblwtline[0]); } result.cUpdateMessage = cUpdateMessage; return(result); }
public AswtlineWTLineRetrieveResponseAPI WTLineRetrieve(Wtlineretrievecriteria wtlineretrievecriteria) { var result = new AswtlineWTLineRetrieveResponseAPI(); var pdswtlineretrieve = new pdswtlineretrieveDataSet(); var pdswtline = new pdswtlineDataSet(); var pdsmessaging = new pdsmessagingDataSet(); DataRow ttblwtlineretrievecriteriaCriteria = pdswtlineretrieve.ttblwtlineretrievecriteria.NewttblwtlineretrievecriteriaRow(); Wtlineretrievecriteria.UpdateRowFromWtlineretrievecriteria(ref ttblwtlineretrievecriteriaCriteria, wtlineretrievecriteria); pdswtlineretrieve.ttblwtlineretrievecriteria.AddttblwtlineretrievecriteriaRow((pdswtlineretrieveDataSet.ttblwtlineretrievecriteriaRow)ttblwtlineretrievecriteriaCriteria); string cErrorMessage = string.Empty; string cUpdateMessage = string.Empty; NLogLoggerP.Trace("WTLineRetrieve - Aswtline - Before Call"); StopwatchUtil.Time( () => { using (var poAswtlineproxy = this.proxyAppObject.CreatePO_aswtlineproxy()) { this.SetRequiredContextParameters(); poAswtlineproxy.WTLineRetrieve(ref pdsContext, pdswtlineretrieve, out pdswtline, out pdsmessaging, out cErrorMessage, out cUpdateMessage); } }); NLogLoggerP.Info("WTLineRetrieve - Aswtline - After Call"); this.ReportErrors(cErrorMessage); this.ReportErrors(this.pdsContext); this.ReportErrors(pdswtlineretrieve); foreach (DataRow row in pdsmessaging.ttblmessaging) { result.messaging.Add(Messaging.BuildMessagingFromRow(row)); } if (pdswtline.ttblwtline.Count > 0) { result.wtline = Wtline.BuildWtlineFromRow(pdswtline.ttblwtline[0]); } foreach (DataRow row in pdswtline.ttblwtlnties) { result.wtlnties.Add(Wtlnties.BuildWtlntiesFromRow(row)); } result.cUpdateMessage = cUpdateMessage; return(result); }