Exemplo n.º 1
0
        public RepairOrderChangeResponse RepairOrderChange(RepairOrderChangeRequest request)
        {
            RepairOrderChangeResponse response = new RepairOrderChangeResponse();

            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.RepairOrderChange);
                if (response.Errors != null)
                {
                    response.TransactionHeader = request.TransactionHeader;
                    return response;
                }

                using (RepairOrder_Biz biz = new RepairOrder_Biz())
                {
                    response = biz.RepairOrderChange(request);
                }
            }
            catch (Exception ex)
            {
                response.Errors = GetErrorDataListFromException(ex);
                WA.Standard.IF.Logger.Log.Log.RootLogger.ErrorFormat("RepairOrderChangeResponse Error {0}: ", ex);
            }

            return response;
        }
Exemplo n.º 2
0
        public RepairOrderChangeResponse RepairOrderChange(RepairOrderChangeRequest request)
        {
            RepairOrderChangeResponse response = new RepairOrderChangeResponse();

            try
            {
                WA.Standard.IF.Logger.Log.Log.SaveXMLLog(0, request.TransactionHeader.DealerID, "WA RepairOrderChangeRequest 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.RepairOrderChange);
                if (response.Errors != null)
                {
                    response.TransactionHeader = request.TransactionHeader;
                }

                if (response.Errors == null)
                {
                    using (RepairOrder_Biz biz = new RepairOrder_Biz())
                    {
                        response = biz.RepairOrderChange(request);
                    }

                    WA.Standard.IF.Logger.Log.Log.SaveXMLLog(0, request.TransactionHeader.DealerID, "WA RepairOrderChangeResponse XML", response);
                }
            }
            catch (Exception ex)
            {
                response.Errors = GetErrorDataListFromException(ex);
                WA.Standard.IF.Logger.Log.Log.SaveErrorLog(null, "RepairOrderChange", request, ex.Message, ex);
            }

            return response;
        }