public AswtheaderWTImportLoadResponseAPI WTImportLoad(AswtheaderWTImportLoadRequestAPI AswtheaderWTImportLoadRequestAPI) { var result = new AswtheaderWTImportLoadResponseAPI(); var pdswtimportfile = new pdswtimportfileDataSet(); var pdswtimportdata = new pdswtimportdataDataSet(); var pdsmessaging = new pdsmessagingDataSet(); string cErrorMessage = string.Empty; foreach (var obj in AswtheaderWTImportLoadRequestAPI.wtimportfile) { DataRow ttblwtimportfileRow = pdswtimportfile.ttblwtimportfile.NewttblwtimportfileRow(); Wtimportfile.UpdateRowFromWtimportfile(ref ttblwtimportfileRow, obj); pdswtimportfile.ttblwtimportfile.AddttblwtimportfileRow((pdswtimportfileDataSet.ttblwtimportfileRow)ttblwtimportfileRow); } var iMaxLines = AswtheaderWTImportLoadRequestAPI.iMaxLines; NLogLoggerP.Trace("WTImportLoad - Aswtheader - Before Call"); StopwatchUtil.Time( () => { using (var poAswtheaderproxy = this.proxyAppObject.CreatePO_aswtheaderproxy()) { this.SetRequiredContextParameters(); poAswtheaderproxy.WTImportLoad(ref pdsContext, iMaxLines, pdswtimportfile, out pdswtimportdata, out pdsmessaging, out cErrorMessage); } }); NLogLoggerP.Info("WTImportLoad - Aswtheader - After Call"); this.ReportErrors(cErrorMessage); this.ReportErrors(this.pdsContext); this.ReportErrors(pdswtimportfile); foreach (DataRow row in pdsmessaging.ttblmessaging) { result.messaging.Add(Messaging.BuildMessagingFromRow(row)); } foreach (DataRow row in pdswtimportdata.ttblwtimportdata) { result.wtimportdata.Add(Wtimportdata.BuildWtimportdataFromRow(row)); } return(result); }
public AswtheaderWTImportValidateResponseAPI WTImportValidate(IEnumerable <Wtimportdata> wtimportdata) { var result = new AswtheaderWTImportValidateResponseAPI(); var pdswtimportdata = new pdswtimportdataDataSet(); var pdsmessaging = new pdsmessagingDataSet(); foreach (var obj in wtimportdata) { DataRow row = pdswtimportdata.ttblwtimportdata.NewttblwtimportdataRow(); Wtimportdata.UpdateRowFromWtimportdata(ref row, obj); pdswtimportdata.ttblwtimportdata.AddttblwtimportdataRow((pdswtimportdataDataSet.ttblwtimportdataRow)row); } string cErrorMessage = string.Empty; NLogLoggerP.Trace("WTImportValidate - Aswtheader - Before Call"); StopwatchUtil.Time( () => { using (var poAswtheaderproxy = this.proxyAppObject.CreatePO_aswtheaderproxy()) { this.SetRequiredContextParameters(); poAswtheaderproxy.WTImportValidate(ref pdsContext, ref pdswtimportdata, out pdsmessaging, out cErrorMessage); } }); NLogLoggerP.Info("WTImportValidate - Aswtheader - After Call"); this.ReportErrors(cErrorMessage); this.ReportErrors(this.pdsContext); this.ReportErrors(pdswtimportdata); foreach (DataRow row in pdsmessaging.ttblmessaging) { result.messaging.Add(Messaging.BuildMessagingFromRow(row)); } foreach (DataRow row in pdswtimportdata.ttblwtimportdata) { result.wtimportdata.Add(Wtimportdata.BuildWtimportdataFromRow(row)); } return(result); }