public PrintResponse PrintRequest(PrintRequest request) { PrintResponse response = new PrintResponse(); try { //Request body-header object validation response.Errors = GetErrorDataListFromRequestTransactionHeader(request.TransactionHeader); if (response.Errors != null) { response.TransactionHeader = new Data.v2.Common.Common.TransactionHeader(); return response; } response.Errors = GetErrorDataListFromRequest(request.Print); if (response.Errors != null) { response.TransactionHeader = request.TransactionHeader; return response; } using (Print_Biz biz = new Print_Biz()) { response = biz.PrintRequest(request); } } catch (Exception ex) { response.Errors = GetErrorDataListFromException(ex); WA.Standard.IF.Logger.Log.Log.RootLogger.ErrorFormat("PrintResponse Error {0}: ", ex); } return response; }
public PrintResponse PrintRequest(PrintRequest request) { PrintResponse response = new PrintResponse(); try { WA.Standard.IF.Logger.Log.Log.SaveXMLLog(0, request.TransactionHeader.DealerID, "WA PrintRequest XML", request); //Request body-header object validation response.Errors = GetErrorDataListFromRequestTransactionHeader(request.TransactionHeader); if (response.Errors != null) { response.TransactionHeader = new Data.v2.Common.Common.TransactionHeader(); } response.Errors = GetErrorDataListFromRequest(request.Print); if (response.Errors != null) { response.TransactionHeader = request.TransactionHeader; } if (response.Errors == null) { using (Print_Biz biz = new Print_Biz()) { response = biz.PrintRequest(request); } WA.Standard.IF.Logger.Log.Log.SaveXMLLog(0, request.TransactionHeader.DealerID, "WA PrintResponse XML", response); } } catch (Exception ex) { response.Errors = GetErrorDataListFromException(ex); WA.Standard.IF.Logger.Log.Log.SaveErrorLog(null, "PrintRequest", request, ex.Message, ex); } return response; }