示例#1
0
        public OPCodeGetResponse OPCodeGet(OPCodeGetRequest request)
        {
            OPCodeGetResponse response = new OPCodeGetResponse();

            //DMS information set by dealer information
            string proxypath = string.Format("{0}.{1}.{2}.{3}",
                request.TransactionHeader.DocumentVersion,
                request.TransactionHeader.DistributorID,
                request.TransactionHeader.DMSCode,
                request.TransactionHeader.DMSVersion);

            switch (proxypath)
            {
                case "v2.Common.WA.v2":
                    {
                        #region v2.Common.WA.v2 - Standard (Proxy Class Dll Name : _WA.Mapper.v2)

                        #region OPCodeGet Request Set

                        //Create proxy credential
                        NetworkCredential proxycredential = new NetworkCredential(request.TransactionHeader.Username, request.TransactionHeader.Password);

                        //Create proxy web service from dms web service with credential
                        _WA.Mapper.v2.OPCode.OPCode proxyws = new _WA.Mapper.v2.OPCode.OPCode(request.TransactionHeader.DMSServerUrl);
                        proxyws.Credentials = proxycredential;

                        //Create proxy request with opcodeget and transaction
                        _WA.Mapper.v2.OPCode.OPCodeGetRequest proxyrequest = new _WA.Mapper.v2.OPCode.OPCodeGetRequest();

                        //Create proxy transaction
                        _WA.Mapper.v2.OPCode.TransactionHeader proxytransactionheader = new _WA.Mapper.v2.OPCode.TransactionHeader();
                        if (request.TransactionHeader != null)
                        {
                            #region//TransactionHeader Set
                            proxytransactionheader.CountryID = request.TransactionHeader.CountryID;
                            proxytransactionheader.DealerID = request.TransactionHeader.DealerID;
                            proxytransactionheader.DistributorID = request.TransactionHeader.DistributorID;
                            proxytransactionheader.DMSCode = request.TransactionHeader.DMSCode;
                            proxytransactionheader.DMSServerUrl = request.TransactionHeader.DMSServerUrl;
                            proxytransactionheader.DMSVersion = request.TransactionHeader.DMSVersion;
                            proxytransactionheader.DocumentVersion = request.TransactionHeader.DocumentVersion;
                            proxytransactionheader.GroupID = request.TransactionHeader.GroupID;
                            proxytransactionheader.IneterfaceID = request.TransactionHeader.IneterfaceID;
                            proxytransactionheader.Password = request.TransactionHeader.Password;
                            proxytransactionheader.PollingToken = request.TransactionHeader.PollingToken;
                            proxytransactionheader.RequestPollingToken = request.TransactionHeader.RequestPollingToken;
                            proxytransactionheader.RequestType = request.TransactionHeader.RequestType;
                            proxytransactionheader.TransactionId = request.TransactionHeader.TransactionId;
                            proxytransactionheader.TransactionDateTimeLocal = request.TransactionHeader.TransactionDateTimeLocal;
                            proxytransactionheader.TransactionDateTimeUTC = request.TransactionHeader.TransactionDateTimeUTC;
                            proxytransactionheader.TransactionType = request.TransactionHeader.TransactionType;
                            proxytransactionheader.Username = request.TransactionHeader.Username;
                            proxytransactionheader.VenderTrackingCode = request.TransactionHeader.VenderTrackingCode;
                            proxyrequest.TransactionHeader = proxytransactionheader;
                            #endregion
                        }

                        //Create proxy opcodeget
                        _WA.Mapper.v2.OPCode.OPCodeGet proxyopcodeget = new _WA.Mapper.v2.OPCode.OPCodeGet();
                        if (request.OPCodeGet != null)
                        {
                            #region//OPCodeGet Set
                            proxyopcodeget.Category = request.OPCodeGet.Category;
                            proxyopcodeget.Code = request.OPCodeGet.Code;
                            proxyopcodeget.Description = request.OPCodeGet.Description;
                            proxyopcodeget.Engine = request.OPCodeGet.Engine;
                            proxyopcodeget.Make = request.OPCodeGet.Make;
                            proxyopcodeget.Mileage = request.OPCodeGet.Mileage;
                            proxyopcodeget.Model = request.OPCodeGet.Model;
                            proxyopcodeget.Year = request.OPCodeGet.Year;
                            proxyrequest.OPCodeGet = proxyopcodeget;
                            #endregion
                        }
                        #endregion

                        //Run proxy web method with proxy request
                        _WA.Mapper.v2.OPCode.OPCodeGetResponse proxyresponse = proxyws.OPCodeGet(proxyrequest);

                        //Mapping with Standard Interface Specification Object
                        if (proxyresponse != null)
                        {
                            if (proxyresponse.TransactionHeader != null)
                            {
                                #region//TransactionHeader Set
                                TransactionHeader transactionheader = new TransactionHeader();
                                transactionheader.CountryID = proxyresponse.TransactionHeader.CountryID;
                                transactionheader.DealerID = proxyresponse.TransactionHeader.DealerID;
                                transactionheader.DistributorID = proxyresponse.TransactionHeader.DistributorID;
                                transactionheader.DMSCode = proxyresponse.TransactionHeader.DMSCode;
                                transactionheader.DMSServerUrl = proxyresponse.TransactionHeader.DMSServerUrl;
                                transactionheader.DMSVersion = proxyresponse.TransactionHeader.DMSVersion;
                                transactionheader.DocumentVersion = proxyresponse.TransactionHeader.DocumentVersion;
                                transactionheader.GroupID = proxyresponse.TransactionHeader.GroupID;
                                transactionheader.IneterfaceID = proxyresponse.TransactionHeader.IneterfaceID;
                                transactionheader.Password = proxyresponse.TransactionHeader.Password;
                                transactionheader.PollingToken = proxyresponse.TransactionHeader.PollingToken;
                                transactionheader.RequestPollingToken = proxyresponse.TransactionHeader.RequestPollingToken;
                                transactionheader.RequestType = proxyresponse.TransactionHeader.RequestType;
                                transactionheader.TransactionId = proxyresponse.TransactionHeader.TransactionId;
                                transactionheader.TransactionDateTimeLocal = proxyresponse.TransactionHeader.TransactionDateTimeLocal;
                                transactionheader.TransactionDateTimeUTC = proxyresponse.TransactionHeader.TransactionDateTimeUTC;
                                transactionheader.TransactionType = proxyresponse.TransactionHeader.TransactionType;
                                transactionheader.Username = proxyresponse.TransactionHeader.Username;
                                transactionheader.VenderTrackingCode = proxyresponse.TransactionHeader.VenderTrackingCode;
                                response.TransactionHeader = transactionheader;
                                #endregion
                            }

                            //ResultMessage Set
                            if (proxyresponse.ResultMessage != null)
                            {
                                response.ResultMessage = GetResultMessageData(proxyresponse.ResultMessage.Code, proxyresponse.ResultMessage.Message);
                            }

                            if (proxyresponse.Errors != null)
                            {
                                //Error List Set
                                foreach (_WA.Mapper.v2.OPCode.Error proxyerror in proxyresponse.Errors)
                                {
                                    if (response.Errors != null)
                                        response.Errors.Add(GetErrorData(proxyerror.Code, proxyerror.Message));
                                    else
                                        response.Errors = GetErrorDataList(proxyerror.Code, proxyerror.Message);
                                }
                            }
                            else
                            {
                                #region //OPCodeGetResponse Set

                                if (proxyresponse.OPCodes != null && proxyresponse.OPCodes.Length > 0)
                                {
                                    response.OPCodes = new List<Data.v2.Common.OPCode.OPCode>();
                                    foreach (_WA.Mapper.v2.OPCode.OPCode1 proxyopcode in proxyresponse.OPCodes)
                                    {
                                        #region //OPCode Header
                                        Data.v2.Common.OPCode.OPCode opcode = new Data.v2.Common.OPCode.OPCode();
                                        opcode.Code = proxyopcode.Code;
                                        opcode.CorrectionLOP = proxyopcode.CorrectionLOP;
                                        opcode.CPSIND = proxyopcode.CPSIND;
                                        opcode.DefLinePaymentMethod = proxyopcode.DefLinePaymentMethod;
                                        opcode.Description = proxyopcode.Description;
                                        opcode.DisplayOPCode = proxyopcode.DisplayOPCode;
                                        opcode.DisplayOPDescription = proxyopcode.DisplayOPDescription;
                                        opcode.Engine = proxyopcode.Engine;
                                        opcode.EstimatedHours = proxyopcode.EstimatedHours;
                                        opcode.HazardMaterialCharge = proxyopcode.HazardMaterialCharge;
                                        opcode.Make = proxyopcode.Make;
                                        opcode.Mileage = proxyopcode.Mileage;
                                        opcode.Model = proxyopcode.Model;
                                        opcode.Period = proxyopcode.Period;
                                        opcode.PredefinedCauseDescription = proxyopcode.PredefinedCauseDescription;
                                        opcode.SkillLevel = proxyopcode.SkillLevel;
                                        opcode.Year = proxyopcode.Year;
                                        #endregion

                                        #region //OPCode PriceType
                                        if (proxyopcode.PriceType != null)
                                        {
                                            PriceType pricetype = new PriceType();
                                            pricetype.DiscountPrice = proxyopcode.PriceType.DiscountPrice;
                                            pricetype.DiscountRate = proxyopcode.PriceType.DiscountRate;
                                            pricetype.TotalPrice = proxyopcode.PriceType.TotalPrice;
                                            pricetype.TotalPriceIncludeTax = proxyopcode.PriceType.TotalPriceIncludeTax;
                                            pricetype.UnitPrice = proxyopcode.PriceType.UnitPrice;
                                            opcode.PriceType = pricetype;
                                        }
                                        #endregion

                                        #region //OPCode Parts
                                        if (proxyopcode.Parts != null && proxyopcode.Parts.Length > 0)
                                        {
                                            opcode.Parts = new List<Data.v2.Common.Part.Part>();
                                            foreach (_WA.Mapper.v2.OPCode.Part proxypart in proxyopcode.Parts)
                                            {
                                                #region //OPCode Part Header
                                                Data.v2.Common.Part.Part part = new Data.v2.Common.Part.Part();
                                                part.DisplayPartNumber = proxypart.DisplayPartNumber;
                                                part.PartDescription = proxypart.PartDescription;
                                                part.PartNumber = proxypart.PartNumber;
                                                part.PartType = proxypart.PartType;
                                                part.Quantity = proxypart.Quantity;
                                                part.ServiceType = proxypart.ServiceType;
                                                part.StockQuantity = proxypart.StockQuantity;
                                                part.StockStatus = proxypart.StockStatus;
                                                part.UnitOfMeasure = proxypart.UnitOfMeasure;
                                                #endregion

                                                #region //OPCode Part PriceType
                                                if (proxypart.PriceType != null)
                                                {
                                                    PriceType pricetype = new PriceType();
                                                    pricetype.DiscountPrice = proxypart.PriceType.DiscountPrice;
                                                    pricetype.DiscountRate = proxypart.PriceType.DiscountRate;
                                                    pricetype.TotalPrice = proxypart.PriceType.TotalPrice;
                                                    pricetype.TotalPriceIncludeTax = proxypart.PriceType.TotalPriceIncludeTax;
                                                    pricetype.UnitPrice = proxypart.PriceType.UnitPrice;
                                                    part.PriceType = pricetype;
                                                }
                                                #endregion

                                                opcode.Parts.Add(part);
                                            }
                                        }
                                        #endregion

                                        response.OPCodes.Add(opcode);
                                    }
                                }
                                else
                                {
                                    response.ResultMessage = GetResultMessageData(ResponseCode.NoResult, ResponseMessage.NoResult);
                                }
                                #endregion
                            }
                        }
                        else
                        {
                            if (response.Errors != null)
                                response.Errors.Add(GetErrorData(ResponseCode.Fail, ResponseMessage.Fail));
                            else
                                response.Errors = GetErrorDataList(ResponseCode.Fail, ResponseMessage.Fail);
                        }
                        #endregion
                    }
                    break;
                case "v2.HMCIS.1C.v4":
                    {
                        #region v2.HMCIS.1C.v4 - RTR (Proxy Class Dll Name : _1C.v4)

                        #region OPCodeGet Request Set

                        //Create proxy credential
                        NetworkCredential proxycredential = new NetworkCredential(request.TransactionHeader.Username, request.TransactionHeader.Password);

                        //Create proxy web service from dms web service with credential
                        _1C.v4.OPCode.OPCode proxyws = new _1C.v4.OPCode.OPCode(request.TransactionHeader.DMSServerUrl);
                        proxyws.Credentials = proxycredential;

                        //Create proxy request with opcodeget and transaction
                        _1C.v4.OPCode.OPCodeGetRequest proxyrequest = new _1C.v4.OPCode.OPCodeGetRequest();

                        //Create proxy transaction
                        _1C.v4.OPCode.TransactionHeader proxytransactionheader = new _1C.v4.OPCode.TransactionHeader();
                        if (request.TransactionHeader != null)
                        {
                            #region//TransactionHeader Set
                            proxytransactionheader.CountryID = request.TransactionHeader.CountryID;
                            proxytransactionheader.DealerID = request.TransactionHeader.DealerID;
                            proxytransactionheader.DistributorID = request.TransactionHeader.DistributorID;
                            proxytransactionheader.DMSCode = request.TransactionHeader.DMSCode;
                            proxytransactionheader.DMSServerUrl = request.TransactionHeader.DMSServerUrl;
                            proxytransactionheader.DMSVersion = request.TransactionHeader.DMSVersion;
                            proxytransactionheader.DocumentVersion = request.TransactionHeader.DocumentVersion;
                            proxytransactionheader.GroupID = request.TransactionHeader.GroupID;
                            proxytransactionheader.IneterfaceID = request.TransactionHeader.IneterfaceID;
                            proxytransactionheader.Password = request.TransactionHeader.Password;
                            proxytransactionheader.PollingToken = request.TransactionHeader.PollingToken;
                            proxytransactionheader.RequestPollingToken = request.TransactionHeader.RequestPollingToken;
                            proxytransactionheader.RequestType = request.TransactionHeader.RequestType;
                            proxytransactionheader.TransactionId = request.TransactionHeader.TransactionId;
                            proxytransactionheader.TransactionDateTimeLocal = request.TransactionHeader.TransactionDateTimeLocal;
                            proxytransactionheader.TransactionDateTimeUTC = request.TransactionHeader.TransactionDateTimeUTC;
                            proxytransactionheader.TransactionType = request.TransactionHeader.TransactionType;
                            proxytransactionheader.Username = request.TransactionHeader.Username;
                            proxytransactionheader.VenderTrackingCode = request.TransactionHeader.VenderTrackingCode;
                            proxyrequest.TransactionHeader = proxytransactionheader;
                            #endregion
                        }

                        //Create proxy opcodeget
                        _1C.v4.OPCode.OPCodeGet proxyopcodeget = new _1C.v4.OPCode.OPCodeGet();
                        if (request.OPCodeGet != null)
                        {
                            #region//OPCodeGet Set
                            proxyopcodeget.Category = request.OPCodeGet.Category;
                            proxyopcodeget.Code = request.OPCodeGet.Code;
                            proxyopcodeget.Description = request.OPCodeGet.Description;
                            proxyopcodeget.Engine = request.OPCodeGet.Engine;
                            proxyopcodeget.Make = request.OPCodeGet.Make;
                            proxyopcodeget.Mileage = request.OPCodeGet.Mileage;
                            proxyopcodeget.Model = request.OPCodeGet.Model;
                            proxyopcodeget.Year = request.OPCodeGet.Year;
                            proxyrequest.OPCodeGet = proxyopcodeget;
                            #endregion
                        }
                        #endregion

                        //Run proxy web method with proxy request
                        _1C.v4.OPCode.OPCodeGetResponse proxyresponse = proxyws.OPCodeGet(proxyrequest);

                        //Mapping with Standard Interface Specification Object
                        if (proxyresponse != null)
                        {
                            //ResultMessage Set
                            if (proxyresponse.ResultMessage != null)
                            {
                                response.ResultMessage = GetResultMessageData(proxyresponse.ResultMessage.Code, proxyresponse.ResultMessage.Message);
                            }

                            if (proxyresponse.Errors != null)
                            {
                                //Error List Set
                                foreach (_1C.v4.OPCode.Error proxyerror in proxyresponse.Errors)
                                {
                                    if (response.Errors != null)
                                        response.Errors.Add(GetErrorData(proxyerror.Code, proxyerror.Message));
                                    else
                                        response.Errors = GetErrorDataList(proxyerror.Code, proxyerror.Message);
                                }
                            }
                            else
                            {
                                #region //OPCodeGetResponse Set

                                if (proxyresponse.TransactionHeader != null)
                                {
                                    #region//TransactionHeader Set
                                    TransactionHeader transactionheader = new TransactionHeader();
                                    transactionheader.CountryID = proxyresponse.TransactionHeader.CountryID;
                                    transactionheader.DealerID = proxyresponse.TransactionHeader.DealerID;
                                    transactionheader.DistributorID = proxyresponse.TransactionHeader.DistributorID;
                                    transactionheader.DMSCode = proxyresponse.TransactionHeader.DMSCode;
                                    transactionheader.DMSServerUrl = proxyresponse.TransactionHeader.DMSServerUrl;
                                    transactionheader.DMSVersion = proxyresponse.TransactionHeader.DMSVersion;
                                    transactionheader.DocumentVersion = proxyresponse.TransactionHeader.DocumentVersion;
                                    transactionheader.GroupID = proxyresponse.TransactionHeader.GroupID;
                                    transactionheader.IneterfaceID = proxyresponse.TransactionHeader.IneterfaceID;
                                    transactionheader.Password = proxyresponse.TransactionHeader.Password;
                                    transactionheader.PollingToken = proxyresponse.TransactionHeader.PollingToken;
                                    transactionheader.RequestPollingToken = proxyresponse.TransactionHeader.RequestPollingToken;
                                    transactionheader.RequestType = proxyresponse.TransactionHeader.RequestType;
                                    transactionheader.TransactionId = proxyresponse.TransactionHeader.TransactionId;
                                    transactionheader.TransactionDateTimeLocal = proxyresponse.TransactionHeader.TransactionDateTimeLocal;
                                    transactionheader.TransactionDateTimeUTC = proxyresponse.TransactionHeader.TransactionDateTimeUTC;
                                    transactionheader.TransactionType = proxyresponse.TransactionHeader.TransactionType;
                                    transactionheader.Username = proxyresponse.TransactionHeader.Username;
                                    transactionheader.VenderTrackingCode = proxyresponse.TransactionHeader.VenderTrackingCode;
                                    response.TransactionHeader = transactionheader;
                                    #endregion
                                }

                                if (proxyresponse.OPCodes != null && proxyresponse.OPCodes.Length > 0)
                                {
                                    response.OPCodes = new List<Data.v2.Common.OPCode.OPCode>();
                                    foreach (_1C.v4.OPCode.OPCode1 proxyopcode in proxyresponse.OPCodes)
                                    {
                                        #region //OPCode Header
                                        Data.v2.Common.OPCode.OPCode opcode = new Data.v2.Common.OPCode.OPCode();
                                        opcode.Code = proxyopcode.Code;
                                        opcode.CorrectionLOP = proxyopcode.CorrectionLOP;
                                        opcode.CPSIND = proxyopcode.CPSIND;
                                        opcode.DefLinePaymentMethod = proxyopcode.DefLinePaymentMethod;
                                        opcode.Description = proxyopcode.Description;
                                        opcode.DisplayOPCode = proxyopcode.DisplayOPCode;
                                        opcode.DisplayOPDescription = proxyopcode.DisplayOPDescription;
                                        opcode.Engine = proxyopcode.Engine;
                                        opcode.EstimatedHours = proxyopcode.EstimatedHours;
                                        opcode.HazardMaterialCharge = proxyopcode.HazardMaterialCharge;
                                        opcode.Make = proxyopcode.Make;
                                        opcode.Mileage = proxyopcode.Mileage;
                                        opcode.Model = proxyopcode.Model;
                                        opcode.Period = proxyopcode.Period;
                                        opcode.PredefinedCauseDescription = proxyopcode.PredefinedCauseDescription;
                                        opcode.SkillLevel = proxyopcode.SkillLevel;
                                        opcode.Year = proxyopcode.Year;
                                        #endregion

                                        #region //OPCode PriceType
                                        if (proxyopcode.PriceType != null)
                                        {
                                            PriceType pricetype = new PriceType();
                                            pricetype.DiscountPrice = proxyopcode.PriceType.DiscountPrice;
                                            pricetype.DiscountRate = proxyopcode.PriceType.DiscountRate;
                                            pricetype.TotalPrice = proxyopcode.PriceType.TotalPrice;
                                            pricetype.TotalPriceIncludeTax = proxyopcode.PriceType.TotalPriceIncludeTax;
                                            pricetype.UnitPrice = proxyopcode.PriceType.UnitPrice;
                                            opcode.PriceType = pricetype;
                                        }
                                        #endregion

                                        #region //OPCode Parts
                                        if (proxyopcode.Parts != null && proxyopcode.Parts.Length > 0)
                                        {
                                            opcode.Parts = new List<Data.v2.Common.Part.Part>();
                                            foreach (_1C.v4.OPCode.Part proxypart in proxyopcode.Parts)
                                            {
                                                #region //OPCode Part Header
                                                Data.v2.Common.Part.Part part = new Data.v2.Common.Part.Part();
                                                part.DisplayPartNumber = proxypart.DisplayPartNumber;
                                                part.PartDescription = proxypart.PartDescription;
                                                part.PartNumber = proxypart.PartNumber;
                                                part.PartType = proxypart.PartType;
                                                part.Quantity = proxypart.Quantity;
                                                part.ServiceType = proxypart.ServiceType;
                                                part.StockQuantity = proxypart.StockQuantity;
                                                part.StockStatus = proxypart.StockStatus;
                                                part.UnitOfMeasure = proxypart.UnitOfMeasure;
                                                #endregion

                                                #region //OPCode Part PriceType
                                                if (proxypart.PriceType != null)
                                                {
                                                    PriceType pricetype = new PriceType();
                                                    pricetype.DiscountPrice = proxypart.PriceType.DiscountPrice;
                                                    pricetype.DiscountRate = proxypart.PriceType.DiscountRate;
                                                    pricetype.TotalPrice = proxypart.PriceType.TotalPrice;
                                                    pricetype.TotalPriceIncludeTax = proxypart.PriceType.TotalPriceIncludeTax;
                                                    pricetype.UnitPrice = proxypart.PriceType.UnitPrice;
                                                    part.PriceType = pricetype;
                                                }
                                                #endregion

                                                opcode.Parts.Add(part);
                                            }
                                        }
                                        #endregion

                                        response.OPCodes.Add(opcode);
                                    }
                                }
                                else
                                {
                                    response.ResultMessage = GetResultMessageData(ResponseCode.NoResult, ResponseMessage.NoResult);
                                }
                                #endregion
                            }
                        }
                        else
                        {
                            if (response.Errors != null)
                                response.Errors.Add(GetErrorData(ResponseCode.Fail, ResponseMessage.Fail));
                            else
                                response.Errors = GetErrorDataList(ResponseCode.Fail, ResponseMessage.Fail);
                        }
                        #endregion
                    }
                    break;
                default: response.Errors = new List<Error>() { new Error() { Code = ResponseCode.NoMatchedProxy, Message = ResponseMessage.NoMatchedProxy } };
                    break;
            }

            return response;
        }
示例#2
0
        public MessageSendResponse MessageSend(MessageSendRequest request)
        {
            MessageSendResponse response = new MessageSendResponse();

            //DMS information set by dealer information
            string proxypath = string.Format("{0}.{1}.{2}.{3}",
                request.TransactionHeader.DocumentVersion,
                request.TransactionHeader.DistributorID,
                request.TransactionHeader.DMSCode,
                request.TransactionHeader.DMSVersion);

            switch (proxypath)
            {
                case "v2.Common.WA.v2":
                    {
                        #region v2.Common.WA.v2 - Standard (Proxy Class Dll Name : _WA.Mapper.v2)

                        #region MessageSend Request Set

                        //Create proxy credential
                        NetworkCredential proxycredential = new NetworkCredential(request.TransactionHeader.Username, request.TransactionHeader.Password);

                        //Create proxy web service from dms web service with credential
                        _WA.Mapper.v2.Message.Message proxyws = new _WA.Mapper.v2.Message.Message(request.TransactionHeader.DMSServerUrl);
                        proxyws.Credentials = proxycredential;

                        //Create proxy request with messagesend and transaction
                        _WA.Mapper.v2.Message.MessageSendRequest proxyrequest = new _WA.Mapper.v2.Message.MessageSendRequest();

                        //Create proxy transaction
                        _WA.Mapper.v2.Message.TransactionHeader proxytransactionheader = new _WA.Mapper.v2.Message.TransactionHeader();
                        if (request.TransactionHeader != null)
                        {
                            #region//TransactionHeader Set
                            proxytransactionheader.CountryID = request.TransactionHeader.CountryID;
                            proxytransactionheader.DealerID = request.TransactionHeader.DealerID;
                            proxytransactionheader.DistributorID = request.TransactionHeader.DistributorID;
                            proxytransactionheader.DMSCode = request.TransactionHeader.DMSCode;
                            proxytransactionheader.DMSServerUrl = request.TransactionHeader.DMSServerUrl;
                            proxytransactionheader.DMSVersion = request.TransactionHeader.DMSVersion;
                            proxytransactionheader.DocumentVersion = request.TransactionHeader.DocumentVersion;
                            proxytransactionheader.GroupID = request.TransactionHeader.GroupID;
                            proxytransactionheader.IneterfaceID = request.TransactionHeader.IneterfaceID;
                            proxytransactionheader.Password = request.TransactionHeader.Password;
                            proxytransactionheader.PollingToken = request.TransactionHeader.PollingToken;
                            proxytransactionheader.RequestPollingToken = request.TransactionHeader.RequestPollingToken;
                            proxytransactionheader.RequestType = request.TransactionHeader.RequestType;
                            proxytransactionheader.TransactionId = request.TransactionHeader.TransactionId;
                            proxytransactionheader.TransactionDateTimeLocal = request.TransactionHeader.TransactionDateTimeLocal;
                            proxytransactionheader.TransactionDateTimeUTC = request.TransactionHeader.TransactionDateTimeUTC;
                            proxytransactionheader.TransactionType = request.TransactionHeader.TransactionType;
                            proxytransactionheader.Username = request.TransactionHeader.Username;
                            proxytransactionheader.VenderTrackingCode = request.TransactionHeader.VenderTrackingCode;
                            proxyrequest.TransactionHeader = proxytransactionheader;
                            #endregion
                        }

                        //Create proxy messagesend
                        _WA.Mapper.v2.Message.MessageSend proxymessagesend = new _WA.Mapper.v2.Message.MessageSend();
                        if (request.MessageSend != null)
                        {
                            #region//MessageSend Set
                            proxymessagesend.ActionType = request.MessageSend.ActionType;
                            proxymessagesend.MessageID = request.MessageSend.MessageID;
                            proxymessagesend.MessageType = request.MessageSend.MessageType;
                            proxyrequest.MessageSend = proxymessagesend;
                            #endregion
                        }
                        #endregion

                        //Run proxy web method with proxy request
                        _WA.Mapper.v2.Message.MessageSendResponse proxyresponse = proxyws.MessageSend(proxyrequest);

                        //Mapping with Standard Interface Specification Object
                        if (proxyresponse != null)
                        {
                            if (proxyresponse.TransactionHeader != null)
                            {
                                #region//TransactionHeader Set
                                TransactionHeader transactionheader = new TransactionHeader();
                                transactionheader.CountryID = proxyresponse.TransactionHeader.CountryID;
                                transactionheader.DealerID = proxyresponse.TransactionHeader.DealerID;
                                transactionheader.DistributorID = proxyresponse.TransactionHeader.DistributorID;
                                transactionheader.DMSCode = proxyresponse.TransactionHeader.DMSCode;
                                transactionheader.DMSServerUrl = proxyresponse.TransactionHeader.DMSServerUrl;
                                transactionheader.DMSVersion = proxyresponse.TransactionHeader.DMSVersion;
                                transactionheader.DocumentVersion = proxyresponse.TransactionHeader.DocumentVersion;
                                transactionheader.GroupID = proxyresponse.TransactionHeader.GroupID;
                                transactionheader.IneterfaceID = proxyresponse.TransactionHeader.IneterfaceID;
                                transactionheader.Password = proxyresponse.TransactionHeader.Password;
                                transactionheader.PollingToken = proxyresponse.TransactionHeader.PollingToken;
                                transactionheader.RequestPollingToken = proxyresponse.TransactionHeader.RequestPollingToken;
                                transactionheader.RequestType = proxyresponse.TransactionHeader.RequestType;
                                transactionheader.TransactionId = proxyresponse.TransactionHeader.TransactionId;
                                transactionheader.TransactionDateTimeLocal = proxyresponse.TransactionHeader.TransactionDateTimeLocal;
                                transactionheader.TransactionDateTimeUTC = proxyresponse.TransactionHeader.TransactionDateTimeUTC;
                                transactionheader.TransactionType = proxyresponse.TransactionHeader.TransactionType;
                                transactionheader.Username = proxyresponse.TransactionHeader.Username;
                                transactionheader.VenderTrackingCode = proxyresponse.TransactionHeader.VenderTrackingCode;
                                response.TransactionHeader = transactionheader;
                                #endregion
                            }

                            //ResultMessage Set
                            if (proxyresponse.ResultMessage != null)
                            {
                                response.ResultMessage = GetResultMessageData(proxyresponse.ResultMessage.Code, proxyresponse.ResultMessage.Message);
                            }

                            if (proxyresponse.Errors != null)
                            {
                                //Error List Set
                                foreach (_WA.Mapper.v2.Message.Error proxyerror in proxyresponse.Errors)
                                {
                                    if (response.Errors != null)
                                        response.Errors.Add(GetErrorData(proxyerror.Code, proxyerror.Message));
                                    else
                                        response.Errors = GetErrorDataList(proxyerror.Code, proxyerror.Message);
                                }
                            }
                            else
                            {

                            }
                        }
                        else
                        {
                            if (response.Errors != null)
                                response.Errors.Add(GetErrorData(ResponseCode.Fail, ResponseMessage.Fail));
                            else
                                response.Errors = GetErrorDataList(ResponseCode.Fail, ResponseMessage.Fail);
                        }
                        #endregion
                    }
                    break;
                case "v2.HMCIS.1C.v4":
                    {
                        #region v2.HMCIS.1C.v4 - RTR (Proxy Class Dll Name : _1C.v4)

                        #region MessageSend Request Set

                        //Create proxy credential
                        NetworkCredential proxycredential = new NetworkCredential(request.TransactionHeader.Username, request.TransactionHeader.Password);

                        //Create proxy web service from dms web service with credential
                        _1C.v4.Message.Message proxyws = new _1C.v4.Message.Message(request.TransactionHeader.DMSServerUrl);
                        proxyws.Credentials = proxycredential;

                        //Create proxy request with messagesend and transaction
                        _1C.v4.Message.MessageSendRequest proxyrequest = new _1C.v4.Message.MessageSendRequest();

                        //Create proxy transaction
                        _1C.v4.Message.TransactionHeader proxytransactionheader = new _1C.v4.Message.TransactionHeader();
                        if (request.TransactionHeader != null)
                        {
                            #region//TransactionHeader Set
                            proxytransactionheader.CountryID = request.TransactionHeader.CountryID;
                            proxytransactionheader.DealerID = request.TransactionHeader.DealerID;
                            proxytransactionheader.DistributorID = request.TransactionHeader.DistributorID;
                            proxytransactionheader.DMSCode = request.TransactionHeader.DMSCode;
                            proxytransactionheader.DMSServerUrl = request.TransactionHeader.DMSServerUrl;
                            proxytransactionheader.DMSVersion = request.TransactionHeader.DMSVersion;
                            proxytransactionheader.DocumentVersion = request.TransactionHeader.DocumentVersion;
                            proxytransactionheader.GroupID = request.TransactionHeader.GroupID;
                            proxytransactionheader.IneterfaceID = request.TransactionHeader.IneterfaceID;
                            proxytransactionheader.Password = request.TransactionHeader.Password;
                            proxytransactionheader.PollingToken = request.TransactionHeader.PollingToken;
                            proxytransactionheader.RequestPollingToken = request.TransactionHeader.RequestPollingToken;
                            proxytransactionheader.RequestType = request.TransactionHeader.RequestType;
                            proxytransactionheader.TransactionId = request.TransactionHeader.TransactionId;
                            proxytransactionheader.TransactionDateTimeLocal = request.TransactionHeader.TransactionDateTimeLocal;
                            proxytransactionheader.TransactionDateTimeUTC = request.TransactionHeader.TransactionDateTimeUTC;
                            proxytransactionheader.TransactionType = request.TransactionHeader.TransactionType;
                            proxytransactionheader.Username = request.TransactionHeader.Username;
                            proxytransactionheader.VenderTrackingCode = request.TransactionHeader.VenderTrackingCode;
                            proxyrequest.TransactionHeader = proxytransactionheader;
                            #endregion
                        }

                        //Create proxy messagesend
                        _1C.v4.Message.MessageSend proxymessagesend = new _1C.v4.Message.MessageSend();
                        if (request.MessageSend != null)
                        {
                            #region//MessageSend Set
                            proxymessagesend.ActionType = request.MessageSend.ActionType;
                            proxymessagesend.MessageID = request.MessageSend.MessageID;
                            proxymessagesend.MessageType = request.MessageSend.MessageType;
                            proxyrequest.MessageSend = proxymessagesend;
                            #endregion
                        }
                        #endregion

                        //Run proxy web method with proxy request
                        _1C.v4.Message.MessageSendResponse proxyresponse = proxyws.MessageSend(proxyrequest);

                        //Mapping with Standard Interface Specification Object
                        if (proxyresponse != null)
                        {
                            if (proxyresponse.TransactionHeader != null)
                            {
                                #region//TransactionHeader Set
                                TransactionHeader transactionheader = new TransactionHeader();
                                transactionheader.CountryID = proxyresponse.TransactionHeader.CountryID;
                                transactionheader.DealerID = proxyresponse.TransactionHeader.DealerID;
                                transactionheader.DistributorID = proxyresponse.TransactionHeader.DistributorID;
                                transactionheader.DMSCode = proxyresponse.TransactionHeader.DMSCode;
                                transactionheader.DMSServerUrl = proxyresponse.TransactionHeader.DMSServerUrl;
                                transactionheader.DMSVersion = proxyresponse.TransactionHeader.DMSVersion;
                                transactionheader.DocumentVersion = proxyresponse.TransactionHeader.DocumentVersion;
                                transactionheader.GroupID = proxyresponse.TransactionHeader.GroupID;
                                transactionheader.IneterfaceID = proxyresponse.TransactionHeader.IneterfaceID;
                                transactionheader.Password = proxyresponse.TransactionHeader.Password;
                                transactionheader.PollingToken = proxyresponse.TransactionHeader.PollingToken;
                                transactionheader.RequestPollingToken = proxyresponse.TransactionHeader.RequestPollingToken;
                                transactionheader.RequestType = proxyresponse.TransactionHeader.RequestType;
                                transactionheader.TransactionId = proxyresponse.TransactionHeader.TransactionId;
                                transactionheader.TransactionDateTimeLocal = proxyresponse.TransactionHeader.TransactionDateTimeLocal;
                                transactionheader.TransactionDateTimeUTC = proxyresponse.TransactionHeader.TransactionDateTimeUTC;
                                transactionheader.TransactionType = proxyresponse.TransactionHeader.TransactionType;
                                transactionheader.Username = proxyresponse.TransactionHeader.Username;
                                transactionheader.VenderTrackingCode = proxyresponse.TransactionHeader.VenderTrackingCode;
                                response.TransactionHeader = transactionheader;
                                #endregion
                            }

                            //ResultMessage Set
                            if (proxyresponse.ResultMessage != null)
                            {
                                response.ResultMessage = GetResultMessageData(proxyresponse.ResultMessage.Code, proxyresponse.ResultMessage.Message);
                            }

                            if (proxyresponse.Errors != null)
                            {
                                //Error List Set
                                foreach (_1C.v4.Message.Error proxyerror in proxyresponse.Errors)
                                {
                                    if (response.Errors != null)
                                        response.Errors.Add(GetErrorData(proxyerror.Code, proxyerror.Message));
                                    else
                                        response.Errors = GetErrorDataList(proxyerror.Code, proxyerror.Message);
                                }
                            }
                            else
                            {

                            }
                        }
                        else
                        {
                            if (response.Errors != null)
                                response.Errors.Add(GetErrorData(ResponseCode.Fail, ResponseMessage.Fail));
                            else
                                response.Errors = GetErrorDataList(ResponseCode.Fail, ResponseMessage.Fail);
                        }
                        #endregion
                    }
                    break;
                default: response.Errors = new List<Error>() { new Error() { Code = ResponseCode.NoMatchedProxy, Message = ResponseMessage.NoMatchedProxy } };
                    break;
            }

            return response;
        }
示例#3
0
        public List<Error> GetErrorDataListFromRequestTransactionHeader(TransactionHeader header)
        {
            List<Error> errorDataList = new List<Error>();

            if (header == null)
            {
                errorDataList.Add(GetErrorData(ResponseCode.WA_TransactionHeaderNull, ResponseMessage.TransactionHeaderNull));
            }
            else
            {
                //if (STIS.Framework.V4.Cryptography.Cryptor.Decrypt(request.TransactionHeader.Username) != "AdminWS" || STIS.Framework.V4.Cryptography.Cryptor.Decrypt(request.TransactionHeader.Password) != "111")
                //if (header.Username != "AdminWS" || header.Password != "111")
                //{
                //    errorDataList.Add(GetErrorData(PredefinedCode._AuthenticationFailed, PredefinedMessage._AuthenticationFailed));
                //}

                //if (string.IsNullOrEmpty(header.DealerID) || header.DealerID.ToUpper() != "PTP")
                //{
                //    errorDataList.Add(GetErrorData(PredefinedCode._EmptyDealerRequest, PredefinedMessage._EmptyDealerRequest));
                //}
            }

            return errorDataList.Count > 0 ? errorDataList : null;
        }
        public RepairOrderChangeResponse RepairOrderChange(RepairOrderChangeRequest request)
        {
            RepairOrderChangeResponse response = new RepairOrderChangeResponse();

            //DMS information set by dealer information
            string proxypath = string.Format("{0}.{1}.{2}.{3}",
                request.TransactionHeader.DocumentVersion,
                request.TransactionHeader.DistributorID,
                request.TransactionHeader.DMSCode,
                request.TransactionHeader.DMSVersion);

            switch (proxypath)
            {
                case "v2.Common.WA.v2":
                    {
                        #region v2.Common.WA.v2 - Standard (Proxy Class Dll Name : _WA.Mapper.v2)

                        #region RepairOrderChange Request Set

                        //Create proxy credential
                        NetworkCredential proxycredential = new NetworkCredential(request.TransactionHeader.Username, request.TransactionHeader.Password);

                        //Create proxy web service from dms web service with credential
                        _WA.Mapper.v2.RepairOrder.RepairOrder proxyws = new _WA.Mapper.v2.RepairOrder.RepairOrder(request.TransactionHeader.DMSServerUrl);
                        proxyws.Credentials = proxycredential;

                        //Create proxy request with repairorderchange and transaction
                        _WA.Mapper.v2.RepairOrder.RepairOrderChangeRequest proxyrequest = new _WA.Mapper.v2.RepairOrder.RepairOrderChangeRequest();

                        //Create proxy transaction
                        _WA.Mapper.v2.RepairOrder.TransactionHeader2 proxytransactionheader = new _WA.Mapper.v2.RepairOrder.TransactionHeader2();
                        if (request.TransactionHeader != null)
                        {
                            #region//TransactionHeader Set
                            proxytransactionheader.CountryID = request.TransactionHeader.CountryID;
                            proxytransactionheader.DealerID = request.TransactionHeader.DealerID;
                            proxytransactionheader.DistributorID = request.TransactionHeader.DistributorID;
                            proxytransactionheader.DMSCode = request.TransactionHeader.DMSCode;
                            proxytransactionheader.DMSServerUrl = request.TransactionHeader.DMSServerUrl;
                            proxytransactionheader.DMSVersion = request.TransactionHeader.DMSVersion;
                            proxytransactionheader.DocumentVersion = request.TransactionHeader.DocumentVersion;
                            proxytransactionheader.GroupID = request.TransactionHeader.GroupID;
                            proxytransactionheader.IneterfaceID = request.TransactionHeader.IneterfaceID;
                            proxytransactionheader.Password = request.TransactionHeader.Password;
                            proxytransactionheader.PollingToken = request.TransactionHeader.PollingToken;
                            proxytransactionheader.RequestPollingToken = request.TransactionHeader.RequestPollingToken;
                            proxytransactionheader.RequestType = request.TransactionHeader.RequestType;
                            proxytransactionheader.TransactionId = request.TransactionHeader.TransactionId;
                            proxytransactionheader.TransactionDateTimeLocal = request.TransactionHeader.TransactionDateTimeLocal;
                            proxytransactionheader.TransactionDateTimeUTC = request.TransactionHeader.TransactionDateTimeUTC;
                            proxytransactionheader.TransactionType = request.TransactionHeader.TransactionType;
                            proxytransactionheader.Username = request.TransactionHeader.Username;
                            proxytransactionheader.VenderTrackingCode = request.TransactionHeader.VenderTrackingCode;
                            proxyrequest.TransactionHeader = proxytransactionheader;
                            #endregion
                        }

                        //Create proxy repairorderchange
                        _WA.Mapper.v2.RepairOrder.RepairOrderChange proxyrepairorderchange = new _WA.Mapper.v2.RepairOrder.RepairOrderChange();
                        if (request.RepairOrderChange != null)
                        {
                            #region//RepairOrder Header
                            proxyrepairorderchange.CloseDateTimeLocal = request.RepairOrderChange.CloseDateTimeLocal;
                            proxyrepairorderchange.DeliveryDateTimeLocal = request.RepairOrderChange.DeliveryDateTimeLocal;
                            proxyrepairorderchange.DMSROID = request.RepairOrderChange.DMSROID;
                            proxyrepairorderchange.DMSRONo = request.RepairOrderChange.DMSRONo;
                            proxyrepairorderchange.DMSROStatus = request.RepairOrderChange.DMSROStatus;
                            proxyrepairorderchange.HangTagColor = request.RepairOrderChange.HangTagColor;
                            proxyrepairorderchange.HangTagNo = request.RepairOrderChange.HangTagNo;
                            proxyrepairorderchange.HangTagNo = request.RepairOrderChange.HangTagNo;
                            proxyrepairorderchange.OpenDateTimeLocal = request.RepairOrderChange.OpenDateTimeLocal;
                            proxyrepairorderchange.OutMileage = request.RepairOrderChange.OutMileage;
                            proxyrepairorderchange.PaymentMethod = request.RepairOrderChange.PaymentMethod;
                            proxyrepairorderchange.ROChannel = request.RepairOrderChange.ROChannel;
                            proxyrepairorderchange.SAEmployeeID = request.RepairOrderChange.SAEmployeeID;
                            proxyrepairorderchange.SAEmployeeName = request.RepairOrderChange.SAEmployeeName;
                            proxyrepairorderchange.ServiceType = request.RepairOrderChange.ServiceType;
                            proxyrepairorderchange.TCEmployeeID = request.RepairOrderChange.TCEmployeeID;
                            proxyrepairorderchange.TCEmployeeName = request.RepairOrderChange.TCEmployeeName;
                            proxyrepairorderchange.WorkType = request.RepairOrderChange.WorkType;
                            #endregion

                            #region//RepairOrder AppointmentRef
                            if (request.RepairOrderChange.AppointmentRef != null)
                            {
                                _WA.Mapper.v2.RepairOrder.AppointmentRef1 proxyappointmentref = new _WA.Mapper.v2.RepairOrder.AppointmentRef1();
                                proxyappointmentref.DMSAppointmentNo = request.RepairOrderChange.AppointmentRef.DMSAppointmentNo;
                                proxyappointmentref.DMSAppointmentStatus = request.RepairOrderChange.AppointmentRef.DMSAppointmentStatus;
                                proxyrepairorderchange.AppointmentRef = proxyappointmentref;
                            }
                            #endregion

                            #region//RepairOrder CustomerParts
                            if (request.RepairOrderChange.CustomerParts != null && request.RepairOrderChange.CustomerParts.Count > 0)
                            {
                                int customerpartscnt = 0;
                                _WA.Mapper.v2.RepairOrder.CustomerPart1[] proxycustomerparts = new _WA.Mapper.v2.RepairOrder.CustomerPart1[request.RepairOrderChange.CustomerParts.Count];
                                foreach (CustomerPart customerpart in request.RepairOrderChange.CustomerParts)
                                {
                                    _WA.Mapper.v2.RepairOrder.CustomerPart1 proxycustomerpart = new _WA.Mapper.v2.RepairOrder.CustomerPart1();
                                    proxycustomerpart.Comment = customerpart.Comment;
                                    proxycustomerpart.PartDescription = customerpart.PartDescription;
                                    proxycustomerpart.PartNumber = customerpart.PartNumber;
                                    proxycustomerpart.Quantity = customerpart.Quantity;
                                    proxycustomerpart.UnitOfMeasure = customerpart.UnitOfMeasure;
                                    proxycustomerparts[customerpartscnt] = proxycustomerpart;
                                    customerpartscnt++;
                                }
                            }
                            #endregion

                            #region //RepairOrder AdditionalFields
                            if (request.RepairOrderChange.AdditionalFields != null && request.RepairOrderChange.AdditionalFields.Count > 0)
                            {
                                int additionalfieldscnt = 0;
                                _WA.Mapper.v2.RepairOrder.AdditionalField1[] proxyadditionalfields = new _WA.Mapper.v2.RepairOrder.AdditionalField1[request.RepairOrderChange.AdditionalFields.Count];
                                foreach (AdditionalField additionalfield in request.RepairOrderChange.AdditionalFields)
                                {
                                    _WA.Mapper.v2.RepairOrder.AdditionalField1 proxyadditionalfield = new _WA.Mapper.v2.RepairOrder.AdditionalField1();
                                    proxyadditionalfield.Name = additionalfield.AdditionalFieldName;
                                    proxyadditionalfield.Value = additionalfield.AdditionalFieldValue;
                                    proxyadditionalfields[additionalfieldscnt] = proxyadditionalfield;
                                    additionalfieldscnt++;
                                }
                                proxyrepairorderchange.AdditionalFields = proxyadditionalfields;
                            }
                            #endregion

                            #region//RepairOrder Options
                            if (request.RepairOrderChange.Options != null && request.RepairOrderChange.Options.Count > 0)
                            {
                                int optionscnt = 0;
                                _WA.Mapper.v2.RepairOrder.Option1[] proxyoptions = new _WA.Mapper.v2.RepairOrder.Option1[request.RepairOrderChange.Options.Count];
                                foreach (Option option in request.RepairOrderChange.Options)
                                {
                                    _WA.Mapper.v2.RepairOrder.Option1 proxyoption = new _WA.Mapper.v2.RepairOrder.Option1();
                                    proxyoption.Name = option.OptionName;
                                    proxyoption.Value = option.OptionValue;
                                    proxyoptions[optionscnt] = proxyoption;
                                    optionscnt++;
                                }
                                proxyrepairorderchange.Options = proxyoptions;
                            }
                            #endregion

                            #region//RepairOrder PriceType
                            if (request.RepairOrderChange.PriceType != null)
                            {
                                _WA.Mapper.v2.RepairOrder.PriceType1 proxypricetype = new _WA.Mapper.v2.RepairOrder.PriceType1();
                                proxypricetype.DiscountPrice = request.RepairOrderChange.PriceType.DiscountPrice;
                                proxypricetype.DiscountRate = request.RepairOrderChange.PriceType.DiscountRate;
                                proxypricetype.TotalPrice = request.RepairOrderChange.PriceType.TotalPrice;
                                proxypricetype.TotalPriceIncludeTax = request.RepairOrderChange.PriceType.TotalPriceIncludeTax;
                                proxypricetype.UnitPrice = request.RepairOrderChange.PriceType.UnitPrice;
                                proxyrepairorderchange.PriceType = proxypricetype;
                            }
                            #endregion

                            #region//RepairOrder Customers
                            if (request.RepairOrderChange.Customers != null && request.RepairOrderChange.Customers.Count > 0)
                            {
                                int customerscnt = 0;
                                _WA.Mapper.v2.RepairOrder.Customer2[] proxycustomers = new _WA.Mapper.v2.RepairOrder.Customer2[request.RepairOrderChange.Customers.Count];
                                foreach (WA.Standard.IF.Data.v2.Common.Customer.Customer customer in request.RepairOrderChange.Customers)
                                {
                                    #region//RepairOrder Customer Header
                                    _WA.Mapper.v2.RepairOrder.Customer2 proxycustomer = new _WA.Mapper.v2.RepairOrder.Customer2();
                                    proxycustomer.CardNo = customer.CardNo;
                                    proxycustomer.CustomerInfoType = customer.CustomerInfoType;
                                    proxycustomer.DMSCustomerNo = customer.DMSCustomerNo;
                                    proxycustomer.Email = customer.Email;
                                    proxycustomer.FirstName = customer.FirstName;
                                    proxycustomer.FullName = customer.FullName;
                                    proxycustomer.Gender = customer.Gender;
                                    proxycustomer.LastName = customer.LastName;
                                    proxycustomer.MiddleName = customer.MiddleName;
                                    proxycustomer.Salutation = customer.Salutation;
                                    #endregion

                                    #region//RepairOrder Customer Addresses
                                    if (customer.Addresses != null && customer.Addresses.Count > 0)
                                    {
                                        int addressescnt = 0;
                                        _WA.Mapper.v2.RepairOrder.Address1[] proxyaddresses = new _WA.Mapper.v2.RepairOrder.Address1[customer.Addresses.Count];
                                        foreach (WA.Standard.IF.Data.v2.Common.Customer.Address address in customer.Addresses)
                                        {
                                            _WA.Mapper.v2.RepairOrder.Address1 proxyaddress = new _WA.Mapper.v2.RepairOrder.Address1();
                                            proxyaddress.Address11 = address.Address1;
                                            proxyaddress.Address2 = address.Address2;
                                            proxyaddress.AddressType = address.AddressType;
                                            proxyaddress.City = address.City;
                                            proxyaddress.Country = address.Country;
                                            proxyaddress.State = address.State;
                                            proxyaddress.ZipCode = address.ZipCode;
                                            proxyaddresses[addressescnt] = proxyaddress;
                                            addressescnt++;
                                        }
                                        proxycustomer.Addresses = proxyaddresses;
                                    }
                                    #endregion

                                    #region//RepairOrder Customer Contacts
                                    if (customer.Contacts != null && customer.Contacts.Count > 0)
                                    {
                                        int contactscnt = 0;
                                        _WA.Mapper.v2.RepairOrder.Contact2[] proxycontacts = new _WA.Mapper.v2.RepairOrder.Contact2[customer.Contacts.Count];
                                        foreach (WA.Standard.IF.Data.v2.Common.Customer.Contact contact in customer.Contacts)
                                        {
                                            _WA.Mapper.v2.RepairOrder.Contact2 proxycontact = new _WA.Mapper.v2.RepairOrder.Contact2();
                                            proxycontact.ContactMethodYN = contact.ContactMethodYN;
                                            proxycontact.ContactType = contact.ContactType;
                                            proxycontact.ContactValue = contact.ContactValue;
                                            proxycontacts[contactscnt] = proxycontact;
                                            contactscnt++;
                                        }
                                        proxycustomer.Contacts = proxycontacts;
                                    }
                                    #endregion

                                    #region//RepairOrder Customer SpecialMessage
                                    if (customer.SpecialMessage != null)
                                    {
                                        _WA.Mapper.v2.RepairOrder.SpecialMessage1 proxyspecialmessage = new _WA.Mapper.v2.RepairOrder.SpecialMessage1();
                                        proxyspecialmessage.Message = customer.SpecialMessage.Message;
                                        proxycustomer.SpecialMessage = proxyspecialmessage;
                                    }
                                    #endregion

                                    #region//RepairOrder Customer CorporateInfos
                                    if (customer.CorporateInfos != null && customer.CorporateInfos.Count > 0)
                                    {
                                        int corporateinfoscnt = 0;
                                        _WA.Mapper.v2.RepairOrder.CorporateInfo1[] proxycorporateinfos = new _WA.Mapper.v2.RepairOrder.CorporateInfo1[customer.CorporateInfos.Count];
                                        foreach (WA.Standard.IF.Data.v2.Common.Customer.CorporateInfo corporateinfo in customer.CorporateInfos)
                                        {
                                            _WA.Mapper.v2.RepairOrder.CorporateInfo1 proxycorporateinfo = new _WA.Mapper.v2.RepairOrder.CorporateInfo1();
                                            proxycorporateinfo.Name = corporateinfo.CorporateInfoName;
                                            proxycorporateinfo.Value = corporateinfo.CorporateInfoValue;
                                            proxycorporateinfos[corporateinfoscnt] = proxycorporateinfo;
                                            corporateinfoscnt++;
                                        }
                                        proxycustomer.CorporateInfos = proxycorporateinfos;
                                    }
                                    #endregion

                                    proxycustomers[customerscnt] = proxycustomer;
                                }
                                proxyrepairorderchange.Customers = proxycustomers;
                            }
                            #endregion

                            #region//RepairOrder Vehicle
                            if (request.RepairOrderChange.Vehicle != null)
                            {
                                #region//RepairOrder Vehicle Header
                                _WA.Mapper.v2.RepairOrder.Vehicle2 proxyvehicle = new _WA.Mapper.v2.RepairOrder.Vehicle2();
                                proxyvehicle.Color = request.RepairOrderChange.Vehicle.Color;
                                proxyvehicle.Cylinders = request.RepairOrderChange.Vehicle.Cylinders;
                                proxyvehicle.DateDelivered = request.RepairOrderChange.Vehicle.DateDelivered;
                                proxyvehicle.DateInService = request.RepairOrderChange.Vehicle.DateInService;
                                proxyvehicle.DeclinedJob = request.RepairOrderChange.Vehicle.DeclinedJob;
                                proxyvehicle.DisplayDescription = request.RepairOrderChange.Vehicle.DisplayDescription;
                                proxyvehicle.DMSVehicleNo = request.RepairOrderChange.Vehicle.DMSVehicleNo;
                                proxyvehicle.EngineType = request.RepairOrderChange.Vehicle.EngineType;
                                proxyvehicle.ExtendedWarranty = request.RepairOrderChange.Vehicle.ExtendedWarranty;
                                proxyvehicle.FuelType = request.RepairOrderChange.Vehicle.FuelType;
                                proxyvehicle.FullModelName = request.RepairOrderChange.Vehicle.FullModelName;
                                proxyvehicle.InsuranceDate = request.RepairOrderChange.Vehicle.InsuranceDate;
                                proxyvehicle.LastMileage = request.RepairOrderChange.Vehicle.LastMileage;
                                proxyvehicle.LastServiceDate = request.RepairOrderChange.Vehicle.LastServiceDate;
                                proxyvehicle.LastSixVIN = request.RepairOrderChange.Vehicle.LastSixVIN;
                                proxyvehicle.LicenseNumber = request.RepairOrderChange.Vehicle.LicenseNumber;
                                proxyvehicle.LicensePlateNo = request.RepairOrderChange.Vehicle.LicensePlateNo;
                                proxyvehicle.Make = request.RepairOrderChange.Vehicle.Make;
                                proxyvehicle.ModelCode = request.RepairOrderChange.Vehicle.ModelCode;
                                proxyvehicle.ModelName = request.RepairOrderChange.Vehicle.ModelName;
                                proxyvehicle.ModelYear = request.RepairOrderChange.Vehicle.ModelYear;
                                proxyvehicle.PendingJob = request.RepairOrderChange.Vehicle.PendingJob;
                                proxyvehicle.StockNumber = request.RepairOrderChange.Vehicle.StockNumber;
                                proxyvehicle.Trim = request.RepairOrderChange.Vehicle.Trim;
                                proxyvehicle.VehicleType = request.RepairOrderChange.Vehicle.VehicleType;
                                proxyvehicle.VIN = request.RepairOrderChange.Vehicle.VIN;
                                proxyvehicle.WarrantyMiles = request.RepairOrderChange.Vehicle.WarrantyMiles;
                                proxyvehicle.WarrantyMonths = request.RepairOrderChange.Vehicle.WarrantyMonths;
                                proxyvehicle.WarrantyStartDate = request.RepairOrderChange.Vehicle.WarrantyStartDate;
                                #endregion

                                #region//RepairOrder Vehicle Campaigns
                                if (request.RepairOrderChange.Vehicle.Campaigns != null && request.RepairOrderChange.Vehicle.Campaigns.Count > 0)
                                {
                                    int campaignscnt = 0;
                                    _WA.Mapper.v2.RepairOrder.Campaign1[] proxycampaigns = new _WA.Mapper.v2.RepairOrder.Campaign1[request.RepairOrderChange.Vehicle.Campaigns.Count];
                                    foreach (WA.Standard.IF.Data.v2.Common.Vehicle.Campaign campaign in request.RepairOrderChange.Vehicle.Campaigns)
                                    {
                                        _WA.Mapper.v2.RepairOrder.Campaign1 proxycampaign = new _WA.Mapper.v2.RepairOrder.Campaign1();
                                        proxycampaign.CampaignDescription = campaign.CampaignDescription;
                                        proxycampaign.CampaignID = campaign.CampaignID;
                                        proxycampaign.CampaignPerformed = campaign.CampaignPerformed;
                                        proxycampaigns[campaignscnt] = proxycampaign;
                                        campaignscnt++;
                                    }
                                    proxyvehicle.Campaigns = proxycampaigns;
                                }
                                #endregion

                                proxyrepairorderchange.Vehicle = proxyvehicle;
                            }
                            #endregion

                            #region//RepairOrder RequestItems
                            if (request.RepairOrderChange.RequestItems != null && request.RepairOrderChange.RequestItems.Count > 0)
                            {
                                int requestitemscnt = 0;
                                _WA.Mapper.v2.RepairOrder.RequestItem1[] proxyrequestitems = new _WA.Mapper.v2.RepairOrder.RequestItem1[request.RepairOrderChange.RequestItems.Count];
                                foreach (RequestItem requestitem in request.RepairOrderChange.RequestItems)
                                {
                                    #region//RepairOrder RequestItem Header
                                    _WA.Mapper.v2.RepairOrder.RequestItem1 proxyrequestitem = new _WA.Mapper.v2.RepairOrder.RequestItem1();
                                    proxyrequestitem.CPSIND = requestitem.CPSIND;
                                    proxyrequestitem.RequestCode = requestitem.RequestCode;
                                    proxyrequestitem.RequestDescription = requestitem.RequestDescription;
                                    proxyrequestitem.ServiceLineNumber = requestitem.ServiceLineNumber;
                                    proxyrequestitem.ServiceLineStatus = requestitem.ServiceLineStatus;
                                    proxyrequestitem.ServiceType = requestitem.ServiceType;
                                    proxyrequestitem.TCEmployeeID = requestitem.TCEmployeeID;
                                    proxyrequestitem.TCEmployeeName = requestitem.TCEmployeeName;
                                    proxyrequestitem.WorkType = requestitem.WorkType;
                                    #endregion

                                    #region//RepairOrder RequestItem Comments
                                    if (requestitem.Comments != null && requestitem.Comments.Count > 0)
                                    {
                                        int commentscnt = 0;
                                        _WA.Mapper.v2.RepairOrder.Comment1[] proxycomments = new _WA.Mapper.v2.RepairOrder.Comment1[requestitem.Comments.Count];
                                        foreach (Comment Comment in requestitem.Comments)
                                        {
                                            _WA.Mapper.v2.RepairOrder.Comment1 proxycomment = new _WA.Mapper.v2.RepairOrder.Comment1();
                                            proxycomment.DescriptionComment = Comment.DescriptionComment;
                                            proxycomment.SequenceNumber = Comment.SequenceNumber;
                                            proxycomments[commentscnt] = proxycomment;
                                            commentscnt++;
                                        }
                                        proxyrequestitem.Comments = proxycomments;
                                    }
                                    #endregion

                                    #region//RepairOrder RequestItem Descriptions
                                    if (requestitem.Descriptions != null && requestitem.Descriptions.Count > 0)
                                    {
                                        int descriptionscnt = 0;
                                        _WA.Mapper.v2.RepairOrder.Description1[] proxydescriptions = new _WA.Mapper.v2.RepairOrder.Description1[requestitem.Descriptions.Count];
                                        foreach (Description description in requestitem.Descriptions)
                                        {
                                            _WA.Mapper.v2.RepairOrder.Description1 proxydescription = new _WA.Mapper.v2.RepairOrder.Description1();
                                            proxydescription.DescriptionComment = description.DescriptionComment;
                                            proxydescription.SequenceNumber = description.SequenceNumber;
                                            proxydescriptions[descriptionscnt] = proxydescription;
                                            descriptionscnt++;
                                        }
                                        proxyrequestitem.Descriptions = proxydescriptions;
                                    }
                                    #endregion

                                    #region//RepairOrder RequestItem OPCodes
                                    if (requestitem.OPCodes != null && requestitem.OPCodes.Count > 0)
                                    {
                                        int opcodescnt = 0;
                                        _WA.Mapper.v2.RepairOrder.OPCode1[] proxyopcodes = new _WA.Mapper.v2.RepairOrder.OPCode1[requestitem.OPCodes.Count];
                                        foreach (OPCode opcode in requestitem.OPCodes)
                                        {
                                            #region//RepairOrder RequestItem OPCode Header
                                            _WA.Mapper.v2.RepairOrder.OPCode1 proxyopcode = new _WA.Mapper.v2.RepairOrder.OPCode1();
                                            proxyopcode.ActualHours = opcode.ActualHours;
                                            proxyopcode.Code = opcode.Code;
                                            proxyopcode.Description = opcode.Description;
                                            proxyopcode.EstimatedHours = opcode.EstimatedHours;
                                            proxyopcode.SequenceNumber = opcode.SequenceNumber;
                                            proxyopcode.ServiceType = opcode.ServiceType;
                                            proxyopcode.SkillLevel = opcode.SkillLevel;
                                            #endregion

                                            #region//RepairOrder RequestItem OPCode Descriptions
                                            if (opcode.Descriptions != null && opcode.Descriptions.Count > 0)
                                            {
                                                int descriptionscnt = 0;
                                                _WA.Mapper.v2.RepairOrder.Description1[] proxydescriptions = new _WA.Mapper.v2.RepairOrder.Description1[opcode.Descriptions.Count];
                                                foreach (Description description in opcode.Descriptions)
                                                {
                                                    _WA.Mapper.v2.RepairOrder.Description1 proxydescription = new _WA.Mapper.v2.RepairOrder.Description1();
                                                    proxydescription.DescriptionComment = description.DescriptionComment;
                                                    proxydescription.SequenceNumber = description.SequenceNumber;
                                                    proxydescriptions[descriptionscnt] = proxydescription;
                                                    descriptionscnt++;
                                                }
                                                proxyopcode.Descriptions = proxydescriptions;
                                            }
                                            #endregion

                                            #region//RepairOrder RequestItem OPCode Causes
                                            if (opcode.Causes != null && opcode.Causes.Count > 0)
                                            {
                                                int causescnt = 0;
                                                _WA.Mapper.v2.RepairOrder.Cause1[] proxycauses = new _WA.Mapper.v2.RepairOrder.Cause1[opcode.Causes.Count];
                                                foreach (Cause cause in opcode.Causes)
                                                {
                                                    _WA.Mapper.v2.RepairOrder.Cause1 proxycause = new _WA.Mapper.v2.RepairOrder.Cause1();
                                                    proxycause.CauseLaborOpCode = cause.CauseLaborOpCode;
                                                    proxycause.Comment = cause.Comment;
                                                    proxycause.SequenceNumber = cause.SequenceNumber;
                                                    proxycauses[causescnt] = proxycause;
                                                    causescnt++;
                                                }
                                                proxyopcode.Causes = proxycauses;
                                            }
                                            #endregion

                                            #region//RepairOrder RequestItem OPCode Corrections
                                            if (opcode.Corrections != null && opcode.Corrections.Count > 0)
                                            {
                                                int correctionscnt = 0;
                                                _WA.Mapper.v2.RepairOrder.Correction1[] proxycorrections = new _WA.Mapper.v2.RepairOrder.Correction1[opcode.Corrections.Count];
                                                foreach (Correction Correction in opcode.Corrections)
                                                {
                                                    _WA.Mapper.v2.RepairOrder.Correction1 proxycorrection = new _WA.Mapper.v2.RepairOrder.Correction1();
                                                    proxycorrection.CorrectionLaborOpCode = Correction.CorrectionLaborOpCode;
                                                    proxycorrection.Comment = Correction.Comment;
                                                    proxycorrection.SequenceNumber = Correction.SequenceNumber;
                                                    proxycorrections[correctionscnt] = proxycorrection;
                                                    correctionscnt++;
                                                }
                                                proxyopcode.Corrections = proxycorrections;
                                            }
                                            #endregion

                                            #region//RepairOrder RequestItem OPCode PriceType
                                            if (opcode.PriceType != null)
                                            {
                                                _WA.Mapper.v2.RepairOrder.PriceType1 proxypricetype = new _WA.Mapper.v2.RepairOrder.PriceType1();
                                                proxypricetype.DiscountPrice = opcode.PriceType.DiscountPrice;
                                                proxypricetype.DiscountRate = opcode.PriceType.DiscountRate;
                                                proxypricetype.TotalPrice = opcode.PriceType.TotalPrice;
                                                proxypricetype.TotalPriceIncludeTax = opcode.PriceType.TotalPriceIncludeTax;
                                                proxypricetype.UnitPrice = opcode.PriceType.UnitPrice;
                                                proxyopcode.PriceType = proxypricetype;
                                            }
                                            #endregion

                                            #region//RepairOrder RequestItem OPCode Parts
                                            if (opcode.Parts != null && opcode.Parts.Count > 0)
                                            {
                                                int partscnt = 0;
                                                _WA.Mapper.v2.RepairOrder.Part1[] proxyparts = new _WA.Mapper.v2.RepairOrder.Part1[opcode.Parts.Count];
                                                foreach (Part part in opcode.Parts)
                                                {
                                                    #region//RepairOrder RequestItem OPCode Parts Header
                                                    _WA.Mapper.v2.RepairOrder.Part1 proxypart = new _WA.Mapper.v2.RepairOrder.Part1();
                                                    proxypart.DisplayPartNumber = part.DisplayPartNumber;
                                                    proxypart.PartDescription = part.PartDescription;
                                                    proxypart.PartNumber = part.PartNumber;
                                                    proxypart.PartType = part.PartType;
                                                    proxypart.Quantity = part.Quantity;
                                                    proxypart.SequenceNumber = part.SequenceNumber;
                                                    proxypart.ServiceType = part.ServiceType;
                                                    proxypart.StockQuantity = part.StockQuantity;
                                                    proxypart.StockStatus = part.StockStatus;
                                                    proxypart.UnitOfMeasure = part.UnitOfMeasure;
                                                    #endregion

                                                    #region//RepairOrder RequestItem OPCode Parts Descriptions
                                                    if (part.Descriptions != null && part.Descriptions.Count > 0)
                                                    {
                                                        int descriptionscnt = 0;
                                                        _WA.Mapper.v2.RepairOrder.Description1[] proxydescriptions = new _WA.Mapper.v2.RepairOrder.Description1[part.Descriptions.Count];
                                                        foreach (Description description in part.Descriptions)
                                                        {
                                                            _WA.Mapper.v2.RepairOrder.Description1 proxydescription = new _WA.Mapper.v2.RepairOrder.Description1();
                                                            proxydescription.DescriptionComment = description.DescriptionComment;
                                                            proxydescription.SequenceNumber = description.SequenceNumber;
                                                            proxydescriptions[descriptionscnt] = proxydescription;
                                                            descriptionscnt++;
                                                        }
                                                        proxypart.Descriptions = proxydescriptions;
                                                    }
                                                    #endregion

                                                    #region//RepairOrder RequestItem OPCode Parts PriceType
                                                    if (part.PriceType != null)
                                                    {
                                                        _WA.Mapper.v2.RepairOrder.PriceType1 proxypricetype = new _WA.Mapper.v2.RepairOrder.PriceType1();
                                                        proxypricetype.DiscountPrice = part.PriceType.DiscountPrice;
                                                        proxypricetype.DiscountRate = part.PriceType.DiscountRate;
                                                        proxypricetype.TotalPrice = part.PriceType.TotalPrice;
                                                        proxypricetype.TotalPriceIncludeTax = part.PriceType.TotalPriceIncludeTax;
                                                        proxypricetype.UnitPrice = part.PriceType.UnitPrice;
                                                        proxypart.PriceType = proxypricetype;
                                                    }
                                                    #endregion

                                                    proxyparts[partscnt] = proxypart;
                                                    partscnt++;
                                                }
                                                proxyopcode.Parts = proxyparts;
                                            }
                                            #endregion

                                            #region//RepairOrder RequestItem OPCode Sublets
                                            if (opcode.Sublets != null && opcode.Sublets.Count > 0)
                                            {
                                                int subletscnt = 0;
                                                _WA.Mapper.v2.RepairOrder.Sublet1[] proxysublets = new _WA.Mapper.v2.RepairOrder.Sublet1[opcode.Sublets.Count];
                                                foreach (Sublet sublet in opcode.Sublets)
                                                {
                                                    #region//RepairOrder RequestItem OPCode Sublets Header
                                                    _WA.Mapper.v2.RepairOrder.Sublet1 proxysublet = new _WA.Mapper.v2.RepairOrder.Sublet1();
                                                    proxysublet.SequenceNumber = sublet.SequenceNumber;
                                                    proxysublet.ServiceType = sublet.ServiceType;
                                                    #endregion

                                                    #region//RepairOrder RequestItem OPCode Sublets Descriptions
                                                    if (sublet.Descriptions != null && sublet.Descriptions.Count > 0)
                                                    {
                                                        int descriptionscnt = 0;
                                                        _WA.Mapper.v2.RepairOrder.Description1[] proxydescriptions = new _WA.Mapper.v2.RepairOrder.Description1[sublet.Descriptions.Count];
                                                        foreach (Description description in sublet.Descriptions)
                                                        {
                                                            _WA.Mapper.v2.RepairOrder.Description1 proxydescription = new _WA.Mapper.v2.RepairOrder.Description1();
                                                            proxydescription.DescriptionComment = description.DescriptionComment;
                                                            proxydescription.SequenceNumber = description.SequenceNumber;
                                                            proxydescriptions[descriptionscnt] = proxydescription;
                                                            descriptionscnt++;
                                                        }
                                                        proxysublet.Descriptions = proxydescriptions;
                                                    }
                                                    #endregion

                                                    #region//RepairOrder RequestItem OPCode Sublets PriceType
                                                    if (sublet.PriceType != null)
                                                    {
                                                        _WA.Mapper.v2.RepairOrder.PriceType1 proxypricetype = new _WA.Mapper.v2.RepairOrder.PriceType1();
                                                        proxypricetype.DiscountPrice = sublet.PriceType.DiscountPrice;
                                                        proxypricetype.DiscountRate = sublet.PriceType.DiscountRate;
                                                        proxypricetype.TotalPrice = sublet.PriceType.TotalPrice;
                                                        proxypricetype.TotalPriceIncludeTax = sublet.PriceType.TotalPriceIncludeTax;
                                                        proxypricetype.UnitPrice = sublet.PriceType.UnitPrice;
                                                        proxysublet.PriceType = proxypricetype;
                                                    }
                                                    #endregion

                                                    proxysublets[subletscnt] = proxysublet;
                                                    subletscnt++;
                                                }
                                                proxyopcode.Sublets = proxysublets;
                                            }
                                            #endregion

                                            #region//RepairOrder RequestItem OPCode MISCs
                                            if (opcode.MISCs != null && opcode.MISCs.Count > 0)
                                            {
                                                int miscscnt = 0;
                                                _WA.Mapper.v2.RepairOrder.MISC1[] proxymiscs = new _WA.Mapper.v2.RepairOrder.MISC1[opcode.MISCs.Count];
                                                foreach (MISC misc in opcode.MISCs)
                                                {
                                                    #region//RepairOrder RequestItem OPCode MISCs Header
                                                    _WA.Mapper.v2.RepairOrder.MISC1 proxymisc = new _WA.Mapper.v2.RepairOrder.MISC1();
                                                    proxymisc.SequenceNumber = misc.SequenceNumber;
                                                    proxymisc.ServiceType = misc.ServiceType;
                                                    #endregion

                                                    #region//RepairOrder RequestItem OPCode MISCs Descriptions
                                                    if (misc.Descriptions != null && misc.Descriptions.Count > 0)
                                                    {
                                                        int descriptionscnt = 0;
                                                        _WA.Mapper.v2.RepairOrder.Description1[] proxydescriptions = new _WA.Mapper.v2.RepairOrder.Description1[misc.Descriptions.Count];
                                                        foreach (Description description in misc.Descriptions)
                                                        {
                                                            _WA.Mapper.v2.RepairOrder.Description1 proxydescription = new _WA.Mapper.v2.RepairOrder.Description1();
                                                            proxydescription.DescriptionComment = description.DescriptionComment;
                                                            proxydescription.SequenceNumber = description.SequenceNumber;
                                                            proxydescriptions[descriptionscnt] = proxydescription;
                                                            descriptionscnt++;
                                                        }
                                                        proxymisc.Descriptions = proxydescriptions;
                                                    }
                                                    #endregion

                                                    #region//RepairOrder RequestItem OPCode MISCs PriceType
                                                    if (misc.PriceType != null)
                                                    {
                                                        _WA.Mapper.v2.RepairOrder.PriceType1 proxypricetype = new _WA.Mapper.v2.RepairOrder.PriceType1();
                                                        proxypricetype.DiscountPrice = misc.PriceType.DiscountPrice;
                                                        proxypricetype.DiscountRate = misc.PriceType.DiscountRate;
                                                        proxypricetype.TotalPrice = misc.PriceType.TotalPrice;
                                                        proxypricetype.TotalPriceIncludeTax = misc.PriceType.TotalPriceIncludeTax;
                                                        proxypricetype.UnitPrice = misc.PriceType.UnitPrice;
                                                        proxymisc.PriceType = proxypricetype;
                                                    }
                                                    #endregion

                                                    proxymiscs[miscscnt] = proxymisc;
                                                    miscscnt++;
                                                }
                                                proxyopcode.MISCs = proxymiscs;
                                            }
                                            #endregion

                                            proxyopcodes[opcodescnt] = proxyopcode;
                                            opcodescnt++;
                                        }
                                        proxyrequestitem.OPCodes = proxyopcodes;
                                    }
                                    #endregion

                                    proxyrequestitems[requestitemscnt] = proxyrequestitem;
                                    requestitemscnt++;
                                }
                                proxyrepairorderchange.RequestItems = proxyrequestitems;
                            }
                            #endregion

                            proxyrequest.RepairOrderChange = proxyrepairorderchange;
                        }
                        #endregion

                        //Run proxy web method with proxy request
                        _WA.Mapper.v2.RepairOrder.RepairOrderChangeResponse proxyresponse = proxyws.RepairOrderChange(proxyrequest);

                        //Mapping with Standard Interface Specification Object
                        if (proxyresponse != null)
                        {
                            if (proxyresponse.TransactionHeader != null)
                            {
                                #region//TransactionHeader Set
                                TransactionHeader transactionheader = new TransactionHeader();
                                transactionheader.CountryID = proxyresponse.TransactionHeader.CountryID;
                                transactionheader.DealerID = proxyresponse.TransactionHeader.DealerID;
                                transactionheader.DistributorID = proxyresponse.TransactionHeader.DistributorID;
                                transactionheader.DMSCode = proxyresponse.TransactionHeader.DMSCode;
                                transactionheader.DMSServerUrl = proxyresponse.TransactionHeader.DMSServerUrl;
                                transactionheader.DMSVersion = proxyresponse.TransactionHeader.DMSVersion;
                                transactionheader.DocumentVersion = proxyresponse.TransactionHeader.DocumentVersion;
                                transactionheader.GroupID = proxyresponse.TransactionHeader.GroupID;
                                transactionheader.IneterfaceID = proxyresponse.TransactionHeader.IneterfaceID;
                                transactionheader.Password = proxyresponse.TransactionHeader.Password;
                                transactionheader.PollingToken = proxyresponse.TransactionHeader.PollingToken;
                                transactionheader.RequestPollingToken = proxyresponse.TransactionHeader.RequestPollingToken;
                                transactionheader.RequestType = proxyresponse.TransactionHeader.RequestType;
                                transactionheader.TransactionId = proxyresponse.TransactionHeader.TransactionId;
                                transactionheader.TransactionDateTimeLocal = proxyresponse.TransactionHeader.TransactionDateTimeLocal;
                                transactionheader.TransactionDateTimeUTC = proxyresponse.TransactionHeader.TransactionDateTimeUTC;
                                transactionheader.TransactionType = proxyresponse.TransactionHeader.TransactionType;
                                transactionheader.Username = proxyresponse.TransactionHeader.Username;
                                transactionheader.VenderTrackingCode = proxyresponse.TransactionHeader.VenderTrackingCode;
                                response.TransactionHeader = transactionheader;
                                #endregion
                            }

                            //ResultMessage Set
                            if (proxyresponse.ResultMessage != null)
                            {
                                response.ResultMessage = GetResultMessageData(proxyresponse.ResultMessage.Code, proxyresponse.ResultMessage.Message);
                            }

                            if (proxyresponse.Errors != null)
                            {
                                //Error List Set
                                foreach (_WA.Mapper.v2.RepairOrder.Error1 proxyerror in proxyresponse.Errors)
                                {
                                    if (response.Errors != null)
                                        response.Errors.Add(GetErrorData(proxyerror.Code, proxyerror.Message));
                                    else
                                        response.Errors = GetErrorDataList(proxyerror.Code, proxyerror.Message);
                                }
                            }
                            else
                            {
                                #region//RepairOrderChangeResponse Set

                                //if (proxyresponse.RepairOrder != null)
                                //{
                                //_WA.Mapper.v2.RepairOrder.RepairOrder2 proxyrepairorder = proxyresponse.RepairOrder;

                                //#region //RepairOrder Header
                                //RepairOrder repairorder = new RepairOrder();
                                //repairorder.CloseDateTimeLocal = proxyrepairorder.CloseDateTimeLocal;
                                //repairorder.DeliveryDateTimeLocal = proxyrepairorder.DeliveryDateTimeLocal;
                                //repairorder.DMSROID = proxyrepairorder.DMSROID;
                                //repairorder.DMSRONo = proxyrepairorder.DMSRONo;
                                //repairorder.DMSROStatus = proxyrepairorder.DMSROStatus;
                                //repairorder.HangTagColor = proxyrepairorder.HangTagColor;
                                //repairorder.HangTagNo = proxyrepairorder.HangTagNo;
                                //repairorder.InMileage = proxyrepairorder.InMileage;
                                //repairorder.OpenDateTimeLocal = proxyrepairorder.OpenDateTimeLocal;
                                //repairorder.OutMileage = proxyrepairorder.OutMileage;
                                //repairorder.PaymentMethod = proxyrepairorder.PaymentMethod;
                                //repairorder.ROChannel = proxyrepairorder.ROChannel;
                                //repairorder.SAEmployeeID = proxyrepairorder.SAEmployeeID;
                                //repairorder.SAEmployeeName = proxyrepairorder.SAEmployeeName;
                                //repairorder.ServiceType = proxyrepairorder.ServiceType;
                                //repairorder.TCEmployeeID = proxyrepairorder.TCEmployeeID;
                                //repairorder.TCEmployeeName = proxyrepairorder.TCEmployeeName;
                                //repairorder.WorkType = proxyrepairorder.WorkType;
                                //#endregion

                                //#region//RepairOrder CustomerParts
                                //if (proxyrepairorder.CustomerParts != null && proxyrepairorder.CustomerParts.Length > 0)
                                //{
                                //    repairorder.CustomerParts = new List<CustomerPart>();
                                //    foreach (_WA.Mapper.v2.RepairOrder.CustomerPart2 proxycustomerpart in proxyrepairorder.CustomerParts)
                                //    {
                                //        CustomerPart customerpart = new CustomerPart();
                                //        customerpart.Comment = proxycustomerpart.Comment;
                                //        customerpart.PartDescription = proxycustomerpart.PartDescription;
                                //        customerpart.PartNumber = proxycustomerpart.PartNumber;
                                //        customerpart.Quantity = proxycustomerpart.Quantity;
                                //        customerpart.UnitOfMeasure = proxycustomerpart.UnitOfMeasure;
                                //        repairorder.CustomerParts.Add(customerpart);
                                //    }
                                //}
                                //#endregion

                                //#region //RepairOrder AdditionalFields
                                //if (proxyrepairorder.AdditionalFields != null && proxyrepairorder.AdditionalFields.Length > 0)
                                //{
                                //    repairorder.AdditionalFields = new List<AdditionalField>();
                                //    foreach (_WA.Mapper.v2.RepairOrder.AdditionalField2 proxyadditionalfield in proxyrepairorder.AdditionalFields)
                                //    {
                                //        AdditionalField additionalfield = new AdditionalField();
                                //        additionalfield.Name = proxyadditionalfield.Name;
                                //        additionalfield.Value = proxyadditionalfield.Value;
                                //        repairorder.AdditionalFields.Add(additionalfield);
                                //    }
                                //}
                                //#endregion

                                //#region//RepairOrder JobRefs
                                //if (proxyrepairorder.JobRefs != null && proxyrepairorder.JobRefs.Length > 0)
                                //{
                                //    repairorder.JobRefs = new List<JobRef>();
                                //    foreach (_WA.Mapper.v2.RepairOrder.JobRef2 proxyjobref in proxyrepairorder.JobRefs)
                                //    {
                                //        JobRef jobref = new JobRef();
                                //        jobref.DMSJobNo = proxyjobref.DMSJobNo;
                                //        jobref.DMSJobStatus = proxyjobref.DMSJobStatus;
                                //        repairorder.JobRefs.Add(jobref);
                                //    }
                                //}
                                //#endregion

                                //#region//RepairOrder ManagementFields
                                //if (proxyrepairorder.ManagementFields != null)
                                //{
                                //    ManagementFields managementfields = new ManagementFields();
                                //    managementfields.CreateDateTimeUTC = proxyrepairorder.ManagementFields.CreateDateTimeUTC;
                                //    managementfields.LastModifiedDateTimeUTC = proxyrepairorder.ManagementFields.LastModifiedDateTimeUTC;
                                //    repairorder.ManagementFields = managementfields;
                                //}
                                //#endregion

                                //#region//RepairOrder Options
                                //if (proxyrepairorder.Options != null && proxyrepairorder.Options.Length > 0)
                                //{
                                //    repairorder.Options = new List<Option>();
                                //    foreach (_WA.Mapper.v2.RepairOrder.Option2 proxyoption in proxyrepairorder.Options)
                                //    {
                                //        Option option = new Option();
                                //        option.Name = proxyoption.Name;
                                //        option.Value = proxyoption.Value;
                                //        repairorder.Options.Add(option);
                                //    }
                                //}
                                //#endregion

                                //#region//RepairOrder PriceType
                                //if (proxyrepairorder.PriceType != null)
                                //{
                                //    PriceType pricetype = new PriceType();
                                //    pricetype.DiscountPrice = proxyrepairorder.PriceType.DiscountPrice;
                                //    pricetype.DiscountRate = proxyrepairorder.PriceType.DiscountRate;
                                //    pricetype.TotalPrice = proxyrepairorder.PriceType.TotalPrice;
                                //    pricetype.TotalPriceIncludeTax = proxyrepairorder.PriceType.TotalPriceIncludeTax;
                                //    pricetype.UnitPrice = proxyrepairorder.PriceType.UnitPrice;
                                //    repairorder.PriceType = pricetype;
                                //}
                                //#endregion

                                //#region//RepairOrder AppointmentRef
                                //if (proxyrepairorder.AppointmentRef != null)
                                //{
                                //    AppointmentRef appointmentref = new AppointmentRef();
                                //    appointmentref.DMSAppointmentNo = proxyrepairorder.AppointmentRef.DMSAppointmentNo;
                                //    appointmentref.DMSAppointmentStatus = proxyrepairorder.AppointmentRef.DMSAppointmentStatus;
                                //    repairorder.AppointmentRef = appointmentref;
                                //}
                                //#endregion

                                //#region//RepairOrder Customers
                                //if (proxyrepairorder.Customers != null && proxyrepairorder.Customers.Length > 0)
                                //{
                                //    repairorder.Customers = new List<Data.v2.Common.Customer.Customer>();
                                //    foreach (_WA.Mapper.v2.RepairOrder.Customer3 proxycustomer in proxyrepairorder.Customers)
                                //    {
                                //        #region//RepairOrder Customer Header
                                //        WA.Standard.IF.Data.v2.Common.Customer.Customer customer = new Data.v2.Common.Customer.Customer();
                                //        customer.CardNo = proxycustomer.CardNo;
                                //        customer.CorporateInfos = customer.CorporateInfos;
                                //        customer.CustomerInfoType = customer.CustomerInfoType;
                                //        customer.DMSCustomerNo = proxycustomer.DMSCustomerNo;
                                //        customer.Email = proxycustomer.Email;
                                //        customer.FirstName = proxycustomer.FirstName;
                                //        customer.FullName = proxycustomer.FullName;
                                //        customer.Gender = proxycustomer.Gender;
                                //        customer.LastName = proxycustomer.LastName;
                                //        customer.MiddleName = proxycustomer.MiddleName;
                                //        customer.Salutation = proxycustomer.Salutation;
                                //        #endregion

                                //        #region//RepairOrder Customer Addresses
                                //        if (proxycustomer.Addresses != null && proxycustomer.Addresses.Length > 0)
                                //        {
                                //            customer.Addresses = new List<Data.v2.Common.Customer.Address>();
                                //            foreach (_WA.Mapper.v2.RepairOrder.Address2 proxyaddress in proxycustomer.Addresses)
                                //            {
                                //                Data.v2.Common.Customer.Address address = new Data.v2.Common.Customer.Address();
                                //                address.Address1 = proxyaddress.Address1;
                                //                address.Address2 = proxyaddress.Address21;
                                //                address.AddressType = proxyaddress.AddressType;
                                //                address.City = proxyaddress.City;
                                //                address.Country = proxyaddress.Country;
                                //                address.State = proxyaddress.State;
                                //                address.ZipCode = proxyaddress.ZipCode;
                                //                customer.Addresses.Add(address);
                                //            }
                                //        }
                                //        #endregion

                                //        #region//RepairOrder Customer Contacts
                                //        if (proxycustomer.Contacts != null && proxycustomer.Contacts.Length > 0)
                                //        {
                                //            customer.Contacts = new List<Data.v2.Common.Customer.Contact>();
                                //            foreach (_WA.Mapper.v2.RepairOrder.Contact3 proxycontact in proxycustomer.Contacts)
                                //            {
                                //                Data.v2.Common.Customer.Contact contact = new Data.v2.Common.Customer.Contact();
                                //                contact.ContactMethodYN = proxycontact.ContactMethodYN;
                                //                contact.ContactType = proxycontact.ContactType;
                                //                contact.ContactValue = proxycontact.ContactValue;
                                //                customer.Contacts.Add(contact);
                                //            }
                                //        }
                                //        #endregion

                                //        #region//RepairOrder Customer SpecialMessage
                                //        if (proxycustomer.SpecialMessage != null)
                                //        {
                                //            Data.v2.Common.Customer.SpecialMessage specialmessage = new Data.v2.Common.Customer.SpecialMessage();
                                //            specialmessage.Message = proxycustomer.SpecialMessage.Message;
                                //            customer.SpecialMessage = specialmessage;
                                //        }
                                //        #endregion

                                //        #region//RepairOrder Customer CorporateInfos
                                //        if (proxycustomer.CorporateInfos != null && proxycustomer.CorporateInfos.Length > 0)
                                //        {
                                //            customer.CorporateInfos = new List<Data.v2.Common.Customer.CorporateInfo>();
                                //            foreach (_WA.Mapper.v2.RepairOrder.CorporateInfo2 proxycorporateinfo in proxycustomer.CorporateInfos)
                                //            {
                                //                Data.v2.Common.Customer.CorporateInfo corporateinfo = new Data.v2.Common.Customer.CorporateInfo();
                                //                corporateinfo.Name = proxycorporateinfo.Name;
                                //                corporateinfo.Value = proxycorporateinfo.Value;
                                //                customer.CorporateInfos.Add(corporateinfo);
                                //            }
                                //        }
                                //        #endregion

                                //        repairorder.Customers.Add(customer);
                                //    }
                                //}
                                //#endregion

                                //#region//RepairOrder Vehicle
                                //if (proxyrepairorder.Vehicle != null)
                                //{
                                //    if (proxyrepairorder.Vehicle != null)
                                //    {
                                //        #region//RepairOrder Vehicle Header
                                //        Data.v2.Common.Vehicle.Vehicle vehicle = new Data.v2.Common.Vehicle.Vehicle();
                                //        vehicle.Color = proxyrepairorder.Vehicle.Color;
                                //        vehicle.Cylinders = proxyrepairorder.Vehicle.Cylinders;
                                //        vehicle.DateDelivered = proxyrepairorder.Vehicle.DateDelivered;
                                //        vehicle.DateInService = proxyrepairorder.Vehicle.DateInService;
                                //        vehicle.DeclinedJob = proxyrepairorder.Vehicle.DeclinedJob;
                                //        vehicle.DisplayDescription = proxyrepairorder.Vehicle.DisplayDescription;
                                //        vehicle.DMSVehicleNo = proxyrepairorder.Vehicle.DMSVehicleNo;
                                //        vehicle.EngineType = proxyrepairorder.Vehicle.EngineType;
                                //        vehicle.ExtendedWarranty = proxyrepairorder.Vehicle.ExtendedWarranty;
                                //        vehicle.FuelType = proxyrepairorder.Vehicle.FuelType;
                                //        vehicle.FullModelName = proxyrepairorder.Vehicle.FullModelName;
                                //        vehicle.InsuranceDate = proxyrepairorder.Vehicle.InsuranceDate;
                                //        vehicle.LastMileage = proxyrepairorder.Vehicle.LastMileage;
                                //        vehicle.LastServiceDate = proxyrepairorder.Vehicle.LastServiceDate;
                                //        vehicle.LastSixVIN = proxyrepairorder.Vehicle.LastSixVIN;
                                //        vehicle.LicenseNumber = proxyrepairorder.Vehicle.LicenseNumber;
                                //        vehicle.LicensePlateNo = proxyrepairorder.Vehicle.LicensePlateNo;
                                //        vehicle.Make = proxyrepairorder.Vehicle.Make;
                                //        vehicle.ModelCode = proxyrepairorder.Vehicle.ModelCode;
                                //        vehicle.ModelName = proxyrepairorder.Vehicle.ModelName;
                                //        vehicle.ModelYear = proxyrepairorder.Vehicle.ModelYear;
                                //        vehicle.PendingJob = proxyrepairorder.Vehicle.PendingJob;
                                //        vehicle.StockNumber = proxyrepairorder.Vehicle.StockNumber;
                                //        vehicle.Trim = proxyrepairorder.Vehicle.Trim;
                                //        vehicle.VehicleType = proxyrepairorder.Vehicle.VehicleType;
                                //        vehicle.VIN = proxyrepairorder.Vehicle.VIN;
                                //        vehicle.WarrantyMiles = proxyrepairorder.Vehicle.WarrantyMiles;
                                //        vehicle.WarrantyMonths = proxyrepairorder.Vehicle.WarrantyMonths;
                                //        vehicle.WarrantyStartDate = proxyrepairorder.Vehicle.WarrantyStartDate;
                                //        #endregion

                                //        #region//RepairOrder Vehicle Campaigns
                                //        if (proxyrepairorder.Vehicle.Campaigns != null && proxyrepairorder.Vehicle.Campaigns.Length > 0)
                                //        {
                                //            vehicle.Campaigns = new List<Data.v2.Common.Vehicle.Campaign>();
                                //            foreach (_WA.Mapper.v2.RepairOrder.Campaign2 proxycampaign in proxyrepairorder.Vehicle.Campaigns)
                                //            {
                                //                Data.v2.Common.Vehicle.Campaign campaign = new Data.v2.Common.Vehicle.Campaign();
                                //                campaign.CampaignDescription = proxycampaign.CampaignDescription;
                                //                campaign.CampaignID = proxycampaign.CampaignID;
                                //                campaign.CampaignPerformed = proxycampaign.CampaignPerformed;
                                //                vehicle.Campaigns.Add(campaign);
                                //            }
                                //        }
                                //        #endregion

                                //        repairorder.Vehicle = vehicle;
                                //    }
                                //}
                                //#endregion

                                //#region//RepairOrder RequestItems
                                //if (proxyrepairorder.RequestItems != null && proxyrepairorder.RequestItems.Length > 0)
                                //{
                                //    repairorder.RequestItems = new List<RequestItem>();
                                //    foreach (_WA.Mapper.v2.RepairOrder.RequestItem2 proxyrequestitem in proxyrepairorder.RequestItems)
                                //    {
                                //        #region//RepairOrder RequestItem Header
                                //        RequestItem requestitem = new RequestItem();
                                //        requestitem.CPSIND = proxyrequestitem.CPSIND;
                                //        requestitem.RequestCode = proxyrequestitem.RequestCode;
                                //        requestitem.RequestDescription = proxyrequestitem.RequestDescription;
                                //        requestitem.ServiceLineNumber = proxyrequestitem.ServiceLineNumber;
                                //        requestitem.ServiceLineStatus = proxyrequestitem.ServiceLineStatus;
                                //        requestitem.ServiceType = proxyrequestitem.ServiceType;
                                //        requestitem.TCEmployeeID = proxyrequestitem.TCEmployeeID;
                                //        requestitem.TCEmployeeName = proxyrequestitem.TCEmployeeName;
                                //        requestitem.WorkType = proxyrequestitem.WorkType;
                                //        #endregion

                                //        #region//RepairOrder RequestItem Comments
                                //        if (proxyrequestitem.Comments != null && proxyrequestitem.Comments.Length > 0)
                                //        {
                                //            requestitem.Comments = new List<Comment>();
                                //            foreach (_WA.Mapper.v2.RepairOrder.Comment2 proxycomment in proxyrequestitem.Comments)
                                //            {
                                //                Comment comment = new Comment();
                                //                comment.DescriptionComment = proxycomment.DescriptionComment;
                                //                comment.SequenceNumber = proxycomment.SequenceNumber;
                                //                requestitem.Comments.Add(comment);
                                //            }
                                //        }
                                //        #endregion

                                //        #region//RepairOrder RequestItem Descriptions
                                //        if (proxyrequestitem.Descriptions != null && proxyrequestitem.Descriptions.Length > 0)
                                //        {
                                //            requestitem.Descriptions = new List<Description>();
                                //            foreach (_WA.Mapper.v2.RepairOrder.Description2 proxydescription in proxyrequestitem.Descriptions)
                                //            {
                                //                Description description = new Description();
                                //                description.DescriptionComment = proxydescription.DescriptionComment;
                                //                description.SequenceNumber = proxydescription.SequenceNumber;
                                //                requestitem.Descriptions.Add(description);
                                //            }
                                //        }
                                //        #endregion

                                //        #region//RepairOrder RequestItem OPCodes
                                //        if (proxyrequestitem.OPCodes != null && proxyrequestitem.OPCodes.Length > 0)
                                //        {
                                //            requestitem.OPCodes = new List<OPCode>();
                                //            foreach (_WA.Mapper.v2.RepairOrder.OPCode2 proxyopcode in proxyrequestitem.OPCodes)
                                //            {
                                //                #region//RepairOrder RequestItem OPCode Header
                                //                OPCode opcode = new OPCode();
                                //                opcode.ActualHours = proxyopcode.ActualHours;
                                //                opcode.Code = proxyopcode.Code;
                                //                opcode.Description = proxyopcode.Description;
                                //                opcode.EstimatedHours = proxyopcode.EstimatedHours;
                                //                opcode.SequenceNumber = proxyopcode.SequenceNumber;
                                //                opcode.ServiceType = proxyopcode.ServiceType;
                                //                opcode.SkillLevel = proxyopcode.SkillLevel;
                                //                #endregion

                                //                #region//RepairOrder RequestItem OPCode Descriptions
                                //                if (proxyopcode.Descriptions != null && proxyopcode.Descriptions.Length > 0)
                                //                {
                                //                    opcode.Descriptions = new List<Description>();
                                //                    foreach (_WA.Mapper.v2.RepairOrder.Description2 proxydescription in proxyopcode.Descriptions)
                                //                    {
                                //                        Description description = new Description();
                                //                        description.DescriptionComment = proxydescription.DescriptionComment;
                                //                        description.SequenceNumber = proxydescription.SequenceNumber;
                                //                        opcode.Descriptions.Add(description);
                                //                    }
                                //                }
                                //                #endregion

                                //                #region//RepairOrder RequestItem OPCode Causes
                                //                if (proxyopcode.Causes != null && proxyopcode.Causes.Length > 0)
                                //                {
                                //                    opcode.Causes = new List<Cause>();
                                //                    foreach (_WA.Mapper.v2.RepairOrder.Cause2 proxycause in proxyopcode.Causes)
                                //                    {
                                //                        Cause cause = new Cause();
                                //                        cause.CauseLaborOpCode = proxycause.CauseLaborOpCode;
                                //                        cause.Comment = proxycause.Comment;
                                //                        cause.SequenceNumber = proxycause.SequenceNumber;
                                //                        opcode.Causes.Add(cause);
                                //                    }
                                //                }
                                //                #endregion

                                //                #region//RepairOrder RequestItem OPCode Corrections
                                //                if (proxyopcode.Corrections != null && proxyopcode.Corrections.Length > 0)
                                //                {
                                //                    opcode.Corrections = new List<Correction>();
                                //                    foreach (_WA.Mapper.v2.RepairOrder.Correction2 proxycorrection in proxyopcode.Corrections)
                                //                    {
                                //                        Correction correction = new Correction();
                                //                        correction.CorrectionLaborOpCode = proxycorrection.CorrectionLaborOpCode;
                                //                        correction.Comment = proxycorrection.Comment;
                                //                        correction.SequenceNumber = proxycorrection.SequenceNumber;
                                //                        opcode.Corrections.Add(correction);
                                //                    }
                                //                }
                                //                #endregion

                                //                #region//RepairOrder RequestItem OPCode PriceType
                                //                if (proxyopcode.PriceType != null)
                                //                {
                                //                    PriceType pricetype = new PriceType();
                                //                    pricetype.DiscountPrice = proxyopcode.PriceType.DiscountPrice;
                                //                    pricetype.DiscountRate = proxyopcode.PriceType.DiscountRate;
                                //                    pricetype.TotalPrice = proxyopcode.PriceType.TotalPrice;
                                //                    pricetype.TotalPriceIncludeTax = proxyopcode.PriceType.TotalPriceIncludeTax;
                                //                    pricetype.UnitPrice = proxyopcode.PriceType.UnitPrice;
                                //                    opcode.PriceType = pricetype;
                                //                }
                                //                #endregion

                                //                #region//RepairOrder RequestItem OPCode Parts
                                //                if (proxyopcode.Parts != null && proxyopcode.Parts.Length > 0)
                                //                {
                                //                    opcode.Parts = new List<Part>();
                                //                    foreach (_WA.Mapper.v2.RepairOrder.Part2 proxypart in proxyopcode.Parts)
                                //                    {
                                //                        #region//RepairOrder RequestItem OPCode Parts Header
                                //                        Part part = new Part();
                                //                        part.DisplayPartNumber = proxypart.DisplayPartNumber;
                                //                        part.PartDescription = proxypart.PartDescription;
                                //                        part.PartNumber = proxypart.PartNumber;
                                //                        part.PartType = proxypart.PartType;
                                //                        part.Quantity = proxypart.Quantity;
                                //                        part.SequenceNumber = proxypart.SequenceNumber;
                                //                        part.ServiceType = proxypart.ServiceType;
                                //                        part.StockQuantity = proxypart.StockQuantity;
                                //                        part.StockStatus = proxypart.StockStatus;
                                //                        part.UnitOfMeasure = proxypart.UnitOfMeasure;
                                //                        #endregion

                                //                        #region//RepairOrder RequestItem OPCode Parts Descriptions
                                //                        if (proxypart.Descriptions != null && proxypart.Descriptions.Length > 0)
                                //                        {
                                //                            part.Descriptions = new List<Description>();
                                //                            foreach (_WA.Mapper.v2.RepairOrder.Description2 proxydescription in proxypart.Descriptions)
                                //                            {
                                //                                Description description = new Description();
                                //                                description.DescriptionComment = proxydescription.DescriptionComment;
                                //                                description.SequenceNumber = proxydescription.SequenceNumber;
                                //                                part.Descriptions.Add(description);
                                //                            }
                                //                        }
                                //                        #endregion

                                //                        #region//RepairOrder RequestItem OPCode Parts PriceType
                                //                        if (proxypart.PriceType != null)
                                //                        {
                                //                            PriceType pricetype = new PriceType();
                                //                            pricetype.DiscountPrice = proxypart.PriceType.DiscountPrice;
                                //                            pricetype.DiscountRate = proxypart.PriceType.DiscountRate;
                                //                            pricetype.TotalPrice = proxypart.PriceType.TotalPrice;
                                //                            pricetype.TotalPriceIncludeTax = proxypart.PriceType.TotalPriceIncludeTax;
                                //                            pricetype.UnitPrice = proxypart.PriceType.UnitPrice;
                                //                            part.PriceType = pricetype;
                                //                        }
                                //                        #endregion

                                //                        opcode.Parts.Add(part);
                                //                    }
                                //                }
                                //                #endregion

                                //                #region//RepairOrder RequestItem OPCode Sublets
                                //                if (proxyopcode.Sublets != null && proxyopcode.Sublets.Length > 0)
                                //                {
                                //                    opcode.Sublets = new List<Sublet>();
                                //                    foreach (_WA.Mapper.v2.RepairOrder.Sublet2 proxysublet in proxyopcode.Sublets)
                                //                    {
                                //                        #region//RepairOrder RequestItem OPCode Sublet Header
                                //                        Sublet sublet = new Sublet();
                                //                        sublet.SequenceNumber = proxysublet.SequenceNumber;
                                //                        sublet.ServiceType = proxysublet.ServiceType;
                                //                        #endregion

                                //                        #region//RepairOrder RequestItem OPCode Sublets Descriptions
                                //                        if (proxysublet.Descriptions != null && proxysublet.Descriptions.Length > 0)
                                //                        {
                                //                            sublet.Descriptions = new List<Description>();
                                //                            foreach (_WA.Mapper.v2.RepairOrder.Description2 proxydescription in proxysublet.Descriptions)
                                //                            {
                                //                                Description description = new Description();
                                //                                description.DescriptionComment = proxydescription.DescriptionComment;
                                //                                description.SequenceNumber = proxydescription.SequenceNumber;
                                //                                sublet.Descriptions.Add(description);
                                //                            }
                                //                        }
                                //                        #endregion

                                //                        #region//RepairOrder RequestItem OPCode Sublets PriceType
                                //                        if (proxysublet.PriceType != null)
                                //                        {
                                //                            PriceType pricetype = new PriceType();
                                //                            pricetype.DiscountPrice = proxysublet.PriceType.DiscountPrice;
                                //                            pricetype.DiscountRate = proxysublet.PriceType.DiscountRate;
                                //                            pricetype.TotalPrice = proxysublet.PriceType.TotalPrice;
                                //                            pricetype.TotalPriceIncludeTax = proxysublet.PriceType.TotalPriceIncludeTax;
                                //                            pricetype.UnitPrice = proxysublet.PriceType.UnitPrice;
                                //                            sublet.PriceType = pricetype;
                                //                        }
                                //                        #endregion

                                //                        opcode.Sublets.Add(sublet);
                                //                    }
                                //                }
                                //                #endregion

                                //                #region//RepairOrder RequestItem OPCode MISCs
                                //                if (proxyopcode.MISCs != null && proxyopcode.MISCs.Length > 0)
                                //                {
                                //                    opcode.MISCs = new List<MISC>();
                                //                    foreach (_WA.Mapper.v2.RepairOrder.MISC2 proxymisc in proxyopcode.MISCs)
                                //                    {
                                //                        #region//RepairOrder RequestItem OPCode MISC Header
                                //                        MISC misc = new MISC();
                                //                        misc.SequenceNumber = proxymisc.SequenceNumber;
                                //                        misc.ServiceType = proxymisc.ServiceType;
                                //                        #endregion

                                //                        #region//RepairOrder RequestItem OPCode MISCs Descriptions
                                //                        if (proxymisc.Descriptions != null && proxymisc.Descriptions.Length > 0)
                                //                        {
                                //                            misc.Descriptions = new List<Description>();
                                //                            foreach (_WA.Mapper.v2.RepairOrder.Description2 proxydescription in proxymisc.Descriptions)
                                //                            {
                                //                                Description description = new Description();
                                //                                description.DescriptionComment = proxydescription.DescriptionComment;
                                //                                description.SequenceNumber = proxydescription.SequenceNumber;
                                //                                misc.Descriptions.Add(description);
                                //                            }
                                //                        }
                                //                        #endregion

                                //                        #region//RepairOrder RequestItem OPCode MISCs PriceType
                                //                        if (proxymisc.PriceType != null)
                                //                        {
                                //                            PriceType pricetype = new PriceType();
                                //                            pricetype.DiscountPrice = proxymisc.PriceType.DiscountPrice;
                                //                            pricetype.DiscountRate = proxymisc.PriceType.DiscountRate;
                                //                            pricetype.TotalPrice = proxymisc.PriceType.TotalPrice;
                                //                            pricetype.TotalPriceIncludeTax = proxymisc.PriceType.TotalPriceIncludeTax;
                                //                            pricetype.UnitPrice = proxymisc.PriceType.UnitPrice;
                                //                            misc.PriceType = pricetype;
                                //                        }
                                //                        #endregion

                                //                        opcode.MISCs.Add(misc);
                                //                    }
                                //                }
                                //                #endregion

                                //                requestitem.OPCodes.Add(opcode);
                                //            }
                                //        }
                                //        #endregion

                                //        repairorder.RequestItems.Add(requestitem);
                                //    }
                                //}
                                //#endregion

                                //response.RepairOrder = repairorder;
                                //}
                                #endregion
                            }
                        }
                        else
                        {
                            if (response.Errors != null)
                                response.Errors.Add(GetErrorData(ResponseCode.Fail, ResponseMessage.Fail));
                            else
                                response.Errors = GetErrorDataList(ResponseCode.Fail, ResponseMessage.Fail);
                        }
                        #endregion
                    }
                    break;
                case "v2.HMCIS.1C.v4":
                    {
                        #region v2.HMCIS.1C.v4 - RTR (Proxy Class Dll Name : _WA.Mapper.v2)

                        #region RepairOrderChange Request Set

                        //Create proxy credential
                        NetworkCredential proxycredential = new NetworkCredential(request.TransactionHeader.Username, request.TransactionHeader.Password);

                        //Create proxy web service from dms web service with credential
                        _WA.Mapper.v2.RepairOrder.RepairOrder proxyws = new _WA.Mapper.v2.RepairOrder.RepairOrder(request.TransactionHeader.DMSServerUrl);
                        proxyws.Credentials = proxycredential;

                        //Create proxy request with repairorderchange and transaction
                        _WA.Mapper.v2.RepairOrder.RepairOrderChangeRequest proxyrequest = new _WA.Mapper.v2.RepairOrder.RepairOrderChangeRequest();

                        //Create proxy transaction
                        _WA.Mapper.v2.RepairOrder.TransactionHeader2 proxytransactionheader = new _WA.Mapper.v2.RepairOrder.TransactionHeader2();
                        if (request.TransactionHeader != null)
                        {
                            #region//TransactionHeader Set
                            proxytransactionheader.CountryID = request.TransactionHeader.CountryID;
                            proxytransactionheader.DealerID = request.TransactionHeader.DealerID;
                            proxytransactionheader.DistributorID = request.TransactionHeader.DistributorID;
                            proxytransactionheader.DMSCode = request.TransactionHeader.DMSCode;
                            proxytransactionheader.DMSServerUrl = request.TransactionHeader.DMSServerUrl;
                            proxytransactionheader.DMSVersion = request.TransactionHeader.DMSVersion;
                            proxytransactionheader.DocumentVersion = request.TransactionHeader.DocumentVersion;
                            proxytransactionheader.GroupID = request.TransactionHeader.GroupID;
                            proxytransactionheader.IneterfaceID = request.TransactionHeader.IneterfaceID;
                            proxytransactionheader.Password = request.TransactionHeader.Password;
                            proxytransactionheader.PollingToken = request.TransactionHeader.PollingToken;
                            proxytransactionheader.RequestPollingToken = request.TransactionHeader.RequestPollingToken;
                            proxytransactionheader.RequestType = request.TransactionHeader.RequestType;
                            proxytransactionheader.TransactionId = request.TransactionHeader.TransactionId;
                            proxytransactionheader.TransactionDateTimeLocal = request.TransactionHeader.TransactionDateTimeLocal;
                            proxytransactionheader.TransactionDateTimeUTC = request.TransactionHeader.TransactionDateTimeUTC;
                            proxytransactionheader.TransactionType = request.TransactionHeader.TransactionType;
                            proxytransactionheader.Username = request.TransactionHeader.Username;
                            proxytransactionheader.VenderTrackingCode = request.TransactionHeader.VenderTrackingCode;
                            proxyrequest.TransactionHeader = proxytransactionheader;
                            #endregion
                        }

                        //Create proxy repairorderchange
                        _WA.Mapper.v2.RepairOrder.RepairOrderChange proxyrepairorderchange = new _WA.Mapper.v2.RepairOrder.RepairOrderChange();
                        if (request.RepairOrderChange != null)
                        {
                            #region//RepairOrder Header
                            proxyrepairorderchange.CloseDateTimeLocal = request.RepairOrderChange.CloseDateTimeLocal;
                            proxyrepairorderchange.DeliveryDateTimeLocal = request.RepairOrderChange.DeliveryDateTimeLocal;
                            proxyrepairorderchange.DMSROID = request.RepairOrderChange.DMSROID;
                            proxyrepairorderchange.DMSRONo = request.RepairOrderChange.DMSRONo;
                            proxyrepairorderchange.DMSROStatus = request.RepairOrderChange.DMSROStatus;
                            proxyrepairorderchange.HangTagColor = request.RepairOrderChange.HangTagColor;
                            proxyrepairorderchange.HangTagNo = request.RepairOrderChange.HangTagNo;
                            proxyrepairorderchange.HangTagNo = request.RepairOrderChange.HangTagNo;
                            proxyrepairorderchange.OpenDateTimeLocal = request.RepairOrderChange.OpenDateTimeLocal;
                            proxyrepairorderchange.OutMileage = request.RepairOrderChange.OutMileage;
                            proxyrepairorderchange.PaymentMethod = request.RepairOrderChange.PaymentMethod;
                            proxyrepairorderchange.ROChannel = request.RepairOrderChange.ROChannel;
                            proxyrepairorderchange.SAEmployeeID = request.RepairOrderChange.SAEmployeeID;
                            proxyrepairorderchange.SAEmployeeName = request.RepairOrderChange.SAEmployeeName;
                            proxyrepairorderchange.ServiceType = request.RepairOrderChange.ServiceType;
                            proxyrepairorderchange.TCEmployeeID = request.RepairOrderChange.TCEmployeeID;
                            proxyrepairorderchange.TCEmployeeName = request.RepairOrderChange.TCEmployeeName;
                            proxyrepairorderchange.WorkType = request.RepairOrderChange.WorkType;
                            #endregion

                            #region//RepairOrder AppointmentRef
                            if (request.RepairOrderChange.AppointmentRef != null)
                            {
                                _WA.Mapper.v2.RepairOrder.AppointmentRef1 proxyappointmentref = new _WA.Mapper.v2.RepairOrder.AppointmentRef1();
                                proxyappointmentref.DMSAppointmentNo = request.RepairOrderChange.AppointmentRef.DMSAppointmentNo;
                                proxyappointmentref.DMSAppointmentStatus = request.RepairOrderChange.AppointmentRef.DMSAppointmentStatus;
                                proxyrepairorderchange.AppointmentRef = proxyappointmentref;
                            }
                            #endregion

                            #region//RepairOrder CustomerParts
                            if (request.RepairOrderChange.CustomerParts != null && request.RepairOrderChange.CustomerParts.Count > 0)
                            {
                                int customerpartscnt = 0;
                                _WA.Mapper.v2.RepairOrder.CustomerPart1[] proxycustomerparts = new _WA.Mapper.v2.RepairOrder.CustomerPart1[request.RepairOrderChange.CustomerParts.Count];
                                foreach (CustomerPart customerpart in request.RepairOrderChange.CustomerParts)
                                {
                                    _WA.Mapper.v2.RepairOrder.CustomerPart1 proxycustomerpart = new _WA.Mapper.v2.RepairOrder.CustomerPart1();
                                    proxycustomerpart.Comment = customerpart.Comment;
                                    proxycustomerpart.PartDescription = customerpart.PartDescription;
                                    proxycustomerpart.PartNumber = customerpart.PartNumber;
                                    proxycustomerpart.Quantity = customerpart.Quantity;
                                    proxycustomerpart.UnitOfMeasure = customerpart.UnitOfMeasure;
                                    proxycustomerparts[customerpartscnt] = proxycustomerpart;
                                    customerpartscnt++;
                                }
                            }
                            #endregion

                            #region //RepairOrder AdditionalFields
                            if (request.RepairOrderChange.AdditionalFields != null && request.RepairOrderChange.AdditionalFields.Count > 0)
                            {
                                int additionalfieldscnt = 0;
                                _WA.Mapper.v2.RepairOrder.AdditionalField1[] proxyadditionalfields = new _WA.Mapper.v2.RepairOrder.AdditionalField1[request.RepairOrderChange.AdditionalFields.Count];
                                foreach (AdditionalField additionalfield in request.RepairOrderChange.AdditionalFields)
                                {
                                    _WA.Mapper.v2.RepairOrder.AdditionalField1 proxyadditionalfield = new _WA.Mapper.v2.RepairOrder.AdditionalField1();
                                    proxyadditionalfield.Name = additionalfield.AdditionalFieldName;
                                    proxyadditionalfield.Value = additionalfield.AdditionalFieldValue;
                                    proxyadditionalfields[additionalfieldscnt] = proxyadditionalfield;
                                    additionalfieldscnt++;
                                }
                                proxyrepairorderchange.AdditionalFields = proxyadditionalfields;
                            }
                            #endregion

                            #region//RepairOrder Options
                            if (request.RepairOrderChange.Options != null && request.RepairOrderChange.Options.Count > 0)
                            {
                                int optionscnt = 0;
                                _WA.Mapper.v2.RepairOrder.Option1[] proxyoptions = new _WA.Mapper.v2.RepairOrder.Option1[request.RepairOrderChange.Options.Count];
                                foreach (Option option in request.RepairOrderChange.Options)
                                {
                                    _WA.Mapper.v2.RepairOrder.Option1 proxyoption = new _WA.Mapper.v2.RepairOrder.Option1();
                                    proxyoption.Name = option.OptionName;
                                    proxyoption.Value = option.OptionValue;
                                    proxyoptions[optionscnt] = proxyoption;
                                    optionscnt++;
                                }
                                proxyrepairorderchange.Options = proxyoptions;
                            }
                            #endregion

                            #region//RepairOrder PriceType
                            if (request.RepairOrderChange.PriceType != null)
                            {
                                _WA.Mapper.v2.RepairOrder.PriceType1 proxypricetype = new _WA.Mapper.v2.RepairOrder.PriceType1();
                                proxypricetype.DiscountPrice = request.RepairOrderChange.PriceType.DiscountPrice;
                                proxypricetype.DiscountRate = request.RepairOrderChange.PriceType.DiscountRate;
                                proxypricetype.TotalPrice = request.RepairOrderChange.PriceType.TotalPrice;
                                proxypricetype.TotalPriceIncludeTax = request.RepairOrderChange.PriceType.TotalPriceIncludeTax;
                                proxypricetype.UnitPrice = request.RepairOrderChange.PriceType.UnitPrice;
                                proxyrepairorderchange.PriceType = proxypricetype;
                            }
                            #endregion

                            #region//RepairOrder Customers
                            if (request.RepairOrderChange.Customers != null && request.RepairOrderChange.Customers.Count > 0)
                            {
                                int customerscnt = 0;
                                _WA.Mapper.v2.RepairOrder.Customer2[] proxycustomers = new _WA.Mapper.v2.RepairOrder.Customer2[request.RepairOrderChange.Customers.Count];
                                foreach (WA.Standard.IF.Data.v2.Common.Customer.Customer customer in request.RepairOrderChange.Customers)
                                {
                                    #region//RepairOrder Customer Header
                                    _WA.Mapper.v2.RepairOrder.Customer2 proxycustomer = new _WA.Mapper.v2.RepairOrder.Customer2();
                                    proxycustomer.CardNo = customer.CardNo;
                                    proxycustomer.CustomerInfoType = customer.CustomerInfoType;
                                    proxycustomer.DMSCustomerNo = customer.DMSCustomerNo;
                                    proxycustomer.Email = customer.Email;
                                    proxycustomer.FirstName = customer.FirstName;
                                    proxycustomer.FullName = customer.FullName;
                                    proxycustomer.Gender = customer.Gender;
                                    proxycustomer.LastName = customer.LastName;
                                    proxycustomer.MiddleName = customer.MiddleName;
                                    proxycustomer.Salutation = customer.Salutation;
                                    #endregion

                                    #region//RepairOrder Customer Addresses
                                    if (customer.Addresses != null && customer.Addresses.Count > 0)
                                    {
                                        int addressescnt = 0;
                                        _WA.Mapper.v2.RepairOrder.Address1[] proxyaddresses = new _WA.Mapper.v2.RepairOrder.Address1[customer.Addresses.Count];
                                        foreach (WA.Standard.IF.Data.v2.Common.Customer.Address address in customer.Addresses)
                                        {
                                            _WA.Mapper.v2.RepairOrder.Address1 proxyaddress = new _WA.Mapper.v2.RepairOrder.Address1();
                                            proxyaddress.Address11 = address.Address1;
                                            proxyaddress.Address2 = address.Address2;
                                            proxyaddress.AddressType = address.AddressType;
                                            proxyaddress.City = address.City;
                                            proxyaddress.Country = address.Country;
                                            proxyaddress.State = address.State;
                                            proxyaddress.ZipCode = address.ZipCode;
                                            proxyaddresses[addressescnt] = proxyaddress;
                                            addressescnt++;
                                        }
                                        proxycustomer.Addresses = proxyaddresses;
                                    }
                                    #endregion

                                    #region//RepairOrder Customer Contacts
                                    if (customer.Contacts != null && customer.Contacts.Count > 0)
                                    {
                                        int contactscnt = 0;
                                        _WA.Mapper.v2.RepairOrder.Contact2[] proxycontacts = new _WA.Mapper.v2.RepairOrder.Contact2[customer.Contacts.Count];
                                        foreach (WA.Standard.IF.Data.v2.Common.Customer.Contact contact in customer.Contacts)
                                        {
                                            _WA.Mapper.v2.RepairOrder.Contact2 proxycontact = new _WA.Mapper.v2.RepairOrder.Contact2();
                                            proxycontact.ContactMethodYN = contact.ContactMethodYN;
                                            proxycontact.ContactType = contact.ContactType;
                                            proxycontact.ContactValue = contact.ContactValue;
                                            proxycontacts[contactscnt] = proxycontact;
                                            contactscnt++;
                                        }
                                        proxycustomer.Contacts = proxycontacts;
                                    }
                                    #endregion

                                    #region//RepairOrder Customer SpecialMessage
                                    if (customer.SpecialMessage != null)
                                    {
                                        _WA.Mapper.v2.RepairOrder.SpecialMessage1 proxyspecialmessage = new _WA.Mapper.v2.RepairOrder.SpecialMessage1();
                                        proxyspecialmessage.Message = customer.SpecialMessage.Message;
                                        proxycustomer.SpecialMessage = proxyspecialmessage;
                                    }
                                    #endregion

                                    #region//RepairOrder Customer CorporateInfos
                                    if (customer.CorporateInfos != null && customer.CorporateInfos.Count > 0)
                                    {
                                        int corporateinfoscnt = 0;
                                        _WA.Mapper.v2.RepairOrder.CorporateInfo1[] proxycorporateinfos = new _WA.Mapper.v2.RepairOrder.CorporateInfo1[customer.CorporateInfos.Count];
                                        foreach (WA.Standard.IF.Data.v2.Common.Customer.CorporateInfo corporateinfo in customer.CorporateInfos)
                                        {
                                            _WA.Mapper.v2.RepairOrder.CorporateInfo1 proxycorporateinfo = new _WA.Mapper.v2.RepairOrder.CorporateInfo1();
                                            proxycorporateinfo.Name = corporateinfo.CorporateInfoName;
                                            proxycorporateinfo.Value = corporateinfo.CorporateInfoValue;
                                            proxycorporateinfos[corporateinfoscnt] = proxycorporateinfo;
                                            corporateinfoscnt++;
                                        }
                                        proxycustomer.CorporateInfos = proxycorporateinfos;
                                    }
                                    #endregion

                                    proxycustomers[customerscnt] = proxycustomer;
                                }
                                proxyrepairorderchange.Customers = proxycustomers;
                            }
                            #endregion

                            #region//RepairOrder Vehicle
                            if (request.RepairOrderChange.Vehicle != null)
                            {
                                #region//RepairOrder Vehicle Header
                                _WA.Mapper.v2.RepairOrder.Vehicle2 proxyvehicle = new _WA.Mapper.v2.RepairOrder.Vehicle2();
                                proxyvehicle.Color = request.RepairOrderChange.Vehicle.Color;
                                proxyvehicle.Cylinders = request.RepairOrderChange.Vehicle.Cylinders;
                                proxyvehicle.DateDelivered = request.RepairOrderChange.Vehicle.DateDelivered;
                                proxyvehicle.DateInService = request.RepairOrderChange.Vehicle.DateInService;
                                proxyvehicle.DeclinedJob = request.RepairOrderChange.Vehicle.DeclinedJob;
                                proxyvehicle.DisplayDescription = request.RepairOrderChange.Vehicle.DisplayDescription;
                                proxyvehicle.DMSVehicleNo = request.RepairOrderChange.Vehicle.DMSVehicleNo;
                                proxyvehicle.EngineType = request.RepairOrderChange.Vehicle.EngineType;
                                proxyvehicle.ExtendedWarranty = request.RepairOrderChange.Vehicle.ExtendedWarranty;
                                proxyvehicle.FuelType = request.RepairOrderChange.Vehicle.FuelType;
                                proxyvehicle.FullModelName = request.RepairOrderChange.Vehicle.FullModelName;
                                proxyvehicle.InsuranceDate = request.RepairOrderChange.Vehicle.InsuranceDate;
                                proxyvehicle.LastMileage = request.RepairOrderChange.Vehicle.LastMileage;
                                proxyvehicle.LastServiceDate = request.RepairOrderChange.Vehicle.LastServiceDate;
                                proxyvehicle.LastSixVIN = request.RepairOrderChange.Vehicle.LastSixVIN;
                                proxyvehicle.LicenseNumber = request.RepairOrderChange.Vehicle.LicenseNumber;
                                proxyvehicle.LicensePlateNo = request.RepairOrderChange.Vehicle.LicensePlateNo;
                                proxyvehicle.Make = request.RepairOrderChange.Vehicle.Make;
                                proxyvehicle.ModelCode = request.RepairOrderChange.Vehicle.ModelCode;
                                proxyvehicle.ModelName = request.RepairOrderChange.Vehicle.ModelName;
                                proxyvehicle.ModelYear = request.RepairOrderChange.Vehicle.ModelYear;
                                proxyvehicle.PendingJob = request.RepairOrderChange.Vehicle.PendingJob;
                                proxyvehicle.StockNumber = request.RepairOrderChange.Vehicle.StockNumber;
                                proxyvehicle.Trim = request.RepairOrderChange.Vehicle.Trim;
                                proxyvehicle.VehicleType = request.RepairOrderChange.Vehicle.VehicleType;
                                proxyvehicle.VIN = request.RepairOrderChange.Vehicle.VIN;
                                proxyvehicle.WarrantyMiles = request.RepairOrderChange.Vehicle.WarrantyMiles;
                                proxyvehicle.WarrantyMonths = request.RepairOrderChange.Vehicle.WarrantyMonths;
                                proxyvehicle.WarrantyStartDate = request.RepairOrderChange.Vehicle.WarrantyStartDate;
                                #endregion

                                #region//RepairOrder Vehicle Campaigns
                                if (request.RepairOrderChange.Vehicle.Campaigns != null && request.RepairOrderChange.Vehicle.Campaigns.Count > 0)
                                {
                                    int campaignscnt = 0;
                                    _WA.Mapper.v2.RepairOrder.Campaign1[] proxycampaigns = new _WA.Mapper.v2.RepairOrder.Campaign1[request.RepairOrderChange.Vehicle.Campaigns.Count];
                                    foreach (WA.Standard.IF.Data.v2.Common.Vehicle.Campaign campaign in request.RepairOrderChange.Vehicle.Campaigns)
                                    {
                                        _WA.Mapper.v2.RepairOrder.Campaign1 proxycampaign = new _WA.Mapper.v2.RepairOrder.Campaign1();
                                        proxycampaign.CampaignDescription = campaign.CampaignDescription;
                                        proxycampaign.CampaignID = campaign.CampaignID;
                                        proxycampaign.CampaignPerformed = campaign.CampaignPerformed;
                                        proxycampaigns[campaignscnt] = proxycampaign;
                                        campaignscnt++;
                                    }
                                    proxyvehicle.Campaigns = proxycampaigns;
                                }
                                #endregion

                                proxyrepairorderchange.Vehicle = proxyvehicle;
                            }
                            #endregion

                            #region//RepairOrder RequestItems
                            if (request.RepairOrderChange.RequestItems != null && request.RepairOrderChange.RequestItems.Count > 0)
                            {
                                int requestitemscnt = 0;
                                _WA.Mapper.v2.RepairOrder.RequestItem1[] proxyrequestitems = new _WA.Mapper.v2.RepairOrder.RequestItem1[request.RepairOrderChange.RequestItems.Count];
                                foreach (RequestItem requestitem in request.RepairOrderChange.RequestItems)
                                {
                                    #region//RepairOrder RequestItem Header
                                    _WA.Mapper.v2.RepairOrder.RequestItem1 proxyrequestitem = new _WA.Mapper.v2.RepairOrder.RequestItem1();
                                    proxyrequestitem.CPSIND = requestitem.CPSIND;
                                    proxyrequestitem.RequestCode = requestitem.RequestCode;
                                    proxyrequestitem.RequestDescription = requestitem.RequestDescription;
                                    proxyrequestitem.ServiceLineNumber = requestitem.ServiceLineNumber;
                                    proxyrequestitem.ServiceLineStatus = requestitem.ServiceLineStatus;
                                    proxyrequestitem.ServiceType = requestitem.ServiceType;
                                    proxyrequestitem.TCEmployeeID = requestitem.TCEmployeeID;
                                    proxyrequestitem.TCEmployeeName = requestitem.TCEmployeeName;
                                    proxyrequestitem.WorkType = requestitem.WorkType;
                                    #endregion

                                    #region//RepairOrder RequestItem Comments
                                    if (requestitem.Comments != null && requestitem.Comments.Count > 0)
                                    {
                                        int commentscnt = 0;
                                        _WA.Mapper.v2.RepairOrder.Comment1[] proxycomments = new _WA.Mapper.v2.RepairOrder.Comment1[requestitem.Comments.Count];
                                        foreach (Comment Comment in requestitem.Comments)
                                        {
                                            _WA.Mapper.v2.RepairOrder.Comment1 proxycomment = new _WA.Mapper.v2.RepairOrder.Comment1();
                                            proxycomment.DescriptionComment = Comment.DescriptionComment;
                                            proxycomment.SequenceNumber = Comment.SequenceNumber;
                                            proxycomments[commentscnt] = proxycomment;
                                            commentscnt++;
                                        }
                                        proxyrequestitem.Comments = proxycomments;
                                    }
                                    #endregion

                                    #region//RepairOrder RequestItem Descriptions
                                    if (requestitem.Descriptions != null && requestitem.Descriptions.Count > 0)
                                    {
                                        int descriptionscnt = 0;
                                        _WA.Mapper.v2.RepairOrder.Description1[] proxydescriptions = new _WA.Mapper.v2.RepairOrder.Description1[requestitem.Descriptions.Count];
                                        foreach (Description description in requestitem.Descriptions)
                                        {
                                            _WA.Mapper.v2.RepairOrder.Description1 proxydescription = new _WA.Mapper.v2.RepairOrder.Description1();
                                            proxydescription.DescriptionComment = description.DescriptionComment;
                                            proxydescription.SequenceNumber = description.SequenceNumber;
                                            proxydescriptions[descriptionscnt] = proxydescription;
                                            descriptionscnt++;
                                        }
                                        proxyrequestitem.Descriptions = proxydescriptions;
                                    }
                                    #endregion

                                    #region//RepairOrder RequestItem OPCodes
                                    if (requestitem.OPCodes != null && requestitem.OPCodes.Count > 0)
                                    {
                                        int opcodescnt = 0;
                                        _WA.Mapper.v2.RepairOrder.OPCode1[] proxyopcodes = new _WA.Mapper.v2.RepairOrder.OPCode1[requestitem.OPCodes.Count];
                                        foreach (OPCode opcode in requestitem.OPCodes)
                                        {
                                            #region//RepairOrder RequestItem OPCode Header
                                            _WA.Mapper.v2.RepairOrder.OPCode1 proxyopcode = new _WA.Mapper.v2.RepairOrder.OPCode1();
                                            proxyopcode.ActualHours = opcode.ActualHours;
                                            proxyopcode.Code = opcode.Code;
                                            proxyopcode.Description = opcode.Description;
                                            proxyopcode.EstimatedHours = opcode.EstimatedHours;
                                            proxyopcode.SequenceNumber = opcode.SequenceNumber;
                                            proxyopcode.ServiceType = opcode.ServiceType;
                                            proxyopcode.SkillLevel = opcode.SkillLevel;
                                            #endregion

                                            #region//RepairOrder RequestItem OPCode Descriptions
                                            if (opcode.Descriptions != null && opcode.Descriptions.Count > 0)
                                            {
                                                int descriptionscnt = 0;
                                                _WA.Mapper.v2.RepairOrder.Description1[] proxydescriptions = new _WA.Mapper.v2.RepairOrder.Description1[opcode.Descriptions.Count];
                                                foreach (Description description in opcode.Descriptions)
                                                {
                                                    _WA.Mapper.v2.RepairOrder.Description1 proxydescription = new _WA.Mapper.v2.RepairOrder.Description1();
                                                    proxydescription.DescriptionComment = description.DescriptionComment;
                                                    proxydescription.SequenceNumber = description.SequenceNumber;
                                                    proxydescriptions[descriptionscnt] = proxydescription;
                                                    descriptionscnt++;
                                                }
                                                proxyopcode.Descriptions = proxydescriptions;
                                            }
                                            #endregion

                                            #region//RepairOrder RequestItem OPCode Causes
                                            if (opcode.Causes != null && opcode.Causes.Count > 0)
                                            {
                                                int causescnt = 0;
                                                _WA.Mapper.v2.RepairOrder.Cause1[] proxycauses = new _WA.Mapper.v2.RepairOrder.Cause1[opcode.Causes.Count];
                                                foreach (Cause cause in opcode.Causes)
                                                {
                                                    _WA.Mapper.v2.RepairOrder.Cause1 proxycause = new _WA.Mapper.v2.RepairOrder.Cause1();
                                                    proxycause.CauseLaborOpCode = cause.CauseLaborOpCode;
                                                    proxycause.Comment = cause.Comment;
                                                    proxycause.SequenceNumber = cause.SequenceNumber;
                                                    proxycauses[causescnt] = proxycause;
                                                    causescnt++;
                                                }
                                                proxyopcode.Causes = proxycauses;
                                            }
                                            #endregion

                                            #region//RepairOrder RequestItem OPCode Corrections
                                            if (opcode.Corrections != null && opcode.Corrections.Count > 0)
                                            {
                                                int correctionscnt = 0;
                                                _WA.Mapper.v2.RepairOrder.Correction1[] proxycorrections = new _WA.Mapper.v2.RepairOrder.Correction1[opcode.Corrections.Count];
                                                foreach (Correction Correction in opcode.Corrections)
                                                {
                                                    _WA.Mapper.v2.RepairOrder.Correction1 proxycorrection = new _WA.Mapper.v2.RepairOrder.Correction1();
                                                    proxycorrection.CorrectionLaborOpCode = Correction.CorrectionLaborOpCode;
                                                    proxycorrection.Comment = Correction.Comment;
                                                    proxycorrection.SequenceNumber = Correction.SequenceNumber;
                                                    proxycorrections[correctionscnt] = proxycorrection;
                                                    correctionscnt++;
                                                }
                                                proxyopcode.Corrections = proxycorrections;
                                            }
                                            #endregion

                                            #region//RepairOrder RequestItem OPCode PriceType
                                            if (opcode.PriceType != null)
                                            {
                                                _WA.Mapper.v2.RepairOrder.PriceType1 proxypricetype = new _WA.Mapper.v2.RepairOrder.PriceType1();
                                                proxypricetype.DiscountPrice = opcode.PriceType.DiscountPrice;
                                                proxypricetype.DiscountRate = opcode.PriceType.DiscountRate;
                                                proxypricetype.TotalPrice = opcode.PriceType.TotalPrice;
                                                proxypricetype.TotalPriceIncludeTax = opcode.PriceType.TotalPriceIncludeTax;
                                                proxypricetype.UnitPrice = opcode.PriceType.UnitPrice;
                                                proxyopcode.PriceType = proxypricetype;
                                            }
                                            #endregion

                                            #region//RepairOrder RequestItem OPCode Parts
                                            if (opcode.Parts != null && opcode.Parts.Count > 0)
                                            {
                                                int partscnt = 0;
                                                _WA.Mapper.v2.RepairOrder.Part1[] proxyparts = new _WA.Mapper.v2.RepairOrder.Part1[opcode.Parts.Count];
                                                foreach (Part part in opcode.Parts)
                                                {
                                                    #region//RepairOrder RequestItem OPCode Parts Header
                                                    _WA.Mapper.v2.RepairOrder.Part1 proxypart = new _WA.Mapper.v2.RepairOrder.Part1();
                                                    proxypart.DisplayPartNumber = part.DisplayPartNumber;
                                                    proxypart.PartDescription = part.PartDescription;
                                                    proxypart.PartNumber = part.PartNumber;
                                                    proxypart.PartType = part.PartType;
                                                    proxypart.Quantity = part.Quantity;
                                                    proxypart.SequenceNumber = part.SequenceNumber;
                                                    proxypart.ServiceType = part.ServiceType;
                                                    proxypart.StockQuantity = part.StockQuantity;
                                                    proxypart.StockStatus = part.StockStatus;
                                                    proxypart.UnitOfMeasure = part.UnitOfMeasure;
                                                    #endregion

                                                    #region//RepairOrder RequestItem OPCode Parts Descriptions
                                                    if (part.Descriptions != null && part.Descriptions.Count > 0)
                                                    {
                                                        int descriptionscnt = 0;
                                                        _WA.Mapper.v2.RepairOrder.Description1[] proxydescriptions = new _WA.Mapper.v2.RepairOrder.Description1[part.Descriptions.Count];
                                                        foreach (Description description in part.Descriptions)
                                                        {
                                                            _WA.Mapper.v2.RepairOrder.Description1 proxydescription = new _WA.Mapper.v2.RepairOrder.Description1();
                                                            proxydescription.DescriptionComment = description.DescriptionComment;
                                                            proxydescription.SequenceNumber = description.SequenceNumber;
                                                            proxydescriptions[descriptionscnt] = proxydescription;
                                                            descriptionscnt++;
                                                        }
                                                        proxypart.Descriptions = proxydescriptions;
                                                    }
                                                    #endregion

                                                    #region//RepairOrder RequestItem OPCode Parts PriceType
                                                    if (part.PriceType != null)
                                                    {
                                                        _WA.Mapper.v2.RepairOrder.PriceType1 proxypricetype = new _WA.Mapper.v2.RepairOrder.PriceType1();
                                                        proxypricetype.DiscountPrice = part.PriceType.DiscountPrice;
                                                        proxypricetype.DiscountRate = part.PriceType.DiscountRate;
                                                        proxypricetype.TotalPrice = part.PriceType.TotalPrice;
                                                        proxypricetype.TotalPriceIncludeTax = part.PriceType.TotalPriceIncludeTax;
                                                        proxypricetype.UnitPrice = part.PriceType.UnitPrice;
                                                        proxypart.PriceType = proxypricetype;
                                                    }
                                                    #endregion

                                                    proxyparts[partscnt] = proxypart;
                                                    partscnt++;
                                                }
                                                proxyopcode.Parts = proxyparts;
                                            }
                                            #endregion

                                            #region//RepairOrder RequestItem OPCode Sublets
                                            if (opcode.Sublets != null && opcode.Sublets.Count > 0)
                                            {
                                                int subletscnt = 0;
                                                _WA.Mapper.v2.RepairOrder.Sublet1[] proxysublets = new _WA.Mapper.v2.RepairOrder.Sublet1[opcode.Sublets.Count];
                                                foreach (Sublet sublet in opcode.Sublets)
                                                {
                                                    #region//RepairOrder RequestItem OPCode Sublets Header
                                                    _WA.Mapper.v2.RepairOrder.Sublet1 proxysublet = new _WA.Mapper.v2.RepairOrder.Sublet1();
                                                    proxysublet.SequenceNumber = sublet.SequenceNumber;
                                                    proxysublet.ServiceType = sublet.ServiceType;
                                                    #endregion

                                                    #region//RepairOrder RequestItem OPCode Sublets Descriptions
                                                    if (sublet.Descriptions != null && sublet.Descriptions.Count > 0)
                                                    {
                                                        int descriptionscnt = 0;
                                                        _WA.Mapper.v2.RepairOrder.Description1[] proxydescriptions = new _WA.Mapper.v2.RepairOrder.Description1[sublet.Descriptions.Count];
                                                        foreach (Description description in sublet.Descriptions)
                                                        {
                                                            _WA.Mapper.v2.RepairOrder.Description1 proxydescription = new _WA.Mapper.v2.RepairOrder.Description1();
                                                            proxydescription.DescriptionComment = description.DescriptionComment;
                                                            proxydescription.SequenceNumber = description.SequenceNumber;
                                                            proxydescriptions[descriptionscnt] = proxydescription;
                                                            descriptionscnt++;
                                                        }
                                                        proxysublet.Descriptions = proxydescriptions;
                                                    }
                                                    #endregion

                                                    #region//RepairOrder RequestItem OPCode Sublets PriceType
                                                    if (sublet.PriceType != null)
                                                    {
                                                        _WA.Mapper.v2.RepairOrder.PriceType1 proxypricetype = new _WA.Mapper.v2.RepairOrder.PriceType1();
                                                        proxypricetype.DiscountPrice = sublet.PriceType.DiscountPrice;
                                                        proxypricetype.DiscountRate = sublet.PriceType.DiscountRate;
                                                        proxypricetype.TotalPrice = sublet.PriceType.TotalPrice;
                                                        proxypricetype.TotalPriceIncludeTax = sublet.PriceType.TotalPriceIncludeTax;
                                                        proxypricetype.UnitPrice = sublet.PriceType.UnitPrice;
                                                        proxysublet.PriceType = proxypricetype;
                                                    }
                                                    #endregion

                                                    proxysublets[subletscnt] = proxysublet;
                                                    subletscnt++;
                                                }
                                                proxyopcode.Sublets = proxysublets;
                                            }
                                            #endregion

                                            #region//RepairOrder RequestItem OPCode MISCs
                                            if (opcode.MISCs != null && opcode.MISCs.Count > 0)
                                            {
                                                int miscscnt = 0;
                                                _WA.Mapper.v2.RepairOrder.MISC1[] proxymiscs = new _WA.Mapper.v2.RepairOrder.MISC1[opcode.MISCs.Count];
                                                foreach (MISC misc in opcode.MISCs)
                                                {
                                                    #region//RepairOrder RequestItem OPCode MISCs Header
                                                    _WA.Mapper.v2.RepairOrder.MISC1 proxymisc = new _WA.Mapper.v2.RepairOrder.MISC1();
                                                    proxymisc.SequenceNumber = misc.SequenceNumber;
                                                    proxymisc.ServiceType = misc.ServiceType;
                                                    #endregion

                                                    #region//RepairOrder RequestItem OPCode MISCs Descriptions
                                                    if (misc.Descriptions != null && misc.Descriptions.Count > 0)
                                                    {
                                                        int descriptionscnt = 0;
                                                        _WA.Mapper.v2.RepairOrder.Description1[] proxydescriptions = new _WA.Mapper.v2.RepairOrder.Description1[misc.Descriptions.Count];
                                                        foreach (Description description in misc.Descriptions)
                                                        {
                                                            _WA.Mapper.v2.RepairOrder.Description1 proxydescription = new _WA.Mapper.v2.RepairOrder.Description1();
                                                            proxydescription.DescriptionComment = description.DescriptionComment;
                                                            proxydescription.SequenceNumber = description.SequenceNumber;
                                                            proxydescriptions[descriptionscnt] = proxydescription;
                                                            descriptionscnt++;
                                                        }
                                                        proxymisc.Descriptions = proxydescriptions;
                                                    }
                                                    #endregion

                                                    #region//RepairOrder RequestItem OPCode MISCs PriceType
                                                    if (misc.PriceType != null)
                                                    {
                                                        _WA.Mapper.v2.RepairOrder.PriceType1 proxypricetype = new _WA.Mapper.v2.RepairOrder.PriceType1();
                                                        proxypricetype.DiscountPrice = misc.PriceType.DiscountPrice;
                                                        proxypricetype.DiscountRate = misc.PriceType.DiscountRate;
                                                        proxypricetype.TotalPrice = misc.PriceType.TotalPrice;
                                                        proxypricetype.TotalPriceIncludeTax = misc.PriceType.TotalPriceIncludeTax;
                                                        proxypricetype.UnitPrice = misc.PriceType.UnitPrice;
                                                        proxymisc.PriceType = proxypricetype;
                                                    }
                                                    #endregion

                                                    proxymiscs[miscscnt] = proxymisc;
                                                    miscscnt++;
                                                }
                                                proxyopcode.MISCs = proxymiscs;
                                            }
                                            #endregion

                                            proxyopcodes[opcodescnt] = proxyopcode;
                                            opcodescnt++;
                                        }
                                        proxyrequestitem.OPCodes = proxyopcodes;
                                    }
                                    #endregion

                                    proxyrequestitems[requestitemscnt] = proxyrequestitem;
                                    requestitemscnt++;
                                }
                                proxyrepairorderchange.RequestItems = proxyrequestitems;
                            }
                            #endregion

                            proxyrequest.RepairOrderChange = proxyrepairorderchange;
                        }
                        #endregion

                        //Run proxy web method with proxy request
                        _WA.Mapper.v2.RepairOrder.RepairOrderChangeResponse proxyresponse = proxyws.RepairOrderChange(proxyrequest);

                        //Mapping with Standard Interface Specification Object
                        if (proxyresponse != null)
                        {
                            if (proxyresponse.TransactionHeader != null)
                            {
                                #region//TransactionHeader Set
                                TransactionHeader transactionheader = new TransactionHeader();
                                transactionheader.CountryID = proxyresponse.TransactionHeader.CountryID;
                                transactionheader.DealerID = proxyresponse.TransactionHeader.DealerID;
                                transactionheader.DistributorID = proxyresponse.TransactionHeader.DistributorID;
                                transactionheader.DMSCode = proxyresponse.TransactionHeader.DMSCode;
                                transactionheader.DMSServerUrl = proxyresponse.TransactionHeader.DMSServerUrl;
                                transactionheader.DMSVersion = proxyresponse.TransactionHeader.DMSVersion;
                                transactionheader.DocumentVersion = proxyresponse.TransactionHeader.DocumentVersion;
                                transactionheader.GroupID = proxyresponse.TransactionHeader.GroupID;
                                transactionheader.IneterfaceID = proxyresponse.TransactionHeader.IneterfaceID;
                                transactionheader.Password = proxyresponse.TransactionHeader.Password;
                                transactionheader.PollingToken = proxyresponse.TransactionHeader.PollingToken;
                                transactionheader.RequestPollingToken = proxyresponse.TransactionHeader.RequestPollingToken;
                                transactionheader.RequestType = proxyresponse.TransactionHeader.RequestType;
                                transactionheader.TransactionId = proxyresponse.TransactionHeader.TransactionId;
                                transactionheader.TransactionDateTimeLocal = proxyresponse.TransactionHeader.TransactionDateTimeLocal;
                                transactionheader.TransactionDateTimeUTC = proxyresponse.TransactionHeader.TransactionDateTimeUTC;
                                transactionheader.TransactionType = proxyresponse.TransactionHeader.TransactionType;
                                transactionheader.Username = proxyresponse.TransactionHeader.Username;
                                transactionheader.VenderTrackingCode = proxyresponse.TransactionHeader.VenderTrackingCode;
                                response.TransactionHeader = transactionheader;
                                #endregion
                            }

                            //ResultMessage Set
                            if (proxyresponse.ResultMessage != null)
                            {
                                response.ResultMessage = GetResultMessageData(proxyresponse.ResultMessage.Code, proxyresponse.ResultMessage.Message);
                            }

                            if (proxyresponse.Errors != null)
                            {
                                //Error List Set
                                foreach (_WA.Mapper.v2.RepairOrder.Error1 proxyerror in proxyresponse.Errors)
                                {
                                    if (response.Errors != null)
                                        response.Errors.Add(GetErrorData(proxyerror.Code, proxyerror.Message));
                                    else
                                        response.Errors = GetErrorDataList(proxyerror.Code, proxyerror.Message);
                                }
                            }
                            else
                            {
                                #region//RepairOrderChangeResponse Set

                                //if (proxyresponse.RepairOrder != null)
                                //{
                                //_WA.Mapper.v2.RepairOrder.RepairOrder2 proxyrepairorder = proxyresponse.RepairOrder;

                                //#region //RepairOrder Header
                                //RepairOrder repairorder = new RepairOrder();
                                //repairorder.CloseDateTimeLocal = proxyrepairorder.CloseDateTimeLocal;
                                //repairorder.DeliveryDateTimeLocal = proxyrepairorder.DeliveryDateTimeLocal;
                                //repairorder.DMSROID = proxyrepairorder.DMSROID;
                                //repairorder.DMSRONo = proxyrepairorder.DMSRONo;
                                //repairorder.DMSROStatus = proxyrepairorder.DMSROStatus;
                                //repairorder.HangTagColor = proxyrepairorder.HangTagColor;
                                //repairorder.HangTagNo = proxyrepairorder.HangTagNo;
                                //repairorder.InMileage = proxyrepairorder.InMileage;
                                //repairorder.OpenDateTimeLocal = proxyrepairorder.OpenDateTimeLocal;
                                //repairorder.OutMileage = proxyrepairorder.OutMileage;
                                //repairorder.PaymentMethod = proxyrepairorder.PaymentMethod;
                                //repairorder.ROChannel = proxyrepairorder.ROChannel;
                                //repairorder.SAEmployeeID = proxyrepairorder.SAEmployeeID;
                                //repairorder.SAEmployeeName = proxyrepairorder.SAEmployeeName;
                                //repairorder.ServiceType = proxyrepairorder.ServiceType;
                                //repairorder.TCEmployeeID = proxyrepairorder.TCEmployeeID;
                                //repairorder.TCEmployeeName = proxyrepairorder.TCEmployeeName;
                                //repairorder.WorkType = proxyrepairorder.WorkType;
                                //#endregion

                                //#region//RepairOrder CustomerParts
                                //if (proxyrepairorder.CustomerParts != null && proxyrepairorder.CustomerParts.Length > 0)
                                //{
                                //    repairorder.CustomerParts = new List<CustomerPart>();
                                //    foreach (_WA.Mapper.v2.RepairOrder.CustomerPart2 proxycustomerpart in proxyrepairorder.CustomerParts)
                                //    {
                                //        CustomerPart customerpart = new CustomerPart();
                                //        customerpart.Comment = proxycustomerpart.Comment;
                                //        customerpart.PartDescription = proxycustomerpart.PartDescription;
                                //        customerpart.PartNumber = proxycustomerpart.PartNumber;
                                //        customerpart.Quantity = proxycustomerpart.Quantity;
                                //        customerpart.UnitOfMeasure = proxycustomerpart.UnitOfMeasure;
                                //        repairorder.CustomerParts.Add(customerpart);
                                //    }
                                //}
                                //#endregion

                                //#region //RepairOrder AdditionalFields
                                //if (proxyrepairorder.AdditionalFields != null && proxyrepairorder.AdditionalFields.Length > 0)
                                //{
                                //    repairorder.AdditionalFields = new List<AdditionalField>();
                                //    foreach (_WA.Mapper.v2.RepairOrder.AdditionalField2 proxyadditionalfield in proxyrepairorder.AdditionalFields)
                                //    {
                                //        AdditionalField additionalfield = new AdditionalField();
                                //        additionalfield.Name = proxyadditionalfield.Name;
                                //        additionalfield.Value = proxyadditionalfield.Value;
                                //        repairorder.AdditionalFields.Add(additionalfield);
                                //    }
                                //}
                                //#endregion

                                //#region//RepairOrder JobRefs
                                //if (proxyrepairorder.JobRefs != null && proxyrepairorder.JobRefs.Length > 0)
                                //{
                                //    repairorder.JobRefs = new List<JobRef>();
                                //    foreach (_WA.Mapper.v2.RepairOrder.JobRef2 proxyjobref in proxyrepairorder.JobRefs)
                                //    {
                                //        JobRef jobref = new JobRef();
                                //        jobref.DMSJobNo = proxyjobref.DMSJobNo;
                                //        jobref.DMSJobStatus = proxyjobref.DMSJobStatus;
                                //        repairorder.JobRefs.Add(jobref);
                                //    }
                                //}
                                //#endregion

                                //#region//RepairOrder ManagementFields
                                //if (proxyrepairorder.ManagementFields != null)
                                //{
                                //    ManagementFields managementfields = new ManagementFields();
                                //    managementfields.CreateDateTimeUTC = proxyrepairorder.ManagementFields.CreateDateTimeUTC;
                                //    managementfields.LastModifiedDateTimeUTC = proxyrepairorder.ManagementFields.LastModifiedDateTimeUTC;
                                //    repairorder.ManagementFields = managementfields;
                                //}
                                //#endregion

                                //#region//RepairOrder Options
                                //if (proxyrepairorder.Options != null && proxyrepairorder.Options.Length > 0)
                                //{
                                //    repairorder.Options = new List<Option>();
                                //    foreach (_WA.Mapper.v2.RepairOrder.Option2 proxyoption in proxyrepairorder.Options)
                                //    {
                                //        Option option = new Option();
                                //        option.Name = proxyoption.Name;
                                //        option.Value = proxyoption.Value;
                                //        repairorder.Options.Add(option);
                                //    }
                                //}
                                //#endregion

                                //#region//RepairOrder PriceType
                                //if (proxyrepairorder.PriceType != null)
                                //{
                                //    PriceType pricetype = new PriceType();
                                //    pricetype.DiscountPrice = proxyrepairorder.PriceType.DiscountPrice;
                                //    pricetype.DiscountRate = proxyrepairorder.PriceType.DiscountRate;
                                //    pricetype.TotalPrice = proxyrepairorder.PriceType.TotalPrice;
                                //    pricetype.TotalPriceIncludeTax = proxyrepairorder.PriceType.TotalPriceIncludeTax;
                                //    pricetype.UnitPrice = proxyrepairorder.PriceType.UnitPrice;
                                //    repairorder.PriceType = pricetype;
                                //}
                                //#endregion

                                //#region//RepairOrder AppointmentRef
                                //if (proxyrepairorder.AppointmentRef != null)
                                //{
                                //    AppointmentRef appointmentref = new AppointmentRef();
                                //    appointmentref.DMSAppointmentNo = proxyrepairorder.AppointmentRef.DMSAppointmentNo;
                                //    appointmentref.DMSAppointmentStatus = proxyrepairorder.AppointmentRef.DMSAppointmentStatus;
                                //    repairorder.AppointmentRef = appointmentref;
                                //}
                                //#endregion

                                //#region//RepairOrder Customers
                                //if (proxyrepairorder.Customers != null && proxyrepairorder.Customers.Length > 0)
                                //{
                                //    repairorder.Customers = new List<Data.v2.Common.Customer.Customer>();
                                //    foreach (_WA.Mapper.v2.RepairOrder.Customer3 proxycustomer in proxyrepairorder.Customers)
                                //    {
                                //        #region//RepairOrder Customer Header
                                //        WA.Standard.IF.Data.v2.Common.Customer.Customer customer = new Data.v2.Common.Customer.Customer();
                                //        customer.CardNo = proxycustomer.CardNo;
                                //        customer.CorporateInfos = customer.CorporateInfos;
                                //        customer.CustomerInfoType = customer.CustomerInfoType;
                                //        customer.DMSCustomerNo = proxycustomer.DMSCustomerNo;
                                //        customer.Email = proxycustomer.Email;
                                //        customer.FirstName = proxycustomer.FirstName;
                                //        customer.FullName = proxycustomer.FullName;
                                //        customer.Gender = proxycustomer.Gender;
                                //        customer.LastName = proxycustomer.LastName;
                                //        customer.MiddleName = proxycustomer.MiddleName;
                                //        customer.Salutation = proxycustomer.Salutation;
                                //        #endregion

                                //        #region//RepairOrder Customer Addresses
                                //        if (proxycustomer.Addresses != null && proxycustomer.Addresses.Length > 0)
                                //        {
                                //            customer.Addresses = new List<Data.v2.Common.Customer.Address>();
                                //            foreach (_WA.Mapper.v2.RepairOrder.Address2 proxyaddress in proxycustomer.Addresses)
                                //            {
                                //                Data.v2.Common.Customer.Address address = new Data.v2.Common.Customer.Address();
                                //                address.Address1 = proxyaddress.Address1;
                                //                address.Address2 = proxyaddress.Address21;
                                //                address.AddressType = proxyaddress.AddressType;
                                //                address.City = proxyaddress.City;
                                //                address.Country = proxyaddress.Country;
                                //                address.State = proxyaddress.State;
                                //                address.ZipCode = proxyaddress.ZipCode;
                                //                customer.Addresses.Add(address);
                                //            }
                                //        }
                                //        #endregion

                                //        #region//RepairOrder Customer Contacts
                                //        if (proxycustomer.Contacts != null && proxycustomer.Contacts.Length > 0)
                                //        {
                                //            customer.Contacts = new List<Data.v2.Common.Customer.Contact>();
                                //            foreach (_WA.Mapper.v2.RepairOrder.Contact3 proxycontact in proxycustomer.Contacts)
                                //            {
                                //                Data.v2.Common.Customer.Contact contact = new Data.v2.Common.Customer.Contact();
                                //                contact.ContactMethodYN = proxycontact.ContactMethodYN;
                                //                contact.ContactType = proxycontact.ContactType;
                                //                contact.ContactValue = proxycontact.ContactValue;
                                //                customer.Contacts.Add(contact);
                                //            }
                                //        }
                                //        #endregion

                                //        #region//RepairOrder Customer SpecialMessage
                                //        if (proxycustomer.SpecialMessage != null)
                                //        {
                                //            Data.v2.Common.Customer.SpecialMessage specialmessage = new Data.v2.Common.Customer.SpecialMessage();
                                //            specialmessage.Message = proxycustomer.SpecialMessage.Message;
                                //            customer.SpecialMessage = specialmessage;
                                //        }
                                //        #endregion

                                //        #region//RepairOrder Customer CorporateInfos
                                //        if (proxycustomer.CorporateInfos != null && proxycustomer.CorporateInfos.Length > 0)
                                //        {
                                //            customer.CorporateInfos = new List<Data.v2.Common.Customer.CorporateInfo>();
                                //            foreach (_WA.Mapper.v2.RepairOrder.CorporateInfo2 proxycorporateinfo in proxycustomer.CorporateInfos)
                                //            {
                                //                Data.v2.Common.Customer.CorporateInfo corporateinfo = new Data.v2.Common.Customer.CorporateInfo();
                                //                corporateinfo.Name = proxycorporateinfo.Name;
                                //                corporateinfo.Value = proxycorporateinfo.Value;
                                //                customer.CorporateInfos.Add(corporateinfo);
                                //            }
                                //        }
                                //        #endregion

                                //        repairorder.Customers.Add(customer);
                                //    }
                                //}
                                //#endregion

                                //#region//RepairOrder Vehicle
                                //if (proxyrepairorder.Vehicle != null)
                                //{
                                //    if (proxyrepairorder.Vehicle != null)
                                //    {
                                //        #region//RepairOrder Vehicle Header
                                //        Data.v2.Common.Vehicle.Vehicle vehicle = new Data.v2.Common.Vehicle.Vehicle();
                                //        vehicle.Color = proxyrepairorder.Vehicle.Color;
                                //        vehicle.Cylinders = proxyrepairorder.Vehicle.Cylinders;
                                //        vehicle.DateDelivered = proxyrepairorder.Vehicle.DateDelivered;
                                //        vehicle.DateInService = proxyrepairorder.Vehicle.DateInService;
                                //        vehicle.DeclinedJob = proxyrepairorder.Vehicle.DeclinedJob;
                                //        vehicle.DisplayDescription = proxyrepairorder.Vehicle.DisplayDescription;
                                //        vehicle.DMSVehicleNo = proxyrepairorder.Vehicle.DMSVehicleNo;
                                //        vehicle.EngineType = proxyrepairorder.Vehicle.EngineType;
                                //        vehicle.ExtendedWarranty = proxyrepairorder.Vehicle.ExtendedWarranty;
                                //        vehicle.FuelType = proxyrepairorder.Vehicle.FuelType;
                                //        vehicle.FullModelName = proxyrepairorder.Vehicle.FullModelName;
                                //        vehicle.InsuranceDate = proxyrepairorder.Vehicle.InsuranceDate;
                                //        vehicle.LastMileage = proxyrepairorder.Vehicle.LastMileage;
                                //        vehicle.LastServiceDate = proxyrepairorder.Vehicle.LastServiceDate;
                                //        vehicle.LastSixVIN = proxyrepairorder.Vehicle.LastSixVIN;
                                //        vehicle.LicenseNumber = proxyrepairorder.Vehicle.LicenseNumber;
                                //        vehicle.LicensePlateNo = proxyrepairorder.Vehicle.LicensePlateNo;
                                //        vehicle.Make = proxyrepairorder.Vehicle.Make;
                                //        vehicle.ModelCode = proxyrepairorder.Vehicle.ModelCode;
                                //        vehicle.ModelName = proxyrepairorder.Vehicle.ModelName;
                                //        vehicle.ModelYear = proxyrepairorder.Vehicle.ModelYear;
                                //        vehicle.PendingJob = proxyrepairorder.Vehicle.PendingJob;
                                //        vehicle.StockNumber = proxyrepairorder.Vehicle.StockNumber;
                                //        vehicle.Trim = proxyrepairorder.Vehicle.Trim;
                                //        vehicle.VehicleType = proxyrepairorder.Vehicle.VehicleType;
                                //        vehicle.VIN = proxyrepairorder.Vehicle.VIN;
                                //        vehicle.WarrantyMiles = proxyrepairorder.Vehicle.WarrantyMiles;
                                //        vehicle.WarrantyMonths = proxyrepairorder.Vehicle.WarrantyMonths;
                                //        vehicle.WarrantyStartDate = proxyrepairorder.Vehicle.WarrantyStartDate;
                                //        #endregion

                                //        #region//RepairOrder Vehicle Campaigns
                                //        if (proxyrepairorder.Vehicle.Campaigns != null && proxyrepairorder.Vehicle.Campaigns.Length > 0)
                                //        {
                                //            vehicle.Campaigns = new List<Data.v2.Common.Vehicle.Campaign>();
                                //            foreach (_WA.Mapper.v2.RepairOrder.Campaign2 proxycampaign in proxyrepairorder.Vehicle.Campaigns)
                                //            {
                                //                Data.v2.Common.Vehicle.Campaign campaign = new Data.v2.Common.Vehicle.Campaign();
                                //                campaign.CampaignDescription = proxycampaign.CampaignDescription;
                                //                campaign.CampaignID = proxycampaign.CampaignID;
                                //                campaign.CampaignPerformed = proxycampaign.CampaignPerformed;
                                //                vehicle.Campaigns.Add(campaign);
                                //            }
                                //        }
                                //        #endregion

                                //        repairorder.Vehicle = vehicle;
                                //    }
                                //}
                                //#endregion

                                //#region//RepairOrder RequestItems
                                //if (proxyrepairorder.RequestItems != null && proxyrepairorder.RequestItems.Length > 0)
                                //{
                                //    repairorder.RequestItems = new List<RequestItem>();
                                //    foreach (_WA.Mapper.v2.RepairOrder.RequestItem2 proxyrequestitem in proxyrepairorder.RequestItems)
                                //    {
                                //        #region//RepairOrder RequestItem Header
                                //        RequestItem requestitem = new RequestItem();
                                //        requestitem.CPSIND = proxyrequestitem.CPSIND;
                                //        requestitem.RequestCode = proxyrequestitem.RequestCode;
                                //        requestitem.RequestDescription = proxyrequestitem.RequestDescription;
                                //        requestitem.ServiceLineNumber = proxyrequestitem.ServiceLineNumber;
                                //        requestitem.ServiceLineStatus = proxyrequestitem.ServiceLineStatus;
                                //        requestitem.ServiceType = proxyrequestitem.ServiceType;
                                //        requestitem.TCEmployeeID = proxyrequestitem.TCEmployeeID;
                                //        requestitem.TCEmployeeName = proxyrequestitem.TCEmployeeName;
                                //        requestitem.WorkType = proxyrequestitem.WorkType;
                                //        #endregion

                                //        #region//RepairOrder RequestItem Comments
                                //        if (proxyrequestitem.Comments != null && proxyrequestitem.Comments.Length > 0)
                                //        {
                                //            requestitem.Comments = new List<Comment>();
                                //            foreach (_WA.Mapper.v2.RepairOrder.Comment2 proxycomment in proxyrequestitem.Comments)
                                //            {
                                //                Comment comment = new Comment();
                                //                comment.DescriptionComment = proxycomment.DescriptionComment;
                                //                comment.SequenceNumber = proxycomment.SequenceNumber;
                                //                requestitem.Comments.Add(comment);
                                //            }
                                //        }
                                //        #endregion

                                //        #region//RepairOrder RequestItem Descriptions
                                //        if (proxyrequestitem.Descriptions != null && proxyrequestitem.Descriptions.Length > 0)
                                //        {
                                //            requestitem.Descriptions = new List<Description>();
                                //            foreach (_WA.Mapper.v2.RepairOrder.Description2 proxydescription in proxyrequestitem.Descriptions)
                                //            {
                                //                Description description = new Description();
                                //                description.DescriptionComment = proxydescription.DescriptionComment;
                                //                description.SequenceNumber = proxydescription.SequenceNumber;
                                //                requestitem.Descriptions.Add(description);
                                //            }
                                //        }
                                //        #endregion

                                //        #region//RepairOrder RequestItem OPCodes
                                //        if (proxyrequestitem.OPCodes != null && proxyrequestitem.OPCodes.Length > 0)
                                //        {
                                //            requestitem.OPCodes = new List<OPCode>();
                                //            foreach (_WA.Mapper.v2.RepairOrder.OPCode2 proxyopcode in proxyrequestitem.OPCodes)
                                //            {
                                //                #region//RepairOrder RequestItem OPCode Header
                                //                OPCode opcode = new OPCode();
                                //                opcode.ActualHours = proxyopcode.ActualHours;
                                //                opcode.Code = proxyopcode.Code;
                                //                opcode.Description = proxyopcode.Description;
                                //                opcode.EstimatedHours = proxyopcode.EstimatedHours;
                                //                opcode.SequenceNumber = proxyopcode.SequenceNumber;
                                //                opcode.ServiceType = proxyopcode.ServiceType;
                                //                opcode.SkillLevel = proxyopcode.SkillLevel;
                                //                #endregion

                                //                #region//RepairOrder RequestItem OPCode Descriptions
                                //                if (proxyopcode.Descriptions != null && proxyopcode.Descriptions.Length > 0)
                                //                {
                                //                    opcode.Descriptions = new List<Description>();
                                //                    foreach (_WA.Mapper.v2.RepairOrder.Description2 proxydescription in proxyopcode.Descriptions)
                                //                    {
                                //                        Description description = new Description();
                                //                        description.DescriptionComment = proxydescription.DescriptionComment;
                                //                        description.SequenceNumber = proxydescription.SequenceNumber;
                                //                        opcode.Descriptions.Add(description);
                                //                    }
                                //                }
                                //                #endregion

                                //                #region//RepairOrder RequestItem OPCode Causes
                                //                if (proxyopcode.Causes != null && proxyopcode.Causes.Length > 0)
                                //                {
                                //                    opcode.Causes = new List<Cause>();
                                //                    foreach (_WA.Mapper.v2.RepairOrder.Cause2 proxycause in proxyopcode.Causes)
                                //                    {
                                //                        Cause cause = new Cause();
                                //                        cause.CauseLaborOpCode = proxycause.CauseLaborOpCode;
                                //                        cause.Comment = proxycause.Comment;
                                //                        cause.SequenceNumber = proxycause.SequenceNumber;
                                //                        opcode.Causes.Add(cause);
                                //                    }
                                //                }
                                //                #endregion

                                //                #region//RepairOrder RequestItem OPCode Corrections
                                //                if (proxyopcode.Corrections != null && proxyopcode.Corrections.Length > 0)
                                //                {
                                //                    opcode.Corrections = new List<Correction>();
                                //                    foreach (_WA.Mapper.v2.RepairOrder.Correction2 proxycorrection in proxyopcode.Corrections)
                                //                    {
                                //                        Correction correction = new Correction();
                                //                        correction.CorrectionLaborOpCode = proxycorrection.CorrectionLaborOpCode;
                                //                        correction.Comment = proxycorrection.Comment;
                                //                        correction.SequenceNumber = proxycorrection.SequenceNumber;
                                //                        opcode.Corrections.Add(correction);
                                //                    }
                                //                }
                                //                #endregion

                                //                #region//RepairOrder RequestItem OPCode PriceType
                                //                if (proxyopcode.PriceType != null)
                                //                {
                                //                    PriceType pricetype = new PriceType();
                                //                    pricetype.DiscountPrice = proxyopcode.PriceType.DiscountPrice;
                                //                    pricetype.DiscountRate = proxyopcode.PriceType.DiscountRate;
                                //                    pricetype.TotalPrice = proxyopcode.PriceType.TotalPrice;
                                //                    pricetype.TotalPriceIncludeTax = proxyopcode.PriceType.TotalPriceIncludeTax;
                                //                    pricetype.UnitPrice = proxyopcode.PriceType.UnitPrice;
                                //                    opcode.PriceType = pricetype;
                                //                }
                                //                #endregion

                                //                #region//RepairOrder RequestItem OPCode Parts
                                //                if (proxyopcode.Parts != null && proxyopcode.Parts.Length > 0)
                                //                {
                                //                    opcode.Parts = new List<Part>();
                                //                    foreach (_WA.Mapper.v2.RepairOrder.Part2 proxypart in proxyopcode.Parts)
                                //                    {
                                //                        #region//RepairOrder RequestItem OPCode Parts Header
                                //                        Part part = new Part();
                                //                        part.DisplayPartNumber = proxypart.DisplayPartNumber;
                                //                        part.PartDescription = proxypart.PartDescription;
                                //                        part.PartNumber = proxypart.PartNumber;
                                //                        part.PartType = proxypart.PartType;
                                //                        part.Quantity = proxypart.Quantity;
                                //                        part.SequenceNumber = proxypart.SequenceNumber;
                                //                        part.ServiceType = proxypart.ServiceType;
                                //                        part.StockQuantity = proxypart.StockQuantity;
                                //                        part.StockStatus = proxypart.StockStatus;
                                //                        part.UnitOfMeasure = proxypart.UnitOfMeasure;
                                //                        #endregion

                                //                        #region//RepairOrder RequestItem OPCode Parts Descriptions
                                //                        if (proxypart.Descriptions != null && proxypart.Descriptions.Length > 0)
                                //                        {
                                //                            part.Descriptions = new List<Description>();
                                //                            foreach (_WA.Mapper.v2.RepairOrder.Description2 proxydescription in proxypart.Descriptions)
                                //                            {
                                //                                Description description = new Description();
                                //                                description.DescriptionComment = proxydescription.DescriptionComment;
                                //                                description.SequenceNumber = proxydescription.SequenceNumber;
                                //                                part.Descriptions.Add(description);
                                //                            }
                                //                        }
                                //                        #endregion

                                //                        #region//RepairOrder RequestItem OPCode Parts PriceType
                                //                        if (proxypart.PriceType != null)
                                //                        {
                                //                            PriceType pricetype = new PriceType();
                                //                            pricetype.DiscountPrice = proxypart.PriceType.DiscountPrice;
                                //                            pricetype.DiscountRate = proxypart.PriceType.DiscountRate;
                                //                            pricetype.TotalPrice = proxypart.PriceType.TotalPrice;
                                //                            pricetype.TotalPriceIncludeTax = proxypart.PriceType.TotalPriceIncludeTax;
                                //                            pricetype.UnitPrice = proxypart.PriceType.UnitPrice;
                                //                            part.PriceType = pricetype;
                                //                        }
                                //                        #endregion

                                //                        opcode.Parts.Add(part);
                                //                    }
                                //                }
                                //                #endregion

                                //                #region//RepairOrder RequestItem OPCode Sublets
                                //                if (proxyopcode.Sublets != null && proxyopcode.Sublets.Length > 0)
                                //                {
                                //                    opcode.Sublets = new List<Sublet>();
                                //                    foreach (_WA.Mapper.v2.RepairOrder.Sublet2 proxysublet in proxyopcode.Sublets)
                                //                    {
                                //                        #region//RepairOrder RequestItem OPCode Sublet Header
                                //                        Sublet sublet = new Sublet();
                                //                        sublet.SequenceNumber = proxysublet.SequenceNumber;
                                //                        sublet.ServiceType = proxysublet.ServiceType;
                                //                        #endregion

                                //                        #region//RepairOrder RequestItem OPCode Sublets Descriptions
                                //                        if (proxysublet.Descriptions != null && proxysublet.Descriptions.Length > 0)
                                //                        {
                                //                            sublet.Descriptions = new List<Description>();
                                //                            foreach (_WA.Mapper.v2.RepairOrder.Description2 proxydescription in proxysublet.Descriptions)
                                //                            {
                                //                                Description description = new Description();
                                //                                description.DescriptionComment = proxydescription.DescriptionComment;
                                //                                description.SequenceNumber = proxydescription.SequenceNumber;
                                //                                sublet.Descriptions.Add(description);
                                //                            }
                                //                        }
                                //                        #endregion

                                //                        #region//RepairOrder RequestItem OPCode Sublets PriceType
                                //                        if (proxysublet.PriceType != null)
                                //                        {
                                //                            PriceType pricetype = new PriceType();
                                //                            pricetype.DiscountPrice = proxysublet.PriceType.DiscountPrice;
                                //                            pricetype.DiscountRate = proxysublet.PriceType.DiscountRate;
                                //                            pricetype.TotalPrice = proxysublet.PriceType.TotalPrice;
                                //                            pricetype.TotalPriceIncludeTax = proxysublet.PriceType.TotalPriceIncludeTax;
                                //                            pricetype.UnitPrice = proxysublet.PriceType.UnitPrice;
                                //                            sublet.PriceType = pricetype;
                                //                        }
                                //                        #endregion

                                //                        opcode.Sublets.Add(sublet);
                                //                    }
                                //                }
                                //                #endregion

                                //                #region//RepairOrder RequestItem OPCode MISCs
                                //                if (proxyopcode.MISCs != null && proxyopcode.MISCs.Length > 0)
                                //                {
                                //                    opcode.MISCs = new List<MISC>();
                                //                    foreach (_WA.Mapper.v2.RepairOrder.MISC2 proxymisc in proxyopcode.MISCs)
                                //                    {
                                //                        #region//RepairOrder RequestItem OPCode MISC Header
                                //                        MISC misc = new MISC();
                                //                        misc.SequenceNumber = proxymisc.SequenceNumber;
                                //                        misc.ServiceType = proxymisc.ServiceType;
                                //                        #endregion

                                //                        #region//RepairOrder RequestItem OPCode MISCs Descriptions
                                //                        if (proxymisc.Descriptions != null && proxymisc.Descriptions.Length > 0)
                                //                        {
                                //                            misc.Descriptions = new List<Description>();
                                //                            foreach (_WA.Mapper.v2.RepairOrder.Description2 proxydescription in proxymisc.Descriptions)
                                //                            {
                                //                                Description description = new Description();
                                //                                description.DescriptionComment = proxydescription.DescriptionComment;
                                //                                description.SequenceNumber = proxydescription.SequenceNumber;
                                //                                misc.Descriptions.Add(description);
                                //                            }
                                //                        }
                                //                        #endregion

                                //                        #region//RepairOrder RequestItem OPCode MISCs PriceType
                                //                        if (proxymisc.PriceType != null)
                                //                        {
                                //                            PriceType pricetype = new PriceType();
                                //                            pricetype.DiscountPrice = proxymisc.PriceType.DiscountPrice;
                                //                            pricetype.DiscountRate = proxymisc.PriceType.DiscountRate;
                                //                            pricetype.TotalPrice = proxymisc.PriceType.TotalPrice;
                                //                            pricetype.TotalPriceIncludeTax = proxymisc.PriceType.TotalPriceIncludeTax;
                                //                            pricetype.UnitPrice = proxymisc.PriceType.UnitPrice;
                                //                            misc.PriceType = pricetype;
                                //                        }
                                //                        #endregion

                                //                        opcode.MISCs.Add(misc);
                                //                    }
                                //                }
                                //                #endregion

                                //                requestitem.OPCodes.Add(opcode);
                                //            }
                                //        }
                                //        #endregion

                                //        repairorder.RequestItems.Add(requestitem);
                                //    }
                                //}
                                //#endregion

                                //response.RepairOrder = repairorder;
                                //}
                                #endregion
                            }
                        }
                        else
                        {
                            if (response.Errors != null)
                                response.Errors.Add(GetErrorData(ResponseCode.Fail, ResponseMessage.Fail));
                            else
                                response.Errors = GetErrorDataList(ResponseCode.Fail, ResponseMessage.Fail);
                        }
                        #endregion
                    }
                    break;
                default: response.Errors = new List<Error>() { new Error() { Code = ResponseCode.NoMatchedProxy, Message = ResponseMessage.NoMatchedProxy } };
                    break;
            }

            return response;
        }
        public RepairOrderGetResponse RepairOrderGet(RepairOrderGetRequest request)
        {
            RepairOrderGetResponse response = new RepairOrderGetResponse();

            //DMS information set by dealer information
            string proxypath = string.Format("{0}.{1}.{2}.{3}",
                request.TransactionHeader.DocumentVersion,
                request.TransactionHeader.DistributorID,
                request.TransactionHeader.DMSCode,
                request.TransactionHeader.DMSVersion);

            switch (proxypath)
            {
                case "v2.Common.WA.v2":
                    {
                        #region v2.Common.WA.v2 - Standard (Proxy Class Dll Name : _WA.Mapper.v2)

                        #region RepairOrderGet Request Set

                        //Create proxy credential
                        NetworkCredential proxycredential = new NetworkCredential(request.TransactionHeader.Username, request.TransactionHeader.Password);

                        //Create proxy web service from dms web service with credential
                        _WA.Mapper.v2.RepairOrder.RepairOrder proxyws = new _WA.Mapper.v2.RepairOrder.RepairOrder(request.TransactionHeader.DMSServerUrl);
                        proxyws.Credentials = proxycredential;

                        //Create proxy request with repairorderget and transaction
                        _WA.Mapper.v2.RepairOrder.RepairOrderGetRequest proxyrequest = new _WA.Mapper.v2.RepairOrder.RepairOrderGetRequest();

                        //Create proxy transaction
                        _WA.Mapper.v2.RepairOrder.TransactionHeader proxytransactionheader = new _WA.Mapper.v2.RepairOrder.TransactionHeader();
                        if (request.TransactionHeader != null)
                        {
                            #region//TransactionHeader Set
                            proxytransactionheader.CountryID = request.TransactionHeader.CountryID;
                            proxytransactionheader.DealerID = request.TransactionHeader.DealerID;
                            proxytransactionheader.DistributorID = request.TransactionHeader.DistributorID;
                            proxytransactionheader.DMSCode = request.TransactionHeader.DMSCode;
                            proxytransactionheader.DMSServerUrl = request.TransactionHeader.DMSServerUrl;
                            proxytransactionheader.DMSVersion = request.TransactionHeader.DMSVersion;
                            proxytransactionheader.DocumentVersion = request.TransactionHeader.DocumentVersion;
                            proxytransactionheader.GroupID = request.TransactionHeader.GroupID;
                            proxytransactionheader.IneterfaceID = request.TransactionHeader.IneterfaceID;
                            proxytransactionheader.Password = request.TransactionHeader.Password;
                            proxytransactionheader.PollingToken = request.TransactionHeader.PollingToken;
                            proxytransactionheader.RequestPollingToken = request.TransactionHeader.RequestPollingToken;
                            proxytransactionheader.RequestType = request.TransactionHeader.RequestType;
                            proxytransactionheader.TransactionId = request.TransactionHeader.TransactionId;
                            proxytransactionheader.TransactionDateTimeLocal = request.TransactionHeader.TransactionDateTimeLocal;
                            proxytransactionheader.TransactionDateTimeUTC = request.TransactionHeader.TransactionDateTimeUTC;
                            proxytransactionheader.TransactionType = request.TransactionHeader.TransactionType;
                            proxytransactionheader.Username = request.TransactionHeader.Username;
                            proxytransactionheader.VenderTrackingCode = request.TransactionHeader.VenderTrackingCode;
                            proxyrequest.TransactionHeader = proxytransactionheader;
                            #endregion
                        }

                        //Create proxy repairorderget
                        _WA.Mapper.v2.RepairOrder.RepairOrderGet proxyrepairorderget = new _WA.Mapper.v2.RepairOrder.RepairOrderGet();
                        if (request.RepairOrderGet != null)
                        {
                            #region//RepairOrderGet Set
                            proxyrepairorderget.OpenDateTimeFromLocal = request.RepairOrderGet.OpenDateTimeFromLocal;
                            proxyrepairorderget.OpenDateTimeToLocal = request.RepairOrderGet.OpenDateTimeToLocal;
                            proxyrepairorderget.DMSROID = request.RepairOrderGet.DMSROID;
                            proxyrepairorderget.DMSRONo = request.RepairOrderGet.DMSRONo;
                            proxyrepairorderget.DMSAppointmentID = request.RepairOrderGet.DMSAppointmentID;
                            proxyrepairorderget.DMSAppointmentNo = request.RepairOrderGet.DMSAppointmentNo;
                            proxyrepairorderget.DMSROStatus = request.RepairOrderGet.DMSROStatus;
                            proxyrepairorderget.LastModifiedDateTimeFromUTC = request.RepairOrderGet.LastModifiedDateTimeFromUTC;
                            proxyrepairorderget.LastModifiedDateTimeToUTC = request.RepairOrderGet.LastModifiedDateTimeToUTC;
                            proxyrepairorderget.SAEmployeeID = request.RepairOrderGet.SAEmployeeID;
                            proxyrepairorderget.SAEmployeeName = request.RepairOrderGet.SAEmployeeName;
                            proxyrepairorderget.TCEmployeeID = request.RepairOrderGet.TCEmployeeID;
                            proxyrepairorderget.TCEmployeeName = request.RepairOrderGet.TCEmployeeName;
                            if (request.RepairOrderGet.Customer != null)
                            {
                                _WA.Mapper.v2.RepairOrder.Customer proxycustomer = new _WA.Mapper.v2.RepairOrder.Customer();
                                proxycustomer.DMSCustomerNo = request.RepairOrderGet.Customer.DMSCustomerNo;
                                proxycustomer.LastName = request.RepairOrderGet.Customer.LastName;

                                if (request.RepairOrderGet.Customer.Contacts != null && request.RepairOrderGet.Customer.Contacts.Count > 0)
                                {
                                    int cnt = 0;
                                    proxycustomer.Contacts = new _WA.Mapper.v2.RepairOrder.Contact[request.RepairOrderGet.Customer.Contacts.Count];
                                    foreach (WA.Standard.IF.Data.v2.Common.RepairOrder.Contact contact in request.RepairOrderGet.Customer.Contacts)
                                    {
                                        _WA.Mapper.v2.RepairOrder.Contact proxycontact = new _WA.Mapper.v2.RepairOrder.Contact();
                                        proxycontact.ContactType = contact.ContactType;
                                        proxycontact.ContactValue = contact.ContactValue;
                                        proxycustomer.Contacts[cnt] = proxycontact;
                                        cnt++;
                                    }
                                }
                                proxyrepairorderget.Customer = proxycustomer;
                            }
                            proxyrequest.RepairOrderGet = proxyrepairorderget;
                            #endregion
                        }

                        #endregion

                        //Run proxy web method with proxy request
                        _WA.Mapper.v2.RepairOrder.RepairOrderGetResponse proxyresponse = proxyws.RepairOrderGet(proxyrequest);

                        //Mapping with Standard Interface Specification Object
                        if (proxyresponse != null)
                        {
                            if (proxyresponse.TransactionHeader != null)
                            {
                                #region//TransactionHeader Set
                                TransactionHeader transactionheader = new TransactionHeader();
                                transactionheader.CountryID = proxyresponse.TransactionHeader.CountryID;
                                transactionheader.DealerID = proxyresponse.TransactionHeader.DealerID;
                                transactionheader.DistributorID = proxyresponse.TransactionHeader.DistributorID;
                                transactionheader.DMSCode = proxyresponse.TransactionHeader.DMSCode;
                                transactionheader.DMSServerUrl = proxyresponse.TransactionHeader.DMSServerUrl;
                                transactionheader.DMSVersion = proxyresponse.TransactionHeader.DMSVersion;
                                transactionheader.DocumentVersion = proxyresponse.TransactionHeader.DocumentVersion;
                                transactionheader.GroupID = proxyresponse.TransactionHeader.GroupID;
                                transactionheader.IneterfaceID = proxyresponse.TransactionHeader.IneterfaceID;
                                transactionheader.Password = proxyresponse.TransactionHeader.Password;
                                transactionheader.PollingToken = proxyresponse.TransactionHeader.PollingToken;
                                transactionheader.RequestPollingToken = proxyresponse.TransactionHeader.RequestPollingToken;
                                transactionheader.RequestType = proxyresponse.TransactionHeader.RequestType;
                                transactionheader.TransactionId = proxyresponse.TransactionHeader.TransactionId;
                                transactionheader.TransactionDateTimeLocal = proxyresponse.TransactionHeader.TransactionDateTimeLocal;
                                transactionheader.TransactionDateTimeUTC = proxyresponse.TransactionHeader.TransactionDateTimeUTC;
                                transactionheader.TransactionType = proxyresponse.TransactionHeader.TransactionType;
                                transactionheader.Username = proxyresponse.TransactionHeader.Username;
                                transactionheader.VenderTrackingCode = proxyresponse.TransactionHeader.VenderTrackingCode;
                                response.TransactionHeader = transactionheader;
                                #endregion
                            }

                            //ResultMessage Set
                            if (proxyresponse.ResultMessage != null)
                            {
                                response.ResultMessage = GetResultMessageData(proxyresponse.ResultMessage.Code, proxyresponse.ResultMessage.Message);
                            }

                            if (proxyresponse.Errors != null)
                            {
                                //Error List Set
                                foreach (_WA.Mapper.v2.RepairOrder.Error proxyerror in proxyresponse.Errors)
                                {
                                    if (response.Errors != null)
                                        response.Errors.Add(GetErrorData(proxyerror.Code, proxyerror.Message));
                                    else
                                        response.Errors = GetErrorDataList(proxyerror.Code, proxyerror.Message);
                                }
                            }
                            else
                            {
                                #region//RepairOrderGetResponse Set

                                if (proxyresponse.RepairOrderDocuments != null && proxyresponse.RepairOrderDocuments.Length > 0)
                                {
                                    response.RepairOrderDocuments = new List<RepairOrderDocument>();
                                    foreach (_WA.Mapper.v2.RepairOrder.RepairOrderDocument proxyrepairorderdocument in proxyresponse.RepairOrderDocuments)
                                    {
                                        #region //RepairOrderDocuments Header
                                        RepairOrderDocument repairorderdocument = new RepairOrderDocument();
                                        repairorderdocument.DMSRODocumentNo = proxyrepairorderdocument.DMSRODocumentNo;
                                        repairorderdocument.DMSRODocumentStatus = proxyrepairorderdocument.DMSRODocumentStatus;
                                        #endregion

                                        if (proxyrepairorderdocument.RepairOrders != null && proxyrepairorderdocument.RepairOrders.Length > 0)
                                        {
                                            repairorderdocument.RepairOrders = new List<RepairOrder>();
                                            foreach (_WA.Mapper.v2.RepairOrder.RepairOrder1 proxyrepairorder in proxyrepairorderdocument.RepairOrders)
                                            {
                                                #region //RepairOrder Header
                                                RepairOrder repairorder = new RepairOrder();
                                                repairorder.CloseDateTimeLocal = proxyrepairorder.CloseDateTimeLocal;
                                                repairorder.DeliveryDateTimeLocal = proxyrepairorder.DeliveryDateTimeLocal;
                                                repairorder.DMSROID = proxyrepairorder.DMSROID;
                                                repairorder.DMSRONo = proxyrepairorder.DMSRONo;
                                                repairorder.DMSROStatus = proxyrepairorder.DMSROStatus;
                                                repairorder.HangTagColor = proxyrepairorder.HangTagColor;
                                                repairorder.HangTagNo = proxyrepairorder.HangTagNo;
                                                repairorder.InMileage = proxyrepairorder.InMileage;
                                                repairorder.OpenDateTimeLocal = proxyrepairorder.OpenDateTimeLocal;
                                                repairorder.OutMileage = proxyrepairorder.OutMileage;
                                                repairorder.PaymentMethod = proxyrepairorder.PaymentMethod;
                                                repairorder.ROChannel = proxyrepairorder.ROChannel;
                                                repairorder.SAEmployeeID = proxyrepairorder.SAEmployeeID;
                                                repairorder.SAEmployeeName = proxyrepairorder.SAEmployeeName;
                                                repairorder.ServiceType = proxyrepairorder.ServiceType;
                                                repairorder.TCEmployeeID = proxyrepairorder.TCEmployeeID;
                                                repairorder.TCEmployeeName = proxyrepairorder.TCEmployeeName;
                                                repairorder.WorkType = proxyrepairorder.WorkType;
                                                #endregion

                                                #region//RepairOrder CustomerParts
                                                if (proxyrepairorder.CustomerParts != null && proxyrepairorder.CustomerParts.Length > 0)
                                                {
                                                    repairorder.CustomerParts = new List<CustomerPart>();
                                                    foreach (_WA.Mapper.v2.RepairOrder.CustomerPart proxycustomerpart in proxyrepairorder.CustomerParts)
                                                    {
                                                        CustomerPart customerpart = new CustomerPart();
                                                        customerpart.Comment = proxycustomerpart.Comment;
                                                        customerpart.PartDescription = proxycustomerpart.PartDescription;
                                                        customerpart.PartNumber = proxycustomerpart.PartNumber;
                                                        customerpart.Quantity = proxycustomerpart.Quantity;
                                                        customerpart.UnitOfMeasure = proxycustomerpart.UnitOfMeasure;
                                                        repairorder.CustomerParts.Add(customerpart);
                                                    }
                                                }
                                                #endregion

                                                #region //RepairOrder AdditionalFields
                                                if (proxyrepairorder.AdditionalFields != null && proxyrepairorder.AdditionalFields.Length > 0)
                                                {
                                                    repairorder.AdditionalFields = new List<AdditionalField>();
                                                    foreach (_WA.Mapper.v2.RepairOrder.AdditionalField proxyadditionalfield in proxyrepairorder.AdditionalFields)
                                                    {
                                                        AdditionalField additionalfield = new AdditionalField();
                                                        additionalfield.AdditionalFieldName = proxyadditionalfield.Name;
                                                        additionalfield.AdditionalFieldValue = proxyadditionalfield.Value;
                                                        repairorder.AdditionalFields.Add(additionalfield);
                                                    }
                                                }
                                                #endregion

                                                #region//RepairOrder JobRefs
                                                if (proxyrepairorder.JobRefs != null && proxyrepairorder.JobRefs.Length > 0)
                                                {
                                                    repairorder.JobRefs = new List<JobRef>();
                                                    foreach (_WA.Mapper.v2.RepairOrder.JobRef proxyjobref in proxyrepairorder.JobRefs)
                                                    {
                                                        JobRef jobref = new JobRef();
                                                        jobref.DMSJobNo = proxyjobref.DMSJobNo;
                                                        jobref.DMSJobStatus = proxyjobref.DMSJobStatus;
                                                        repairorder.JobRefs.Add(jobref);
                                                    }
                                                }
                                                #endregion

                                                #region//RepairOrder ManagementFields
                                                if (proxyrepairorder.ManagementFields != null)
                                                {
                                                    ManagementFields managementfields = new ManagementFields();
                                                    managementfields.CreateDateTimeUTC = proxyrepairorder.ManagementFields.CreateDateTimeUTC;
                                                    managementfields.LastModifiedDateTimeUTC = proxyrepairorder.ManagementFields.LastModifiedDateTimeUTC;
                                                    repairorder.ManagementFields = managementfields;
                                                }
                                                #endregion

                                                #region//RepairOrder Options
                                                if (proxyrepairorder.Options != null && proxyrepairorder.Options.Length > 0)
                                                {
                                                    repairorder.Options = new List<Option>();
                                                    foreach (_WA.Mapper.v2.RepairOrder.Option proxyoption in proxyrepairorder.Options)
                                                    {
                                                        Option option = new Option();
                                                        option.OptionName = proxyoption.Name;
                                                        option.OptionValue = proxyoption.Value;
                                                        repairorder.Options.Add(option);
                                                    }
                                                }
                                                #endregion

                                                #region//RepairOrder PriceType
                                                if (proxyrepairorder.PriceType != null)
                                                {
                                                    PriceType pricetype = new PriceType();
                                                    pricetype.DiscountPrice = proxyrepairorder.PriceType.DiscountPrice;
                                                    pricetype.DiscountRate = proxyrepairorder.PriceType.DiscountRate;
                                                    pricetype.TotalPrice = proxyrepairorder.PriceType.TotalPrice;
                                                    pricetype.TotalPriceIncludeTax = proxyrepairorder.PriceType.TotalPriceIncludeTax;
                                                    pricetype.UnitPrice = proxyrepairorder.PriceType.UnitPrice;
                                                    repairorder.PriceType = pricetype;
                                                }
                                                #endregion

                                                #region//RepairOrder AppointmentRef
                                                if (proxyrepairorder.AppointmentRef != null)
                                                {
                                                    AppointmentRef appointmentref = new AppointmentRef();
                                                    appointmentref.DMSAppointmentNo = proxyrepairorder.AppointmentRef.DMSAppointmentNo;
                                                    appointmentref.DMSAppointmentStatus = proxyrepairorder.AppointmentRef.DMSAppointmentStatus;
                                                    repairorder.AppointmentRef = appointmentref;
                                                }
                                                #endregion

                                                #region//RepairOrder Customers
                                                if (proxyrepairorder.Customers != null && proxyrepairorder.Customers.Length > 0)
                                                {
                                                    repairorder.Customers = new List<Data.v2.Common.Customer.Customer>();
                                                    foreach (_WA.Mapper.v2.RepairOrder.Customer1 proxycustomer in proxyrepairorder.Customers)
                                                    {
                                                        #region//RepairOrder Customer Header
                                                        WA.Standard.IF.Data.v2.Common.Customer.Customer customer = new Data.v2.Common.Customer.Customer();
                                                        customer.CardNo = proxycustomer.CardNo;
                                                        customer.CorporateInfos = customer.CorporateInfos;
                                                        customer.CustomerInfoType = customer.CustomerInfoType;
                                                        customer.DMSCustomerNo = proxycustomer.DMSCustomerNo;
                                                        customer.Email = proxycustomer.Email;
                                                        customer.FirstName = proxycustomer.FirstName;
                                                        customer.FullName = proxycustomer.FullName;
                                                        customer.Gender = proxycustomer.Gender;
                                                        customer.LastName = proxycustomer.LastName;
                                                        customer.MiddleName = proxycustomer.MiddleName;
                                                        customer.Salutation = proxycustomer.Salutation;
                                                        #endregion

                                                        #region//RepairOrder Customer Addresses
                                                        if (proxycustomer.Addresses != null && proxycustomer.Addresses.Length > 0)
                                                        {
                                                            customer.Addresses = new List<Data.v2.Common.Customer.Address>();
                                                            foreach (_WA.Mapper.v2.RepairOrder.Address proxyaddress in proxycustomer.Addresses)
                                                            {
                                                                Data.v2.Common.Customer.Address address = new Data.v2.Common.Customer.Address();
                                                                address.Address1 = proxyaddress.Address1;
                                                                address.Address2 = proxyaddress.Address2;
                                                                address.AddressType = proxyaddress.AddressType;
                                                                address.City = proxyaddress.City;
                                                                address.Country = proxyaddress.Country;
                                                                address.State = proxyaddress.State;
                                                                address.ZipCode = proxyaddress.ZipCode;
                                                                customer.Addresses.Add(address);
                                                            }
                                                        }
                                                        #endregion

                                                        #region//RepairOrder Customer Contacts
                                                        if (proxycustomer.Contacts != null && proxycustomer.Contacts.Length > 0)
                                                        {
                                                            customer.Contacts = new List<Data.v2.Common.Customer.Contact>();
                                                            foreach (_WA.Mapper.v2.RepairOrder.Contact1 proxycontact in proxycustomer.Contacts)
                                                            {
                                                                Data.v2.Common.Customer.Contact contact = new Data.v2.Common.Customer.Contact();
                                                                contact.ContactMethodYN = proxycontact.ContactMethodYN;
                                                                contact.ContactType = proxycontact.ContactType;
                                                                contact.ContactValue = proxycontact.ContactValue;
                                                                customer.Contacts.Add(contact);
                                                            }
                                                        }
                                                        #endregion

                                                        #region//RepairOrder Customer SpecialMessage
                                                        if (proxycustomer.SpecialMessage != null)
                                                        {
                                                            Data.v2.Common.Customer.SpecialMessage specialmessage = new Data.v2.Common.Customer.SpecialMessage();
                                                            specialmessage.Message = proxycustomer.SpecialMessage.Message;
                                                            customer.SpecialMessage = specialmessage;
                                                        }
                                                        #endregion

                                                        #region//RepairOrder Customer CorporateInfos
                                                        if (proxycustomer.CorporateInfos != null && proxycustomer.CorporateInfos.Length > 0)
                                                        {
                                                            customer.CorporateInfos = new List<Data.v2.Common.Customer.CorporateInfo>();
                                                            foreach (_WA.Mapper.v2.RepairOrder.CorporateInfo proxycorporateinfo in proxycustomer.CorporateInfos)
                                                            {
                                                                Data.v2.Common.Customer.CorporateInfo corporateinfo = new Data.v2.Common.Customer.CorporateInfo();
                                                                corporateinfo.CorporateInfoName = proxycorporateinfo.Name;
                                                                corporateinfo.CorporateInfoValue = proxycorporateinfo.Value;
                                                                customer.CorporateInfos.Add(corporateinfo);
                                                            }
                                                        }
                                                        #endregion

                                                        repairorder.Customers.Add(customer);
                                                    }
                                                }
                                                #endregion

                                                #region//RepairOrder Vehicle
                                                if (proxyrepairorder.Vehicle != null)
                                                {
                                                    if (proxyrepairorder.Vehicle != null)
                                                    {
                                                        #region//RepairOrder Vehicle Header
                                                        Data.v2.Common.Vehicle.Vehicle vehicle = new Data.v2.Common.Vehicle.Vehicle();
                                                        vehicle.Color = proxyrepairorder.Vehicle.Color;
                                                        vehicle.Cylinders = proxyrepairorder.Vehicle.Cylinders;
                                                        vehicle.DateDelivered = proxyrepairorder.Vehicle.DateDelivered;
                                                        vehicle.DateInService = proxyrepairorder.Vehicle.DateInService;
                                                        vehicle.DeclinedJob = proxyrepairorder.Vehicle.DeclinedJob;
                                                        vehicle.DisplayDescription = proxyrepairorder.Vehicle.DisplayDescription;
                                                        vehicle.DMSVehicleNo = proxyrepairorder.Vehicle.DMSVehicleNo;
                                                        vehicle.EngineType = proxyrepairorder.Vehicle.EngineType;
                                                        vehicle.ExtendedWarranty = proxyrepairorder.Vehicle.ExtendedWarranty;
                                                        vehicle.FuelType = proxyrepairorder.Vehicle.FuelType;
                                                        vehicle.FullModelName = proxyrepairorder.Vehicle.FullModelName;
                                                        vehicle.InsuranceDate = proxyrepairorder.Vehicle.InsuranceDate;
                                                        vehicle.LastMileage = proxyrepairorder.Vehicle.LastMileage;
                                                        vehicle.LastServiceDate = proxyrepairorder.Vehicle.LastServiceDate;
                                                        vehicle.LastSixVIN = proxyrepairorder.Vehicle.LastSixVIN;
                                                        vehicle.LicenseNumber = proxyrepairorder.Vehicle.LicenseNumber;
                                                        vehicle.LicensePlateNo = proxyrepairorder.Vehicle.LicensePlateNo;
                                                        vehicle.Make = proxyrepairorder.Vehicle.Make;
                                                        vehicle.ModelCode = proxyrepairorder.Vehicle.ModelCode;
                                                        vehicle.ModelName = proxyrepairorder.Vehicle.ModelName;
                                                        vehicle.ModelYear = proxyrepairorder.Vehicle.ModelYear;
                                                        vehicle.PendingJob = proxyrepairorder.Vehicle.PendingJob;
                                                        vehicle.StockNumber = proxyrepairorder.Vehicle.StockNumber;
                                                        vehicle.Trim = proxyrepairorder.Vehicle.Trim;
                                                        vehicle.VehicleType = proxyrepairorder.Vehicle.VehicleType;
                                                        vehicle.VIN = proxyrepairorder.Vehicle.VIN;
                                                        vehicle.WarrantyMiles = proxyrepairorder.Vehicle.WarrantyMiles;
                                                        vehicle.WarrantyMonths = proxyrepairorder.Vehicle.WarrantyMonths;
                                                        vehicle.WarrantyStartDate = proxyrepairorder.Vehicle.WarrantyStartDate;
                                                        #endregion

                                                        #region//RepairOrder Vehicle Campaigns
                                                        if (proxyrepairorder.Vehicle.Campaigns != null && proxyrepairorder.Vehicle.Campaigns.Length > 0)
                                                        {
                                                            vehicle.Campaigns = new List<Data.v2.Common.Vehicle.Campaign>();
                                                            foreach (_WA.Mapper.v2.RepairOrder.Campaign proxycampaign in proxyrepairorder.Vehicle.Campaigns)
                                                            {
                                                                Data.v2.Common.Vehicle.Campaign campaign = new Data.v2.Common.Vehicle.Campaign();
                                                                campaign.CampaignDescription = proxycampaign.CampaignDescription;
                                                                campaign.CampaignID = proxycampaign.CampaignID;
                                                                campaign.CampaignPerformed = proxycampaign.CampaignPerformed;
                                                                vehicle.Campaigns.Add(campaign);
                                                            }
                                                        }
                                                        #endregion

                                                        repairorder.Vehicle = vehicle;
                                                    }
                                                }
                                                #endregion

                                                #region//RepairOrder RequestItems
                                                if (proxyrepairorder.RequestItems != null && proxyrepairorder.RequestItems.Length > 0)
                                                {
                                                    repairorder.RequestItems = new List<RequestItem>();
                                                    foreach (_WA.Mapper.v2.RepairOrder.RequestItem proxyrequestitem in proxyrepairorder.RequestItems)
                                                    {
                                                        #region//RepairOrder RequestItem Header
                                                        RequestItem requestitem = new RequestItem();
                                                        requestitem.CPSIND = proxyrequestitem.CPSIND;
                                                        requestitem.RequestCode = proxyrequestitem.RequestCode;
                                                        requestitem.RequestDescription = proxyrequestitem.RequestDescription;
                                                        requestitem.ServiceLineNumber = proxyrequestitem.ServiceLineNumber;
                                                        requestitem.ServiceLineStatus = proxyrequestitem.ServiceLineStatus;
                                                        requestitem.ServiceType = proxyrequestitem.ServiceType;
                                                        requestitem.TCEmployeeID = proxyrequestitem.TCEmployeeID;
                                                        requestitem.TCEmployeeName = proxyrequestitem.TCEmployeeName;
                                                        requestitem.WorkType = proxyrequestitem.WorkType;
                                                        #endregion

                                                        #region//RepairOrder RequestItem Comments
                                                        if (proxyrequestitem.Comments != null && proxyrequestitem.Comments.Length > 0)
                                                        {
                                                            requestitem.Comments = new List<Comment>();
                                                            foreach (_WA.Mapper.v2.RepairOrder.Comment proxycomment in proxyrequestitem.Comments)
                                                            {
                                                                Comment comment = new Comment();
                                                                comment.DescriptionComment = proxycomment.DescriptionComment;
                                                                comment.SequenceNumber = proxycomment.SequenceNumber;
                                                                requestitem.Comments.Add(comment);
                                                            }
                                                        }
                                                        #endregion

                                                        #region//RepairOrder RequestItem Descriptions
                                                        if (proxyrequestitem.Descriptions != null && proxyrequestitem.Descriptions.Length > 0)
                                                        {
                                                            requestitem.Descriptions = new List<Description>();
                                                            foreach (_WA.Mapper.v2.RepairOrder.Description proxydescription in proxyrequestitem.Descriptions)
                                                            {
                                                                Description description = new Description();
                                                                description.DescriptionComment = proxydescription.DescriptionComment;
                                                                description.SequenceNumber = proxydescription.SequenceNumber;
                                                                requestitem.Descriptions.Add(description);
                                                            }
                                                        }
                                                        #endregion

                                                        #region//RepairOrder RequestItem OPCodes
                                                        if (proxyrequestitem.OPCodes != null && proxyrequestitem.OPCodes.Length > 0)
                                                        {
                                                            requestitem.OPCodes = new List<OPCode>();
                                                            foreach (_WA.Mapper.v2.RepairOrder.OPCode proxyopcode in proxyrequestitem.OPCodes)
                                                            {
                                                                #region//RepairOrder RequestItem OPCode Header
                                                                OPCode opcode = new OPCode();
                                                                opcode.ActualHours = proxyopcode.ActualHours;
                                                                opcode.Code = proxyopcode.Code;
                                                                opcode.Description = proxyopcode.Description;
                                                                opcode.EstimatedHours = proxyopcode.EstimatedHours;
                                                                opcode.SequenceNumber = proxyopcode.SequenceNumber;
                                                                opcode.ServiceType = proxyopcode.ServiceType;
                                                                opcode.SkillLevel = proxyopcode.SkillLevel;
                                                                #endregion

                                                                #region//RepairOrder RequestItem OPCode Descriptions
                                                                if (proxyopcode.Descriptions != null && proxyopcode.Descriptions.Length > 0)
                                                                {
                                                                    opcode.Descriptions = new List<Description>();
                                                                    foreach (_WA.Mapper.v2.RepairOrder.Description proxydescription in proxyopcode.Descriptions)
                                                                    {
                                                                        Description description = new Description();
                                                                        description.DescriptionComment = proxydescription.DescriptionComment;
                                                                        description.SequenceNumber = proxydescription.SequenceNumber;
                                                                        opcode.Descriptions.Add(description);
                                                                    }
                                                                }
                                                                #endregion

                                                                #region//RepairOrder RequestItem OPCode Causes
                                                                if (proxyopcode.Causes != null && proxyopcode.Causes.Length > 0)
                                                                {
                                                                    opcode.Causes = new List<Cause>();
                                                                    foreach (_WA.Mapper.v2.RepairOrder.Cause proxycause in proxyopcode.Causes)
                                                                    {
                                                                        Cause cause = new Cause();
                                                                        cause.CauseLaborOpCode = proxycause.CauseLaborOpCode;
                                                                        cause.Comment = proxycause.Comment;
                                                                        cause.SequenceNumber = proxycause.SequenceNumber;
                                                                        opcode.Causes.Add(cause);
                                                                    }
                                                                }
                                                                #endregion

                                                                #region//RepairOrder RequestItem OPCode Corrections
                                                                if (proxyopcode.Corrections != null && proxyopcode.Corrections.Length > 0)
                                                                {
                                                                    opcode.Corrections = new List<Correction>();
                                                                    foreach (_WA.Mapper.v2.RepairOrder.Correction proxycorrection in proxyopcode.Corrections)
                                                                    {
                                                                        Correction correction = new Correction();
                                                                        correction.CorrectionLaborOpCode = proxycorrection.CorrectionLaborOpCode;
                                                                        correction.Comment = proxycorrection.Comment;
                                                                        correction.SequenceNumber = proxycorrection.SequenceNumber;
                                                                        opcode.Corrections.Add(correction);
                                                                    }
                                                                }
                                                                #endregion

                                                                #region//RepairOrder RequestItem OPCode PriceType
                                                                if (proxyopcode.PriceType != null)
                                                                {
                                                                    PriceType pricetype = new PriceType();
                                                                    pricetype.DiscountPrice = proxyopcode.PriceType.DiscountPrice;
                                                                    pricetype.DiscountRate = proxyopcode.PriceType.DiscountRate;
                                                                    pricetype.TotalPrice = proxyopcode.PriceType.TotalPrice;
                                                                    pricetype.TotalPriceIncludeTax = proxyopcode.PriceType.TotalPriceIncludeTax;
                                                                    pricetype.UnitPrice = proxyopcode.PriceType.UnitPrice;
                                                                    opcode.PriceType = pricetype;
                                                                }
                                                                #endregion

                                                                #region//RepairOrder RequestItem OPCode Parts
                                                                if (proxyopcode.Parts != null && proxyopcode.Parts.Length > 0)
                                                                {
                                                                    opcode.Parts = new List<Part>();
                                                                    foreach (_WA.Mapper.v2.RepairOrder.Part proxypart in proxyopcode.Parts)
                                                                    {
                                                                        #region//RepairOrder RequestItem OPCode Parts Header
                                                                        Part part = new Part();
                                                                        part.DisplayPartNumber = proxypart.DisplayPartNumber;
                                                                        part.PartDescription = proxypart.PartDescription;
                                                                        part.PartNumber = proxypart.PartNumber;
                                                                        part.PartType = proxypart.PartType;
                                                                        part.Quantity = proxypart.Quantity;
                                                                        part.SequenceNumber = proxypart.SequenceNumber;
                                                                        part.ServiceType = proxypart.ServiceType;
                                                                        part.StockQuantity = proxypart.StockQuantity;
                                                                        part.StockStatus = proxypart.StockStatus;
                                                                        part.UnitOfMeasure = proxypart.UnitOfMeasure;
                                                                        #endregion

                                                                        #region//RepairOrder RequestItem OPCode Parts Descriptions
                                                                        if (proxypart.Descriptions != null && proxypart.Descriptions.Length > 0)
                                                                        {
                                                                            part.Descriptions = new List<Description>();
                                                                            foreach (_WA.Mapper.v2.RepairOrder.Description proxydescription in proxypart.Descriptions)
                                                                            {
                                                                                Description description = new Description();
                                                                                description.DescriptionComment = proxydescription.DescriptionComment;
                                                                                description.SequenceNumber = proxydescription.SequenceNumber;
                                                                                part.Descriptions.Add(description);
                                                                            }
                                                                        }
                                                                        #endregion

                                                                        #region//RepairOrder RequestItem OPCode Parts PriceType
                                                                        if (proxypart.PriceType != null)
                                                                        {
                                                                            PriceType pricetype = new PriceType();
                                                                            pricetype.DiscountPrice = proxypart.PriceType.DiscountPrice;
                                                                            pricetype.DiscountRate = proxypart.PriceType.DiscountRate;
                                                                            pricetype.TotalPrice = proxypart.PriceType.TotalPrice;
                                                                            pricetype.TotalPriceIncludeTax = proxypart.PriceType.TotalPriceIncludeTax;
                                                                            pricetype.UnitPrice = proxypart.PriceType.UnitPrice;
                                                                            part.PriceType = pricetype;
                                                                        }
                                                                        #endregion

                                                                        opcode.Parts.Add(part);
                                                                    }
                                                                }
                                                                #endregion

                                                                #region//RepairOrder RequestItem OPCode Sublets
                                                                if (proxyopcode.Sublets != null && proxyopcode.Sublets.Length > 0)
                                                                {
                                                                    opcode.Sublets = new List<Sublet>();
                                                                    foreach (_WA.Mapper.v2.RepairOrder.Sublet proxysublet in proxyopcode.Sublets)
                                                                    {
                                                                        #region//RepairOrder RequestItem OPCode Sublet Header
                                                                        Sublet sublet = new Sublet();
                                                                        sublet.SequenceNumber = proxysublet.SequenceNumber;
                                                                        sublet.ServiceType = proxysublet.ServiceType;
                                                                        #endregion

                                                                        #region//RepairOrder RequestItem OPCode Sublets Descriptions
                                                                        if (proxysublet.Descriptions != null && proxysublet.Descriptions.Length > 0)
                                                                        {
                                                                            sublet.Descriptions = new List<Description>();
                                                                            foreach (_WA.Mapper.v2.RepairOrder.Description proxydescription in proxysublet.Descriptions)
                                                                            {
                                                                                Description description = new Description();
                                                                                description.DescriptionComment = proxydescription.DescriptionComment;
                                                                                description.SequenceNumber = proxydescription.SequenceNumber;
                                                                                sublet.Descriptions.Add(description);
                                                                            }
                                                                        }
                                                                        #endregion

                                                                        #region//RepairOrder RequestItem OPCode Sublets PriceType
                                                                        if (proxysublet.PriceType != null)
                                                                        {
                                                                            PriceType pricetype = new PriceType();
                                                                            pricetype.DiscountPrice = proxysublet.PriceType.DiscountPrice;
                                                                            pricetype.DiscountRate = proxysublet.PriceType.DiscountRate;
                                                                            pricetype.TotalPrice = proxysublet.PriceType.TotalPrice;
                                                                            pricetype.TotalPriceIncludeTax = proxysublet.PriceType.TotalPriceIncludeTax;
                                                                            pricetype.UnitPrice = proxysublet.PriceType.UnitPrice;
                                                                            sublet.PriceType = pricetype;
                                                                        }
                                                                        #endregion

                                                                        opcode.Sublets.Add(sublet);
                                                                    }
                                                                }
                                                                #endregion

                                                                #region//RepairOrder RequestItem OPCode MISCs
                                                                if (proxyopcode.MISCs != null && proxyopcode.MISCs.Length > 0)
                                                                {
                                                                    opcode.MISCs = new List<MISC>();
                                                                    foreach (_WA.Mapper.v2.RepairOrder.MISC proxymisc in proxyopcode.MISCs)
                                                                    {
                                                                        #region//RepairOrder RequestItem OPCode MISC Header
                                                                        MISC misc = new MISC();
                                                                        misc.SequenceNumber = proxymisc.SequenceNumber;
                                                                        misc.ServiceType = proxymisc.ServiceType;
                                                                        #endregion

                                                                        #region//RepairOrder RequestItem OPCode MISCs Descriptions
                                                                        if (proxymisc.Descriptions != null && proxymisc.Descriptions.Length > 0)
                                                                        {
                                                                            misc.Descriptions = new List<Description>();
                                                                            foreach (_WA.Mapper.v2.RepairOrder.Description proxydescription in proxymisc.Descriptions)
                                                                            {
                                                                                Description description = new Description();
                                                                                description.DescriptionComment = proxydescription.DescriptionComment;
                                                                                description.SequenceNumber = proxydescription.SequenceNumber;
                                                                                misc.Descriptions.Add(description);
                                                                            }
                                                                        }
                                                                        #endregion

                                                                        #region//RepairOrder RequestItem OPCode MISCs PriceType
                                                                        if (proxymisc.PriceType != null)
                                                                        {
                                                                            PriceType pricetype = new PriceType();
                                                                            pricetype.DiscountPrice = proxymisc.PriceType.DiscountPrice;
                                                                            pricetype.DiscountRate = proxymisc.PriceType.DiscountRate;
                                                                            pricetype.TotalPrice = proxymisc.PriceType.TotalPrice;
                                                                            pricetype.TotalPriceIncludeTax = proxymisc.PriceType.TotalPriceIncludeTax;
                                                                            pricetype.UnitPrice = proxymisc.PriceType.UnitPrice;
                                                                            misc.PriceType = pricetype;
                                                                        }
                                                                        #endregion

                                                                        opcode.MISCs.Add(misc);
                                                                    }
                                                                }
                                                                #endregion

                                                                requestitem.OPCodes.Add(opcode);
                                                            }
                                                        }
                                                        #endregion

                                                        repairorder.RequestItems.Add(requestitem);
                                                    }
                                                }
                                                #endregion

                                                repairorderdocument.RepairOrders.Add(repairorder);
                                            }
                                        }
                                        response.RepairOrderDocuments.Add(repairorderdocument);
                                    }
                                }
                                else
                                {
                                    response.ResultMessage = GetResultMessageData(ResponseCode.NoResult, ResponseMessage.NoResult);
                                }
                                #endregion
                            }
                        }
                        else
                        {
                            if (response.Errors != null)
                                response.Errors.Add(GetErrorData(ResponseCode.Fail, ResponseMessage.Fail));
                            else
                                response.Errors = GetErrorDataList(ResponseCode.Fail, ResponseMessage.Fail);
                        }
                        #endregion
                    }
                    break;
                case "v2.HMCIS.1C.v4":
                    {
                        #region v2.HMCIS.1C.v4 - RTR (Proxy Class Dll Name : _1C.v4)

                        #region RepairOrderGet Request Set

                        //Create proxy credential
                        NetworkCredential proxycredential = new NetworkCredential(request.TransactionHeader.Username, request.TransactionHeader.Password);

                        //Create proxy web service from dms web service with credential
                        _1C.v4.RepairOrder.RepairOrder proxyws = new _1C.v4.RepairOrder.RepairOrder(request.TransactionHeader.DMSServerUrl);
                        proxyws.Credentials = proxycredential;

                        //Create proxy request with repairorderget and transaction
                        _1C.v4.RepairOrder.RepairOrderGetRequest proxyrequest = new _1C.v4.RepairOrder.RepairOrderGetRequest();

                        //Create proxy transaction
                        _1C.v4.RepairOrder.TransactionHeader proxytransactionheader = new _1C.v4.RepairOrder.TransactionHeader();
                        if (request.TransactionHeader != null)
                        {
                            #region//TransactionHeader Set
                            proxytransactionheader.CountryID = request.TransactionHeader.CountryID;
                            proxytransactionheader.DealerID = request.TransactionHeader.DealerID;
                            proxytransactionheader.DistributorID = request.TransactionHeader.DistributorID;
                            proxytransactionheader.DMSCode = request.TransactionHeader.DMSCode;
                            proxytransactionheader.DMSServerUrl = request.TransactionHeader.DMSServerUrl;
                            proxytransactionheader.DMSVersion = request.TransactionHeader.DMSVersion;
                            proxytransactionheader.DocumentVersion = request.TransactionHeader.DocumentVersion;
                            proxytransactionheader.GroupID = request.TransactionHeader.GroupID;
                            proxytransactionheader.IneterfaceID = request.TransactionHeader.IneterfaceID;
                            proxytransactionheader.Password = request.TransactionHeader.Password;
                            proxytransactionheader.PollingToken = request.TransactionHeader.PollingToken;
                            proxytransactionheader.RequestPollingToken = request.TransactionHeader.RequestPollingToken;
                            proxytransactionheader.RequestType = request.TransactionHeader.RequestType;
                            proxytransactionheader.TransactionId = request.TransactionHeader.TransactionId;
                            proxytransactionheader.TransactionDateTimeLocal = request.TransactionHeader.TransactionDateTimeLocal;
                            proxytransactionheader.TransactionDateTimeUTC = request.TransactionHeader.TransactionDateTimeUTC;
                            proxytransactionheader.TransactionType = request.TransactionHeader.TransactionType;
                            proxytransactionheader.Username = request.TransactionHeader.Username;
                            proxytransactionheader.VenderTrackingCode = request.TransactionHeader.VenderTrackingCode;
                            proxyrequest.TransactionHeader = proxytransactionheader;
                            #endregion
                        }

                        //Create proxy repairorderget
                        _1C.v4.RepairOrder.RepairOrderGet proxyrepairorderget = new _1C.v4.RepairOrder.RepairOrderGet();
                        if (request.RepairOrderGet != null)
                        {
                            #region//RepairOrderGet Set
                            proxyrepairorderget.OpenDateTimeFromLocal = request.RepairOrderGet.OpenDateTimeFromLocal;
                            proxyrepairorderget.OpenDateTimeToLocal = request.RepairOrderGet.OpenDateTimeToLocal;
                            proxyrepairorderget.DMSROID = request.RepairOrderGet.DMSROID;
                            proxyrepairorderget.DMSRONo = request.RepairOrderGet.DMSRONo;
                            proxyrepairorderget.DMSAppointmentID = request.RepairOrderGet.DMSAppointmentID;
                            proxyrepairorderget.DMSAppointmentNo = request.RepairOrderGet.DMSAppointmentNo;
                            proxyrepairorderget.DMSROStatus = request.RepairOrderGet.DMSROStatus;
                            proxyrepairorderget.LastModifiedDateTimeFromUTC = request.RepairOrderGet.LastModifiedDateTimeFromUTC;
                            proxyrepairorderget.LastModifiedDateTimeToUTC = request.RepairOrderGet.LastModifiedDateTimeToUTC;
                            proxyrepairorderget.SAEmployeeID = request.RepairOrderGet.SAEmployeeID;
                            proxyrepairorderget.SAEmployeeName = request.RepairOrderGet.SAEmployeeName;
                            proxyrepairorderget.TCEmployeeID = request.RepairOrderGet.TCEmployeeID;
                            proxyrepairorderget.TCEmployeeName = request.RepairOrderGet.TCEmployeeName;
                            if (request.RepairOrderGet.Customer != null)
                            {
                                _1C.v4.RepairOrder.Customer proxycustomer = new _1C.v4.RepairOrder.Customer();
                                proxycustomer.DMSCustomerNo = request.RepairOrderGet.Customer.DMSCustomerNo;
                                proxycustomer.LastName = request.RepairOrderGet.Customer.LastName;

                                if (request.RepairOrderGet.Customer.Contacts != null && request.RepairOrderGet.Customer.Contacts.Count > 0)
                                {
                                    int cnt = 0;
                                    proxycustomer.Contacts = new _1C.v4.RepairOrder.Contact[request.RepairOrderGet.Customer.Contacts.Count];
                                    foreach (WA.Standard.IF.Data.v2.Common.RepairOrder.Contact contact in request.RepairOrderGet.Customer.Contacts)
                                    {
                                        _1C.v4.RepairOrder.Contact proxycontact = new _1C.v4.RepairOrder.Contact();
                                        proxycontact.ContactType = contact.ContactType;
                                        proxycontact.ContactValue = contact.ContactValue;
                                        proxycustomer.Contacts[cnt] = proxycontact;
                                        cnt++;
                                    }
                                }
                                proxyrepairorderget.Customer = proxycustomer;
                            }
                            proxyrequest.RepairOrderGet = proxyrepairorderget;
                            #endregion
                        }

                        #endregion

                        //Run proxy web method with proxy request
                        _1C.v4.RepairOrder.RepairOrderGetResponse proxyresponse = proxyws.RepairOrderGet(proxyrequest);

                        //Mapping with Standard Interface Specification Object
                        if (proxyresponse != null)
                        {
                            if (proxyresponse.TransactionHeader != null)
                            {
                                #region//TransactionHeader Set
                                TransactionHeader transactionheader = new TransactionHeader();
                                transactionheader.CountryID = proxyresponse.TransactionHeader.CountryID;
                                transactionheader.DealerID = proxyresponse.TransactionHeader.DealerID;
                                transactionheader.DistributorID = proxyresponse.TransactionHeader.DistributorID;
                                transactionheader.DMSCode = proxyresponse.TransactionHeader.DMSCode;
                                transactionheader.DMSServerUrl = proxyresponse.TransactionHeader.DMSServerUrl;
                                transactionheader.DMSVersion = proxyresponse.TransactionHeader.DMSVersion;
                                transactionheader.DocumentVersion = proxyresponse.TransactionHeader.DocumentVersion;
                                transactionheader.GroupID = proxyresponse.TransactionHeader.GroupID;
                                transactionheader.IneterfaceID = proxyresponse.TransactionHeader.IneterfaceID;
                                transactionheader.Password = proxyresponse.TransactionHeader.Password;
                                transactionheader.PollingToken = proxyresponse.TransactionHeader.PollingToken;
                                transactionheader.RequestPollingToken = proxyresponse.TransactionHeader.RequestPollingToken;
                                transactionheader.RequestType = proxyresponse.TransactionHeader.RequestType;
                                transactionheader.TransactionId = proxyresponse.TransactionHeader.TransactionId;
                                transactionheader.TransactionDateTimeLocal = proxyresponse.TransactionHeader.TransactionDateTimeLocal;
                                transactionheader.TransactionDateTimeUTC = proxyresponse.TransactionHeader.TransactionDateTimeUTC;
                                transactionheader.TransactionType = proxyresponse.TransactionHeader.TransactionType;
                                transactionheader.Username = proxyresponse.TransactionHeader.Username;
                                transactionheader.VenderTrackingCode = proxyresponse.TransactionHeader.VenderTrackingCode;
                                response.TransactionHeader = transactionheader;
                                #endregion
                            }

                            //ResultMessage Set
                            if (proxyresponse.ResultMessage != null)
                            {
                                response.ResultMessage = GetResultMessageData(proxyresponse.ResultMessage.Code, proxyresponse.ResultMessage.Message);
                            }

                            if (proxyresponse.Errors != null)
                            {
                                //Error List Set
                                foreach (_1C.v4.RepairOrder.Error proxyerror in proxyresponse.Errors)
                                {
                                    if (response.Errors != null)
                                        response.Errors.Add(GetErrorData(proxyerror.Code, proxyerror.Message));
                                    else
                                        response.Errors = GetErrorDataList(proxyerror.Code, proxyerror.Message);
                                }
                            }
                            else
                            {
                                #region//RepairOrderGetResponse Set

                                if (proxyresponse.RepairOrderDocuments != null && proxyresponse.RepairOrderDocuments.Length > 0)
                                {
                                    response.RepairOrderDocuments = new List<RepairOrderDocument>();
                                    foreach (_1C.v4.RepairOrder.RepairOrderDocument proxyrepairorderdocument in proxyresponse.RepairOrderDocuments)
                                    {
                                        #region //RepairOrderDocuments Header
                                        RepairOrderDocument repairorderdocument = new RepairOrderDocument();
                                        repairorderdocument.DMSRODocumentNo = proxyrepairorderdocument.DMSRODocumentNo;
                                        repairorderdocument.DMSRODocumentStatus = proxyrepairorderdocument.DMSRODocumentStatus;
                                        #endregion

                                        if (proxyrepairorderdocument.RepairOrders != null && proxyrepairorderdocument.RepairOrders.Length > 0)
                                        {
                                            repairorderdocument.RepairOrders = new List<RepairOrder>();
                                            foreach (_1C.v4.RepairOrder.RepairOrder1 proxyrepairorder in proxyrepairorderdocument.RepairOrders)
                                            {
                                                #region //RepairOrder Header
                                                RepairOrder repairorder = new RepairOrder();
                                                repairorder.CloseDateTimeLocal = proxyrepairorder.CloseDateTimeLocal;
                                                repairorder.DeliveryDateTimeLocal = proxyrepairorder.DeliveryDateTimeLocal;
                                                repairorder.DMSROID = proxyrepairorder.DMSROID;
                                                repairorder.DMSRONo = proxyrepairorder.DMSRONo;
                                                repairorder.DMSROStatus = proxyrepairorder.DMSROStatus;
                                                repairorder.HangTagColor = proxyrepairorder.HangTagColor;
                                                repairorder.HangTagNo = proxyrepairorder.HangTagNo;
                                                repairorder.InMileage = proxyrepairorder.InMileage;
                                                repairorder.OpenDateTimeLocal = proxyrepairorder.OpenDateTimeLocal;
                                                repairorder.OutMileage = proxyrepairorder.OutMileage;
                                                repairorder.PaymentMethod = proxyrepairorder.PaymentMethod;
                                                repairorder.ROChannel = proxyrepairorder.ROChannel;
                                                repairorder.SAEmployeeID = proxyrepairorder.SAEmployeeID;
                                                repairorder.SAEmployeeName = proxyrepairorder.SAEmployeeName;
                                                repairorder.ServiceType = proxyrepairorder.ServiceType;
                                                repairorder.TCEmployeeID = proxyrepairorder.TCEmployeeID;
                                                repairorder.TCEmployeeName = proxyrepairorder.TCEmployeeName;
                                                repairorder.WorkType = proxyrepairorder.WorkType;
                                                #endregion

                                                #region//RepairOrder CustomerParts
                                                if (proxyrepairorder.CustomerParts != null && proxyrepairorder.CustomerParts.Length > 0)
                                                {
                                                    repairorder.CustomerParts = new List<CustomerPart>();
                                                    foreach (_1C.v4.RepairOrder.CustomerPart proxycustomerpart in proxyrepairorder.CustomerParts)
                                                    {
                                                        CustomerPart customerpart = new CustomerPart();
                                                        customerpart.Comment = proxycustomerpart.Comment;
                                                        customerpart.PartDescription = proxycustomerpart.PartDescription;
                                                        customerpart.PartNumber = proxycustomerpart.PartNumber;
                                                        customerpart.Quantity = proxycustomerpart.Quantity;
                                                        customerpart.UnitOfMeasure = proxycustomerpart.UnitOfMeasure;
                                                        repairorder.CustomerParts.Add(customerpart);
                                                    }
                                                }
                                                #endregion

                                                #region //RepairOrder AdditionalFields
                                                if (proxyrepairorder.AdditionalFields != null && proxyrepairorder.AdditionalFields.Length > 0)
                                                {
                                                    repairorder.AdditionalFields = new List<AdditionalField>();
                                                    foreach (_1C.v4.RepairOrder.AdditionalField proxyadditionalfield in proxyrepairorder.AdditionalFields)
                                                    {
                                                        AdditionalField additionalfield = new AdditionalField();
                                                        additionalfield.AdditionalFieldName = proxyadditionalfield.Name;
                                                        additionalfield.AdditionalFieldValue = proxyadditionalfield.Value;
                                                        repairorder.AdditionalFields.Add(additionalfield);
                                                    }
                                                }
                                                #endregion

                                                #region//RepairOrder JobRefs
                                                if (proxyrepairorder.JobRefs != null && proxyrepairorder.JobRefs.Length > 0)
                                                {
                                                    repairorder.JobRefs = new List<JobRef>();
                                                    foreach (_1C.v4.RepairOrder.JobRef proxyjobref in proxyrepairorder.JobRefs)
                                                    {
                                                        JobRef jobref = new JobRef();
                                                        jobref.DMSJobNo = proxyjobref.DMSJobNo;
                                                        jobref.DMSJobStatus = proxyjobref.DMSJobStatus;
                                                        repairorder.JobRefs.Add(jobref);
                                                    }
                                                }
                                                #endregion

                                                #region//RepairOrder ManagementFields
                                                if (proxyrepairorder.ManagementFields != null)
                                                {
                                                    ManagementFields managementfields = new ManagementFields();
                                                    managementfields.CreateDateTimeUTC = proxyrepairorder.ManagementFields.CreateDateTimeUTC;
                                                    managementfields.LastModifiedDateTimeUTC = proxyrepairorder.ManagementFields.LastModifiedDateTimeUTC;
                                                    repairorder.ManagementFields = managementfields;
                                                }
                                                #endregion

                                                #region//RepairOrder Options
                                                if (proxyrepairorder.Options != null && proxyrepairorder.Options.Length > 0)
                                                {
                                                    repairorder.Options = new List<Option>();
                                                    foreach (_1C.v4.RepairOrder.Option proxyoption in proxyrepairorder.Options)
                                                    {
                                                        Option option = new Option();
                                                        option.OptionName = proxyoption.Name;
                                                        option.OptionValue = proxyoption.Value;
                                                        repairorder.Options.Add(option);
                                                    }
                                                }
                                                #endregion

                                                #region//RepairOrder PriceType
                                                if (proxyrepairorder.PriceType != null)
                                                {
                                                    PriceType pricetype = new PriceType();
                                                    pricetype.DiscountPrice = proxyrepairorder.PriceType.DiscountPrice;
                                                    pricetype.DiscountRate = proxyrepairorder.PriceType.DiscountRate;
                                                    pricetype.TotalPrice = proxyrepairorder.PriceType.TotalPrice;
                                                    pricetype.TotalPriceIncludeTax = proxyrepairorder.PriceType.TotalPriceIncludeTax;
                                                    pricetype.UnitPrice = proxyrepairorder.PriceType.UnitPrice;
                                                    repairorder.PriceType = pricetype;
                                                }
                                                #endregion

                                                #region//RepairOrder AppointmentRef
                                                if (proxyrepairorder.AppointmentRef != null)
                                                {
                                                    AppointmentRef appointmentref = new AppointmentRef();
                                                    appointmentref.DMSAppointmentNo = proxyrepairorder.AppointmentRef.DMSAppointmentNo;
                                                    appointmentref.DMSAppointmentStatus = proxyrepairorder.AppointmentRef.DMSAppointmentStatus;
                                                    repairorder.AppointmentRef = appointmentref;
                                                }
                                                #endregion

                                                #region//RepairOrder Customers
                                                if (proxyrepairorder.Customers != null && proxyrepairorder.Customers.Length > 0)
                                                {
                                                    repairorder.Customers = new List<Data.v2.Common.Customer.Customer>();
                                                    foreach (_1C.v4.RepairOrder.Customer1 proxycustomer in proxyrepairorder.Customers)
                                                    {
                                                        #region//RepairOrder Customer Header
                                                        WA.Standard.IF.Data.v2.Common.Customer.Customer customer = new Data.v2.Common.Customer.Customer();
                                                        customer.CardNo = proxycustomer.CardNo;
                                                        customer.CorporateInfos = customer.CorporateInfos;
                                                        customer.CustomerInfoType = customer.CustomerInfoType;
                                                        customer.DMSCustomerNo = proxycustomer.DMSCustomerNo;
                                                        customer.Email = proxycustomer.Email;
                                                        customer.FirstName = proxycustomer.FirstName;
                                                        customer.FullName = proxycustomer.FullName;
                                                        customer.Gender = proxycustomer.Gender;
                                                        customer.LastName = proxycustomer.LastName;
                                                        customer.MiddleName = proxycustomer.MiddleName;
                                                        customer.Salutation = proxycustomer.Salutation;
                                                        #endregion

                                                        #region//RepairOrder Customer Addresses
                                                        if (proxycustomer.Addresses != null && proxycustomer.Addresses.Length > 0)
                                                        {
                                                            customer.Addresses = new List<Data.v2.Common.Customer.Address>();
                                                            foreach (_1C.v4.RepairOrder.Address proxyaddress in proxycustomer.Addresses)
                                                            {
                                                                Data.v2.Common.Customer.Address address = new Data.v2.Common.Customer.Address();
                                                                address.Address1 = proxyaddress.Address1;
                                                                address.Address2 = proxyaddress.Address2;
                                                                address.AddressType = proxyaddress.AddressType;
                                                                address.City = proxyaddress.City;
                                                                address.Country = proxyaddress.Country;
                                                                address.State = proxyaddress.State;
                                                                address.ZipCode = proxyaddress.ZipCode;
                                                                customer.Addresses.Add(address);
                                                            }
                                                        }
                                                        #endregion

                                                        #region//RepairOrder Customer Contacts
                                                        if (proxycustomer.Contacts != null && proxycustomer.Contacts.Length > 0)
                                                        {
                                                            customer.Contacts = new List<Data.v2.Common.Customer.Contact>();
                                                            foreach (_1C.v4.RepairOrder.Contact1 proxycontact in proxycustomer.Contacts)
                                                            {
                                                                Data.v2.Common.Customer.Contact contact = new Data.v2.Common.Customer.Contact();
                                                                contact.ContactMethodYN = proxycontact.ContactMethodYN;
                                                                contact.ContactType = proxycontact.ContactType;
                                                                contact.ContactValue = proxycontact.ContactValue;
                                                                customer.Contacts.Add(contact);
                                                            }
                                                        }
                                                        #endregion

                                                        #region//RepairOrder Customer SpecialMessage
                                                        if (proxycustomer.SpecialMessage != null)
                                                        {
                                                            Data.v2.Common.Customer.SpecialMessage specialmessage = new Data.v2.Common.Customer.SpecialMessage();
                                                            specialmessage.Message = proxycustomer.SpecialMessage.Message;
                                                            customer.SpecialMessage = specialmessage;
                                                        }
                                                        #endregion

                                                        #region//RepairOrder Customer CorporateInfos
                                                        if (proxycustomer.CorporateInfos != null && proxycustomer.CorporateInfos.Length > 0)
                                                        {
                                                            customer.CorporateInfos = new List<Data.v2.Common.Customer.CorporateInfo>();
                                                            foreach (_1C.v4.RepairOrder.CorporateInfo proxycorporateinfo in proxycustomer.CorporateInfos)
                                                            {
                                                                Data.v2.Common.Customer.CorporateInfo corporateinfo = new Data.v2.Common.Customer.CorporateInfo();
                                                                corporateinfo.CorporateInfoName = proxycorporateinfo.Name;
                                                                corporateinfo.CorporateInfoValue = proxycorporateinfo.Value;
                                                                customer.CorporateInfos.Add(corporateinfo);
                                                            }
                                                        }
                                                        #endregion

                                                        repairorder.Customers.Add(customer);
                                                    }
                                                }
                                                #endregion

                                                #region//RepairOrder Vehicle
                                                if (proxyrepairorder.Vehicle != null)
                                                {
                                                    if (proxyrepairorder.Vehicle != null)
                                                    {
                                                        #region//RepairOrder Vehicle Header
                                                        Data.v2.Common.Vehicle.Vehicle vehicle = new Data.v2.Common.Vehicle.Vehicle();
                                                        vehicle.Color = proxyrepairorder.Vehicle.Color;
                                                        vehicle.Cylinders = proxyrepairorder.Vehicle.Cylinders;
                                                        vehicle.DateDelivered = proxyrepairorder.Vehicle.DateDelivered;
                                                        vehicle.DateInService = proxyrepairorder.Vehicle.DateInService;
                                                        vehicle.DeclinedJob = proxyrepairorder.Vehicle.DeclinedJob;
                                                        vehicle.DisplayDescription = proxyrepairorder.Vehicle.DisplayDescription;
                                                        vehicle.DMSVehicleNo = proxyrepairorder.Vehicle.DMSVehicleNo;
                                                        vehicle.EngineType = proxyrepairorder.Vehicle.EngineType;
                                                        vehicle.ExtendedWarranty = proxyrepairorder.Vehicle.ExtendedWarranty;
                                                        vehicle.FuelType = proxyrepairorder.Vehicle.FuelType;
                                                        vehicle.FullModelName = proxyrepairorder.Vehicle.FullModelName;
                                                        vehicle.InsuranceDate = proxyrepairorder.Vehicle.InsuranceDate;
                                                        vehicle.LastMileage = proxyrepairorder.Vehicle.LastMileage;
                                                        vehicle.LastServiceDate = proxyrepairorder.Vehicle.LastServiceDate;
                                                        vehicle.LastSixVIN = proxyrepairorder.Vehicle.LastSixVIN;
                                                        vehicle.LicenseNumber = proxyrepairorder.Vehicle.LicenseNumber;
                                                        vehicle.LicensePlateNo = proxyrepairorder.Vehicle.LicensePlateNo;
                                                        vehicle.Make = proxyrepairorder.Vehicle.Make;
                                                        vehicle.ModelCode = proxyrepairorder.Vehicle.ModelCode;
                                                        vehicle.ModelName = proxyrepairorder.Vehicle.ModelName;
                                                        vehicle.ModelYear = proxyrepairorder.Vehicle.ModelYear;
                                                        vehicle.PendingJob = proxyrepairorder.Vehicle.PendingJob;
                                                        vehicle.StockNumber = proxyrepairorder.Vehicle.StockNumber;
                                                        vehicle.Trim = proxyrepairorder.Vehicle.Trim;
                                                        vehicle.VehicleType = proxyrepairorder.Vehicle.VehicleType;
                                                        vehicle.VIN = proxyrepairorder.Vehicle.VIN;
                                                        vehicle.WarrantyMiles = proxyrepairorder.Vehicle.WarrantyMiles;
                                                        vehicle.WarrantyMonths = proxyrepairorder.Vehicle.WarrantyMonths;
                                                        vehicle.WarrantyStartDate = proxyrepairorder.Vehicle.WarrantyStartDate;
                                                        #endregion

                                                        #region//RepairOrder Vehicle Campaigns
                                                        if (proxyrepairorder.Vehicle.Campaigns != null && proxyrepairorder.Vehicle.Campaigns.Length > 0)
                                                        {
                                                            vehicle.Campaigns = new List<Data.v2.Common.Vehicle.Campaign>();
                                                            foreach (_1C.v4.RepairOrder.Campaign proxycampaign in proxyrepairorder.Vehicle.Campaigns)
                                                            {
                                                                Data.v2.Common.Vehicle.Campaign campaign = new Data.v2.Common.Vehicle.Campaign();
                                                                campaign.CampaignDescription = proxycampaign.CampaignDescription;
                                                                campaign.CampaignID = proxycampaign.CampaignID;
                                                                campaign.CampaignPerformed = proxycampaign.CampaignPerformed;
                                                                vehicle.Campaigns.Add(campaign);
                                                            }
                                                        }
                                                        #endregion

                                                        repairorder.Vehicle = vehicle;
                                                    }
                                                }
                                                #endregion

                                                #region//RepairOrder RequestItems
                                                if (proxyrepairorder.RequestItems != null && proxyrepairorder.RequestItems.Length > 0)
                                                {
                                                    repairorder.RequestItems = new List<RequestItem>();
                                                    foreach (_1C.v4.RepairOrder.RequestItem proxyrequestitem in proxyrepairorder.RequestItems)
                                                    {
                                                        #region//RepairOrder RequestItem Header
                                                        RequestItem requestitem = new RequestItem();
                                                        requestitem.CPSIND = proxyrequestitem.CPSIND;
                                                        requestitem.RequestCode = proxyrequestitem.RequestCode;
                                                        requestitem.RequestDescription = proxyrequestitem.RequestDescription;
                                                        requestitem.ServiceLineNumber = proxyrequestitem.ServiceLineNumber;
                                                        requestitem.ServiceLineStatus = proxyrequestitem.ServiceLineStatus;
                                                        requestitem.ServiceType = proxyrequestitem.ServiceType;
                                                        requestitem.TCEmployeeID = proxyrequestitem.TCEmployeeID;
                                                        requestitem.TCEmployeeName = proxyrequestitem.TCEmployeeName;
                                                        requestitem.WorkType = proxyrequestitem.WorkType;
                                                        #endregion

                                                        #region//RepairOrder RequestItem Comments
                                                        if (proxyrequestitem.Comments != null && proxyrequestitem.Comments.Length > 0)
                                                        {
                                                            requestitem.Comments = new List<Comment>();
                                                            foreach (_1C.v4.RepairOrder.Comment proxycomment in proxyrequestitem.Comments)
                                                            {
                                                                Comment comment = new Comment();
                                                                comment.DescriptionComment = proxycomment.DescriptionComment;
                                                                comment.SequenceNumber = proxycomment.SequenceNumber;
                                                                requestitem.Comments.Add(comment);
                                                            }
                                                        }
                                                        #endregion

                                                        #region//RepairOrder RequestItem Descriptions
                                                        if (proxyrequestitem.Descriptions != null && proxyrequestitem.Descriptions.Length > 0)
                                                        {
                                                            requestitem.Descriptions = new List<Description>();
                                                            foreach (_1C.v4.RepairOrder.Description proxydescription in proxyrequestitem.Descriptions)
                                                            {
                                                                Description description = new Description();
                                                                description.DescriptionComment = proxydescription.DescriptionComment;
                                                                description.SequenceNumber = proxydescription.SequenceNumber;
                                                                requestitem.Descriptions.Add(description);
                                                            }
                                                        }
                                                        #endregion

                                                        #region//RepairOrder RequestItem OPCodes
                                                        if (proxyrequestitem.OPCodes != null && proxyrequestitem.OPCodes.Length > 0)
                                                        {
                                                            requestitem.OPCodes = new List<OPCode>();
                                                            foreach (_1C.v4.RepairOrder.OPCode proxyopcode in proxyrequestitem.OPCodes)
                                                            {
                                                                #region//RepairOrder RequestItem OPCode Header
                                                                OPCode opcode = new OPCode();
                                                                opcode.ActualHours = proxyopcode.ActualHours;
                                                                opcode.Code = proxyopcode.Code;
                                                                opcode.Description = proxyopcode.Description;
                                                                opcode.EstimatedHours = proxyopcode.EstimatedHours;
                                                                opcode.SequenceNumber = proxyopcode.SequenceNumber;
                                                                opcode.ServiceType = proxyopcode.ServiceType;
                                                                opcode.SkillLevel = proxyopcode.SkillLevel;
                                                                #endregion

                                                                #region//RepairOrder RequestItem OPCode Descriptions
                                                                if (proxyopcode.Descriptions != null && proxyopcode.Descriptions.Length > 0)
                                                                {
                                                                    opcode.Descriptions = new List<Description>();
                                                                    foreach (_1C.v4.RepairOrder.Description proxydescription in proxyopcode.Descriptions)
                                                                    {
                                                                        Description description = new Description();
                                                                        description.DescriptionComment = proxydescription.DescriptionComment;
                                                                        description.SequenceNumber = proxydescription.SequenceNumber;
                                                                        opcode.Descriptions.Add(description);
                                                                    }
                                                                }
                                                                #endregion

                                                                #region//RepairOrder RequestItem OPCode Causes
                                                                if (proxyopcode.Causes != null && proxyopcode.Causes.Length > 0)
                                                                {
                                                                    opcode.Causes = new List<Cause>();
                                                                    foreach (_1C.v4.RepairOrder.Cause proxycause in proxyopcode.Causes)
                                                                    {
                                                                        Cause cause = new Cause();
                                                                        cause.CauseLaborOpCode = proxycause.CauseLaborOpCode;
                                                                        cause.Comment = proxycause.Comment;
                                                                        cause.SequenceNumber = proxycause.SequenceNumber;
                                                                        opcode.Causes.Add(cause);
                                                                    }
                                                                }
                                                                #endregion

                                                                #region//RepairOrder RequestItem OPCode Corrections
                                                                if (proxyopcode.Corrections != null && proxyopcode.Corrections.Length > 0)
                                                                {
                                                                    opcode.Corrections = new List<Correction>();
                                                                    foreach (_1C.v4.RepairOrder.Correction proxycorrection in proxyopcode.Corrections)
                                                                    {
                                                                        Correction correction = new Correction();
                                                                        correction.CorrectionLaborOpCode = proxycorrection.CorrectionLaborOpCode;
                                                                        correction.Comment = proxycorrection.Comment;
                                                                        correction.SequenceNumber = proxycorrection.SequenceNumber;
                                                                        opcode.Corrections.Add(correction);
                                                                    }
                                                                }
                                                                #endregion

                                                                #region//RepairOrder RequestItem OPCode PriceType
                                                                if (proxyopcode.PriceType != null)
                                                                {
                                                                    PriceType pricetype = new PriceType();
                                                                    pricetype.DiscountPrice = proxyopcode.PriceType.DiscountPrice;
                                                                    pricetype.DiscountRate = proxyopcode.PriceType.DiscountRate;
                                                                    pricetype.TotalPrice = proxyopcode.PriceType.TotalPrice;
                                                                    pricetype.TotalPriceIncludeTax = proxyopcode.PriceType.TotalPriceIncludeTax;
                                                                    pricetype.UnitPrice = proxyopcode.PriceType.UnitPrice;
                                                                    opcode.PriceType = pricetype;
                                                                }
                                                                #endregion

                                                                #region//RepairOrder RequestItem OPCode Parts
                                                                if (proxyopcode.Parts != null && proxyopcode.Parts.Length > 0)
                                                                {
                                                                    opcode.Parts = new List<Part>();
                                                                    foreach (_1C.v4.RepairOrder.Part proxypart in proxyopcode.Parts)
                                                                    {
                                                                        #region//RepairOrder RequestItem OPCode Parts Header
                                                                        Part part = new Part();
                                                                        part.DisplayPartNumber = proxypart.DisplayPartNumber;
                                                                        part.PartDescription = proxypart.PartDescription;
                                                                        part.PartNumber = proxypart.PartNumber;
                                                                        part.PartType = proxypart.PartType;
                                                                        part.Quantity = proxypart.Quantity;
                                                                        part.SequenceNumber = proxypart.SequenceNumber;
                                                                        part.ServiceType = proxypart.ServiceType;
                                                                        part.StockQuantity = proxypart.StockQuantity;
                                                                        part.StockStatus = proxypart.StockStatus;
                                                                        part.UnitOfMeasure = proxypart.UnitOfMeasure;
                                                                        #endregion

                                                                        #region//RepairOrder RequestItem OPCode Parts Descriptions
                                                                        if (proxypart.Descriptions != null && proxypart.Descriptions.Length > 0)
                                                                        {
                                                                            part.Descriptions = new List<Description>();
                                                                            foreach (_1C.v4.RepairOrder.Description proxydescription in proxypart.Descriptions)
                                                                            {
                                                                                Description description = new Description();
                                                                                description.DescriptionComment = proxydescription.DescriptionComment;
                                                                                description.SequenceNumber = proxydescription.SequenceNumber;
                                                                                part.Descriptions.Add(description);
                                                                            }
                                                                        }
                                                                        #endregion

                                                                        #region//RepairOrder RequestItem OPCode Parts PriceType
                                                                        if (proxypart.PriceType != null)
                                                                        {
                                                                            PriceType pricetype = new PriceType();
                                                                            pricetype.DiscountPrice = proxypart.PriceType.DiscountPrice;
                                                                            pricetype.DiscountRate = proxypart.PriceType.DiscountRate;
                                                                            pricetype.TotalPrice = proxypart.PriceType.TotalPrice;
                                                                            pricetype.TotalPriceIncludeTax = proxypart.PriceType.TotalPriceIncludeTax;
                                                                            pricetype.UnitPrice = proxypart.PriceType.UnitPrice;
                                                                            part.PriceType = pricetype;
                                                                        }
                                                                        #endregion

                                                                        opcode.Parts.Add(part);
                                                                    }
                                                                }
                                                                #endregion

                                                                #region//RepairOrder RequestItem OPCode Sublets
                                                                if (proxyopcode.Sublets != null && proxyopcode.Sublets.Length > 0)
                                                                {
                                                                    opcode.Sublets = new List<Sublet>();
                                                                    foreach (_1C.v4.RepairOrder.Sublet proxysublet in proxyopcode.Sublets)
                                                                    {
                                                                        #region//RepairOrder RequestItem OPCode Sublet Header
                                                                        Sublet sublet = new Sublet();
                                                                        sublet.SequenceNumber = proxysublet.SequenceNumber;
                                                                        sublet.ServiceType = proxysublet.ServiceType;
                                                                        #endregion

                                                                        #region//RepairOrder RequestItem OPCode Sublets Descriptions
                                                                        if (proxysublet.Descriptions != null && proxysublet.Descriptions.Length > 0)
                                                                        {
                                                                            sublet.Descriptions = new List<Description>();
                                                                            foreach (_1C.v4.RepairOrder.Description proxydescription in proxysublet.Descriptions)
                                                                            {
                                                                                Description description = new Description();
                                                                                description.DescriptionComment = proxydescription.DescriptionComment;
                                                                                description.SequenceNumber = proxydescription.SequenceNumber;
                                                                                sublet.Descriptions.Add(description);
                                                                            }
                                                                        }
                                                                        #endregion

                                                                        #region//RepairOrder RequestItem OPCode Sublets PriceType
                                                                        if (proxysublet.PriceType != null)
                                                                        {
                                                                            PriceType pricetype = new PriceType();
                                                                            pricetype.DiscountPrice = proxysublet.PriceType.DiscountPrice;
                                                                            pricetype.DiscountRate = proxysublet.PriceType.DiscountRate;
                                                                            pricetype.TotalPrice = proxysublet.PriceType.TotalPrice;
                                                                            pricetype.TotalPriceIncludeTax = proxysublet.PriceType.TotalPriceIncludeTax;
                                                                            pricetype.UnitPrice = proxysublet.PriceType.UnitPrice;
                                                                            sublet.PriceType = pricetype;
                                                                        }
                                                                        #endregion

                                                                        opcode.Sublets.Add(sublet);
                                                                    }
                                                                }
                                                                #endregion

                                                                #region//RepairOrder RequestItem OPCode MISCs
                                                                if (proxyopcode.MISCs != null && proxyopcode.MISCs.Length > 0)
                                                                {
                                                                    opcode.MISCs = new List<MISC>();
                                                                    foreach (_1C.v4.RepairOrder.MISC proxymisc in proxyopcode.MISCs)
                                                                    {
                                                                        #region//RepairOrder RequestItem OPCode MISC Header
                                                                        MISC misc = new MISC();
                                                                        misc.SequenceNumber = proxymisc.SequenceNumber;
                                                                        misc.ServiceType = proxymisc.ServiceType;
                                                                        #endregion

                                                                        #region//RepairOrder RequestItem OPCode MISCs Descriptions
                                                                        if (proxymisc.Descriptions != null && proxymisc.Descriptions.Length > 0)
                                                                        {
                                                                            misc.Descriptions = new List<Description>();
                                                                            foreach (_1C.v4.RepairOrder.Description proxydescription in proxymisc.Descriptions)
                                                                            {
                                                                                Description description = new Description();
                                                                                description.DescriptionComment = proxydescription.DescriptionComment;
                                                                                description.SequenceNumber = proxydescription.SequenceNumber;
                                                                                misc.Descriptions.Add(description);
                                                                            }
                                                                        }
                                                                        #endregion

                                                                        #region//RepairOrder RequestItem OPCode MISCs PriceType
                                                                        if (proxymisc.PriceType != null)
                                                                        {
                                                                            PriceType pricetype = new PriceType();
                                                                            pricetype.DiscountPrice = proxymisc.PriceType.DiscountPrice;
                                                                            pricetype.DiscountRate = proxymisc.PriceType.DiscountRate;
                                                                            pricetype.TotalPrice = proxymisc.PriceType.TotalPrice;
                                                                            pricetype.TotalPriceIncludeTax = proxymisc.PriceType.TotalPriceIncludeTax;
                                                                            pricetype.UnitPrice = proxymisc.PriceType.UnitPrice;
                                                                            misc.PriceType = pricetype;
                                                                        }
                                                                        #endregion

                                                                        opcode.MISCs.Add(misc);
                                                                    }
                                                                }
                                                                #endregion

                                                                requestitem.OPCodes.Add(opcode);
                                                            }
                                                        }
                                                        #endregion

                                                        repairorder.RequestItems.Add(requestitem);
                                                    }
                                                }
                                                #endregion

                                                repairorderdocument.RepairOrders.Add(repairorder);
                                            }
                                        }
                                        response.RepairOrderDocuments.Add(repairorderdocument);
                                    }
                                }
                                else
                                {
                                    response.ResultMessage = GetResultMessageData(ResponseCode.NoResult, ResponseMessage.NoResult);
                                }
                                #endregion
                            }
                        }
                        else
                        {
                            if (response.Errors != null)
                                response.Errors.Add(GetErrorData(ResponseCode.Fail, ResponseMessage.Fail));
                            else
                                response.Errors = GetErrorDataList(ResponseCode.Fail, ResponseMessage.Fail);
                        }
                        #endregion
                    }
                    break;
                default: response.Errors = new List<Error>() { new Error() { Code = ResponseCode.NoMatchedProxy, Message = ResponseMessage.NoMatchedProxy } };
                    break;
            }

            return response;
        }
示例#6
0
        public JobChangeResponse JobChange(JobChangeRequest request)
        {
            JobChangeResponse response = new JobChangeResponse();

            //DMS information set by dealer information
            string proxypath = string.Format("{0}.{1}.{2}.{3}",
                request.TransactionHeader.DocumentVersion,
                request.TransactionHeader.DistributorID,
                request.TransactionHeader.DMSCode,
                request.TransactionHeader.DMSVersion);

            switch (proxypath)
            {
                case "v2.Common.WA.v2":
                    {
                        #region v2.Common.WA.v2 - Standard (Proxy Class Dll Name : _WA.Mapper.v2)

                        #region JobChange Request Set

                        //Create proxy credential
                        NetworkCredential proxycredential = new NetworkCredential(request.TransactionHeader.Username, request.TransactionHeader.Password);

                        //Create proxy web service from dms web service with credential
                        _WA.Mapper.v2.Job.Job proxyws = new _WA.Mapper.v2.Job.Job(request.TransactionHeader.DMSServerUrl);
                        proxyws.Credentials = proxycredential;

                        //Create proxy request with jobchange and transaction
                        _WA.Mapper.v2.Job.JobChangeRequest proxyrequest = new _WA.Mapper.v2.Job.JobChangeRequest();

                        //Create proxy transaction
                        _WA.Mapper.v2.Job.TransactionHeader2 proxytransactionheader = new _WA.Mapper.v2.Job.TransactionHeader2();
                        if (request.TransactionHeader != null)
                        {
                            #region//TransactionHeader Set
                            proxytransactionheader.CountryID = request.TransactionHeader.CountryID;
                            proxytransactionheader.DealerID = request.TransactionHeader.DealerID;
                            proxytransactionheader.DistributorID = request.TransactionHeader.DistributorID;
                            proxytransactionheader.DMSCode = request.TransactionHeader.DMSCode;
                            proxytransactionheader.DMSServerUrl = request.TransactionHeader.DMSServerUrl;
                            proxytransactionheader.DMSVersion = request.TransactionHeader.DMSVersion;
                            proxytransactionheader.DocumentVersion = request.TransactionHeader.DocumentVersion;
                            proxytransactionheader.GroupID = request.TransactionHeader.GroupID;
                            proxytransactionheader.IneterfaceID = request.TransactionHeader.IneterfaceID;
                            proxytransactionheader.Password = request.TransactionHeader.Password;
                            proxytransactionheader.PollingToken = request.TransactionHeader.PollingToken;
                            proxytransactionheader.RequestPollingToken = request.TransactionHeader.RequestPollingToken;
                            proxytransactionheader.RequestType = request.TransactionHeader.RequestType;
                            proxytransactionheader.TransactionId = request.TransactionHeader.TransactionId;
                            proxytransactionheader.TransactionDateTimeLocal = request.TransactionHeader.TransactionDateTimeLocal;
                            proxytransactionheader.TransactionDateTimeUTC = request.TransactionHeader.TransactionDateTimeUTC;
                            proxytransactionheader.TransactionType = request.TransactionHeader.TransactionType;
                            proxytransactionheader.Username = request.TransactionHeader.Username;
                            proxytransactionheader.VenderTrackingCode = request.TransactionHeader.VenderTrackingCode;
                            proxyrequest.TransactionHeader = proxytransactionheader;
                            #endregion
                        }

                        //Create proxy jobchange
                        _WA.Mapper.v2.Job.JobChange proxyjobchange = new _WA.Mapper.v2.Job.JobChange();
                        if (request.JobChange != null)
                        {
                            #region//JobChange Header
                            proxyjobchange.ActualHours = request.JobChange.ActualHours;
                            proxyjobchange.DMSJobNo = request.JobChange.DMSJobNo;
                            proxyjobchange.DMSJobNo = request.JobChange.DMSJobNo;
                            proxyjobchange.DMSRONo = request.JobChange.DMSRONo;
                            proxyjobchange.EstimatedHours = request.JobChange.EstimatedHours;
                            proxyjobchange.ServiceLineNumber = request.JobChange.ServiceLineNumber;
                            proxyjobchange.SkillLevel = request.JobChange.SkillLevel;
                            #endregion

                            #region//JobChange Comments
                            if (request.JobChange.Comments != null && request.JobChange.Comments.Count > 0)
                            {
                                int commentscnt = 0;
                                _WA.Mapper.v2.Job.Comment1[] proxycomments = new _WA.Mapper.v2.Job.Comment1[request.JobChange.Comments.Count];
                                foreach (Comment Comment in request.JobChange.Comments)
                                {
                                    _WA.Mapper.v2.Job.Comment1 proxycomment = new _WA.Mapper.v2.Job.Comment1();
                                    proxycomment.DescriptionComment = Comment.DescriptionComment;
                                    proxycomment.SequenceNumber = Comment.SequenceNumber;
                                    proxycomments[commentscnt] = proxycomment;
                                    commentscnt++;
                                }
                                proxyjobchange.Comments = proxycomments;
                            }
                            #endregion

                            #region//JobChange Descriptions
                            if (request.JobChange.Descriptions != null && request.JobChange.Descriptions.Count > 0)
                            {
                                int descriptionscnt = 0;
                                _WA.Mapper.v2.Job.Description1[] proxydescriptions = new _WA.Mapper.v2.Job.Description1[request.JobChange.Descriptions.Count];
                                foreach (Description description in request.JobChange.Descriptions)
                                {
                                    _WA.Mapper.v2.Job.Description1 proxydescription = new _WA.Mapper.v2.Job.Description1();
                                    proxydescription.DescriptionComment = description.DescriptionComment;
                                    proxydescription.SequenceNumber = description.SequenceNumber;
                                    proxydescriptions[descriptionscnt] = proxydescription;
                                    descriptionscnt++;
                                }
                                proxyjobchange.Descriptions = proxydescriptions;
                            }
                            #endregion

                            #region//JobChange Causes
                            if (request.JobChange.Causes != null && request.JobChange.Causes.Count > 0)
                            {
                                int causescnt = 0;
                                _WA.Mapper.v2.Job.Cause1[] proxycauses = new _WA.Mapper.v2.Job.Cause1[request.JobChange.Causes.Count];
                                foreach (Cause cause in request.JobChange.Causes)
                                {
                                    _WA.Mapper.v2.Job.Cause1 proxycause = new _WA.Mapper.v2.Job.Cause1();
                                    proxycause.CauseLaborOpCode = cause.CauseLaborOpCode;
                                    proxycause.Comment = cause.Comment;
                                    proxycause.SequenceNumber = cause.SequenceNumber;
                                    proxycauses[causescnt] = proxycause;
                                    causescnt++;
                                }
                                proxyjobchange.Causes = proxycauses;
                            }
                            #endregion

                            #region//JobChange Corrections
                            if (request.JobChange.Corrections != null && request.JobChange.Corrections.Count > 0)
                            {
                                int correctionscnt = 0;
                                _WA.Mapper.v2.Job.Correction1[] proxycorrections = new _WA.Mapper.v2.Job.Correction1[request.JobChange.Corrections.Count];
                                foreach (Correction correction in request.JobChange.Corrections)
                                {
                                    _WA.Mapper.v2.Job.Correction1 proxycorrection = new _WA.Mapper.v2.Job.Correction1();
                                    proxycorrection.CorrectionLaborOpCode = correction.CorrectionLaborOpCode;
                                    proxycorrection.Comment = correction.Comment;
                                    proxycorrection.SequenceNumber = correction.SequenceNumber;
                                    proxycorrections[correctionscnt] = proxycorrection;
                                    correctionscnt++;
                                }
                                proxyjobchange.Corrections = proxycorrections;
                            }
                            #endregion

                            #region//JobChange OPCodes
                            if (request.JobChange.OPCodes != null && request.JobChange.OPCodes.Count > 0)
                            {
                                int opcodescnt = 0;
                                _WA.Mapper.v2.Job.OPCode1[] proxyopcodes = new _WA.Mapper.v2.Job.OPCode1[request.JobChange.OPCodes.Count];
                                foreach (WA.Standard.IF.Data.v2.Common.Job.OPCode opcode in request.JobChange.OPCodes)
                                {
                                    #region//JobChange OPCode Header
                                    _WA.Mapper.v2.Job.OPCode1 proxyopcode = new _WA.Mapper.v2.Job.OPCode1();
                                    proxyopcode.ActualHours = opcode.ActualHours;
                                    proxyopcode.Code = opcode.Code;
                                    proxyopcode.Description = opcode.Description;
                                    proxyopcode.EstimatedHours = opcode.EstimatedHours;
                                    proxyopcode.SkillLevel = opcode.SkillLevel;
                                    #endregion

                                    #region//JobChange OPCode Comments
                                    if (opcode.Comments != null && opcode.Comments.Count > 0)
                                    {
                                        int commentscnt = 0;
                                        _WA.Mapper.v2.Job.Comment1[] proxycomments = new _WA.Mapper.v2.Job.Comment1[opcode.Comments.Count];
                                        foreach (Comment comment in opcode.Comments)
                                        {
                                            _WA.Mapper.v2.Job.Comment1 proxycomment = new _WA.Mapper.v2.Job.Comment1();
                                            proxycomment.DescriptionComment = comment.DescriptionComment;
                                            proxycomment.SequenceNumber = comment.SequenceNumber;
                                            proxycomments[commentscnt] = proxycomment;
                                            commentscnt++;
                                        }
                                        proxyopcode.Comments = proxycomments;
                                    }
                                    #endregion

                                    #region//JobChange OPCode Descriptions
                                    if (opcode.Descriptions != null && opcode.Descriptions.Count > 0)
                                    {
                                        int descriptionscnt = 0;
                                        _WA.Mapper.v2.Job.Description1[] proxydescriptions = new _WA.Mapper.v2.Job.Description1[opcode.Descriptions.Count];
                                        foreach (Description description in opcode.Descriptions)
                                        {
                                            _WA.Mapper.v2.Job.Description1 proxydescription = new _WA.Mapper.v2.Job.Description1();
                                            proxydescription.DescriptionComment = description.DescriptionComment;
                                            proxydescription.SequenceNumber = description.SequenceNumber;
                                            proxydescriptions[descriptionscnt] = proxydescription;
                                            descriptionscnt++;
                                        }
                                        proxyopcode.Descriptions = proxydescriptions;
                                    }
                                    #endregion

                                    #region//JobChange OPCode Causes
                                    if (opcode.Causes != null && opcode.Causes.Count > 0)
                                    {
                                        int causescnt = 0;
                                        _WA.Mapper.v2.Job.Cause1[] proxycauses = new _WA.Mapper.v2.Job.Cause1[opcode.Causes.Count];
                                        foreach (Cause cause in opcode.Causes)
                                        {
                                            _WA.Mapper.v2.Job.Cause1 proxycause = new _WA.Mapper.v2.Job.Cause1();
                                            proxycause.CauseLaborOpCode = cause.CauseLaborOpCode;
                                            proxycause.Comment = cause.Comment;
                                            proxycause.SequenceNumber = cause.SequenceNumber;
                                            proxycauses[causescnt] = proxycause;
                                            causescnt++;
                                        }
                                        proxyopcode.Causes = proxycauses;
                                    }
                                    #endregion

                                    #region//JobChange OPCode Corrections
                                    if (opcode.Corrections != null && opcode.Corrections.Count > 0)
                                    {
                                        int correctionscnt = 0;
                                        _WA.Mapper.v2.Job.Correction1[] proxycorrections = new _WA.Mapper.v2.Job.Correction1[opcode.Corrections.Count];
                                        foreach (Correction correction in opcode.Corrections)
                                        {
                                            _WA.Mapper.v2.Job.Correction1 proxycorrection = new _WA.Mapper.v2.Job.Correction1();
                                            proxycorrection.CorrectionLaborOpCode = correction.CorrectionLaborOpCode;
                                            proxycorrection.Comment = correction.Comment;
                                            proxycorrection.SequenceNumber = correction.SequenceNumber;
                                            proxycorrections[correctionscnt] = proxycorrection;
                                            correctionscnt++;
                                        }
                                        proxyopcode.Corrections = proxycorrections;
                                    }
                                    #endregion

                                    proxyopcodes[opcodescnt] = proxyopcode;
                                    opcodescnt++;
                                }
                                proxyjobchange.OPCodes = proxyopcodes;
                            }
                            #endregion

                            #region//JobChange JobLogs
                            if (request.JobChange.JobLogs != null && request.JobChange.JobLogs.Count > 0)
                            {
                                int joblogsscnt = 0;
                                _WA.Mapper.v2.Job.JobLog1[] proxyjoblogs = new _WA.Mapper.v2.Job.JobLog1[request.JobChange.JobLogs.Count];
                                foreach (WA.Standard.IF.Data.v2.Common.Job.JobLog joblog in request.JobChange.JobLogs)
                                {
                                    #region//JobChange JobLogs Header
                                    _WA.Mapper.v2.Job.JobLog1 proxyjoblog = new _WA.Mapper.v2.Job.JobLog1();
                                    proxyjoblog.DMSJobStatus = joblog.DMSJobStatus;
                                    proxyjoblog.EstimatedLaborHour = joblog.EstimatedLaborHour;
                                    proxyjoblog.LogType = joblog.LogType;
                                    proxyjoblog.ScheduledDateTimeFromLocal = joblog.ScheduledDateTimeFromLocal;
                                    proxyjoblog.ScheduledDateTimeToLocal = joblog.ScheduledDateTimeToLocal;
                                    proxyjoblog.Stall = joblog.Stall;
                                    #endregion

                                    #region//JobChange JobLogs Technicians
                                    if (joblog.Technicians != null && joblog.Technicians.Count > 0)
                                    {
                                        int technicianscnt = 0;
                                        _WA.Mapper.v2.Job.Technician1[] proxytechnicians = new _WA.Mapper.v2.Job.Technician1[joblog.Technicians.Count];
                                        foreach (Technician technician in joblog.Technicians)
                                        {
                                            _WA.Mapper.v2.Job.Technician1 proxytechnician = new _WA.Mapper.v2.Job.Technician1();
                                            proxytechnician.TCEmployeeID = technician.TCEmployeeID;
                                            proxytechnician.TCEmployeeName = technician.TCEmployeeName;
                                            proxytechnicians[technicianscnt] = proxytechnician;
                                            technicianscnt++;
                                        }
                                        proxyjoblog.Technicians = proxytechnicians;
                                    }
                                    #endregion

                                    #region//JobChange JobLogs ActualTimeLogs
                                    if (joblog.ActualTimeLogs != null && joblog.ActualTimeLogs.Count > 0)
                                    {
                                        int actualtimelogscnt = 0;
                                        _WA.Mapper.v2.Job.ActualTimeLog1[] proxyactualtimelogs = new _WA.Mapper.v2.Job.ActualTimeLog1[joblog.ActualTimeLogs.Count];
                                        foreach (ActualTimeLog actualtimelog in joblog.ActualTimeLogs)
                                        {
                                            _WA.Mapper.v2.Job.ActualTimeLog1 proxyactualtimelog = new _WA.Mapper.v2.Job.ActualTimeLog1();
                                            proxyactualtimelog.EndDateTimeLocal = actualtimelog.EndDateTimeLocal;
                                            proxyactualtimelog.PauseReasonCode = actualtimelog.PauseReasonCode;
                                            proxyactualtimelog.PauseReasonComment = actualtimelog.PauseReasonComment;
                                            proxyactualtimelog.StartDateTimeLocal = actualtimelog.StartDateTimeLocal;
                                            proxyactualtimelog.Status = actualtimelog.Status;
                                            proxyactualtimelog.TCEmployeeID = actualtimelog.TCEmployeeID;
                                            proxyactualtimelog.TCEmployeeName = actualtimelog.TCEmployeeName;
                                            proxyactualtimelogs[actualtimelogscnt] = proxyactualtimelog;
                                            actualtimelogscnt++;
                                        }
                                        proxyjoblog.ActualTimeLogs = proxyactualtimelogs;
                                    }
                                    #endregion

                                    #region//JobChange JobLogs JobComments
                                    if (joblog.JobComments != null && joblog.JobComments.Count > 0)
                                    {
                                        int jobcommentscnt = 0;
                                        _WA.Mapper.v2.Job.JobComment1[] proxyjobcomments = new _WA.Mapper.v2.Job.JobComment1[joblog.JobComments.Count];
                                        foreach (JobComment jobcomment in joblog.JobComments)
                                        {
                                            _WA.Mapper.v2.Job.JobComment1 proxyjobcomment = new _WA.Mapper.v2.Job.JobComment1();
                                            proxyjobcomment.ActualWorkHour = jobcomment.ActualWorkHour;
                                            proxyjobcomment.SubStatus = jobcomment.SubStatus;
                                            proxyjobcomments[jobcommentscnt] = proxyjobcomment;
                                            jobcommentscnt++;
                                        }
                                        proxyjoblog.JobComments = proxyjobcomments;
                                    }
                                    #endregion

                                    proxyjoblogs[joblogsscnt] = proxyjoblog;
                                    joblogsscnt++;
                                }
                                proxyjobchange.JobLogs = proxyjoblogs;
                            }
                            #endregion
                        }
                        #endregion

                        //Run proxy web method with proxy request
                        _WA.Mapper.v2.Job.JobChangeResponse proxyresponse = proxyws.JobChange(proxyrequest);

                        //Mapping with Standard Interface Specification Object
                        if (proxyresponse != null)
                        {
                            if (proxyresponse.TransactionHeader != null)
                            {
                                #region//TransactionHeader Set
                                TransactionHeader transactionheader = new TransactionHeader();
                                transactionheader.CountryID = proxyresponse.TransactionHeader.CountryID;
                                transactionheader.DealerID = proxyresponse.TransactionHeader.DealerID;
                                transactionheader.DistributorID = proxyresponse.TransactionHeader.DistributorID;
                                transactionheader.DMSCode = proxyresponse.TransactionHeader.DMSCode;
                                transactionheader.DMSServerUrl = proxyresponse.TransactionHeader.DMSServerUrl;
                                transactionheader.DMSVersion = proxyresponse.TransactionHeader.DMSVersion;
                                transactionheader.DocumentVersion = proxyresponse.TransactionHeader.DocumentVersion;
                                transactionheader.GroupID = proxyresponse.TransactionHeader.GroupID;
                                transactionheader.IneterfaceID = proxyresponse.TransactionHeader.IneterfaceID;
                                transactionheader.Password = proxyresponse.TransactionHeader.Password;
                                transactionheader.PollingToken = proxyresponse.TransactionHeader.PollingToken;
                                transactionheader.RequestPollingToken = proxyresponse.TransactionHeader.RequestPollingToken;
                                transactionheader.RequestType = proxyresponse.TransactionHeader.RequestType;
                                transactionheader.TransactionId = proxyresponse.TransactionHeader.TransactionId;
                                transactionheader.TransactionDateTimeLocal = proxyresponse.TransactionHeader.TransactionDateTimeLocal;
                                transactionheader.TransactionDateTimeUTC = proxyresponse.TransactionHeader.TransactionDateTimeUTC;
                                transactionheader.TransactionType = proxyresponse.TransactionHeader.TransactionType;
                                transactionheader.Username = proxyresponse.TransactionHeader.Username;
                                transactionheader.VenderTrackingCode = proxyresponse.TransactionHeader.VenderTrackingCode;
                                response.TransactionHeader = transactionheader;
                                #endregion
                            }

                            //ResultMessage Set
                            if (proxyresponse.ResultMessage != null)
                            {
                                response.ResultMessage = GetResultMessageData(proxyresponse.ResultMessage.Code, proxyresponse.ResultMessage.Message);
                            }

                            if (proxyresponse.Errors != null)
                            {
                                //Error List Set
                                foreach (_WA.Mapper.v2.Job.Error1 proxyerror in proxyresponse.Errors)
                                {
                                    if (response.Errors != null)
                                        response.Errors.Add(GetErrorData(proxyerror.Code, proxyerror.Message));
                                    else
                                        response.Errors = GetErrorDataList(proxyerror.Code, proxyerror.Message);
                                }
                            }
                            else
                            {
                                #region//JobGetResponse Set

                                //if (proxyresponse.Job != null)
                                //{
                                //_WA.Mapper.v2.Job.Job2 proxyjob = proxyresponse.Job;

                                //#region//Job Header
                                //Job job = new Job();
                                //job.ActualHours = proxyjob.ActualHours;
                                //job.DMSJobNo = proxyjob.DMSJobNo;
                                //job.DMSJobNo = proxyjob.DMSJobNo;
                                //job.DMSRONo = proxyjob.DMSRONo;
                                //job.ServiceLineNumber = proxyjob.ServiceLineNumber;
                                //job.SkillLevel = proxyjob.SkillLevel;
                                //#endregion

                                //#region //Job ManagementFields
                                //if (proxyjob.ManagementFields != null)
                                //{
                                //    ManagementFields managementfields = new ManagementFields();
                                //    managementfields.CreateDateTimeUTC = proxyjob.ManagementFields.CreateDateTimeUTC;
                                //    managementfields.LastModifiedDateTimeUTC = proxyjob.ManagementFields.LastModifiedDateTimeUTC;
                                //    job.ManagementFields = managementfields;
                                //}
                                //#endregion

                                //#region//Job Comments
                                //if (proxyjob.Comments != null && proxyjob.Comments.Length > 0)
                                //{
                                //    job.Comments = new List<Comment>();
                                //    foreach (_WA.Mapper.v2.Job.Comment2 proxycomment in proxyjob.Comments)
                                //    {
                                //        Comment comment = new Comment();
                                //        comment.DescriptionComment = proxycomment.DescriptionComment;
                                //        comment.SequenceNumber = proxycomment.SequenceNumber;
                                //        job.Comments.Add(comment);
                                //    }
                                //}
                                //#endregion

                                //#region//Job Descriptions
                                //if (proxyjob.Descriptions != null && proxyjob.Descriptions.Length > 0)
                                //{
                                //    job.Descriptions = new List<Description>();
                                //    foreach (_WA.Mapper.v2.Job.Description2 proxydescription in proxyjob.Descriptions)
                                //    {
                                //        Description description = new Description();
                                //        description.DescriptionComment = proxydescription.DescriptionComment;
                                //        description.SequenceNumber = proxydescription.SequenceNumber;
                                //        job.Descriptions.Add(description);
                                //    }
                                //}
                                //#endregion

                                //#region//Job Causes
                                //if (proxyjob.Causes != null && proxyjob.Causes.Length > 0)
                                //{
                                //    job.Causes = new List<Cause>();
                                //    foreach (_WA.Mapper.v2.Job.Cause2 proxycause in proxyjob.Causes)
                                //    {
                                //        Cause cause = new Cause();
                                //        cause.CauseLaborOpCode = proxycause.CauseLaborOpCode;
                                //        cause.Comment = proxycause.Comment;
                                //        cause.SequenceNumber = proxycause.SequenceNumber;
                                //        job.Causes.Add(cause);
                                //    }
                                //}
                                //#endregion

                                //#region//Job Corrections
                                //if (proxyjob.Corrections != null && proxyjob.Corrections.Length > 0)
                                //{
                                //    job.Corrections = new List<Correction>();
                                //    foreach (_WA.Mapper.v2.Job.Correction2 proxycorrection in proxyjob.Corrections)
                                //    {
                                //        Correction cause = new Correction();
                                //        cause.CorrectionLaborOpCode = proxycorrection.CorrectionLaborOpCode;
                                //        cause.Comment = proxycorrection.Comment;
                                //        cause.SequenceNumber = proxycorrection.SequenceNumber;
                                //        job.Corrections.Add(cause);
                                //    }
                                //}
                                //#endregion

                                //#region//Job OPCodes
                                //if (proxyjob.OPCodes != null && proxyjob.OPCodes.Length > 0)
                                //{
                                //    job.OPCodes = new List<Data.v2.Common.Job.OPCode>();
                                //    foreach (_WA.Mapper.v2.Job.OPCode2 proxyopcode in proxyjob.OPCodes)
                                //    {
                                //        #region//Job OPCode Header
                                //        Data.v2.Common.Job.OPCode opcode = new Data.v2.Common.Job.OPCode();
                                //        opcode.ActualHours = proxyopcode.ActualHours;
                                //        opcode.Code = proxyopcode.Code;
                                //        opcode.Description = proxyopcode.Description;
                                //        opcode.EstimatedHours = proxyopcode.EstimatedHours;
                                //        opcode.SkillLevel = proxyopcode.SkillLevel;
                                //        #endregion

                                //        #region//Job OPCode Comments
                                //        if (proxyopcode.Comments != null && proxyopcode.Comments.Length > 0)
                                //        {
                                //            opcode.Comments = new List<Comment>();
                                //            foreach (_WA.Mapper.v2.Job.Comment2 proxycomment in proxyopcode.Comments)
                                //            {
                                //                Comment comment = new Comment();
                                //                comment.DescriptionComment = proxycomment.DescriptionComment;
                                //                comment.SequenceNumber = proxycomment.SequenceNumber;
                                //                opcode.Comments.Add(comment);
                                //            }
                                //        }
                                //        #endregion

                                //        #region//Job OPCode Descriptions
                                //        if (proxyopcode.Descriptions != null && proxyopcode.Descriptions.Length > 0)
                                //        {
                                //            opcode.Descriptions = new List<Description>();
                                //            foreach (_WA.Mapper.v2.Job.Description2 proxydescription in proxyopcode.Descriptions)
                                //            {
                                //                Description description = new Description();
                                //                description.DescriptionComment = proxydescription.DescriptionComment;
                                //                description.SequenceNumber = proxydescription.SequenceNumber;
                                //                opcode.Descriptions.Add(description);
                                //            }
                                //        }
                                //        #endregion

                                //        #region//Job OPCode Causes
                                //        if (proxyopcode.Causes != null && proxyopcode.Causes.Length > 0)
                                //        {
                                //            opcode.Causes = new List<Cause>();
                                //            foreach (_WA.Mapper.v2.Job.Cause2 proxycause in proxyopcode.Causes)
                                //            {
                                //                Cause cause = new Cause();
                                //                cause.CauseLaborOpCode = proxycause.CauseLaborOpCode;
                                //                cause.Comment = proxycause.Comment;
                                //                cause.SequenceNumber = proxycause.SequenceNumber;
                                //                opcode.Causes.Add(cause);
                                //            }
                                //        }
                                //        #endregion

                                //        #region//Job OPCode Corrections
                                //        if (proxyopcode.Corrections != null && proxyopcode.Corrections.Length > 0)
                                //        {
                                //            opcode.Corrections = new List<Correction>();
                                //            foreach (_WA.Mapper.v2.Job.Correction2 proxycorrection in proxyopcode.Corrections)
                                //            {
                                //                Correction correction = new Correction();
                                //                correction.CorrectionLaborOpCode = proxycorrection.CorrectionLaborOpCode;
                                //                correction.Comment = proxycorrection.Comment;
                                //                correction.SequenceNumber = proxycorrection.SequenceNumber;
                                //                opcode.Corrections.Add(correction);
                                //            }
                                //        }
                                //        #endregion

                                //        job.OPCodes.Add(opcode);
                                //    }
                                //}
                                //#endregion

                                //#region//Job JobLogs
                                //if (proxyjob.JobLogs != null && proxyjob.JobLogs.Length > 0)
                                //{
                                //    job.JobLogs = new List<JobLog>();
                                //    foreach (_WA.Mapper.v2.Job.JobLog2 proxyjoblog in proxyjob.JobLogs)
                                //    {
                                //        #region//Job JobLogs Header
                                //        JobLog joblog = new JobLog();
                                //        joblog.DMSJobStatus = proxyjoblog.DMSJobStatus;
                                //        joblog.EstimatedLaborHour = proxyjoblog.EstimatedLaborHour;
                                //        joblog.LogType = proxyjoblog.LogType;
                                //        joblog.ScheduledDateTimeFromLocal = proxyjoblog.ScheduledDateTimeFromLocal;
                                //        joblog.ScheduledDateTimeToLocal = proxyjoblog.ScheduledDateTimeToLocal;
                                //        joblog.Stall = proxyjoblog.Stall;
                                //        #endregion

                                //        #region//Job Technicians
                                //        if (proxyjoblog.Technicians != null && proxyjoblog.Technicians.Length > 0)
                                //        {
                                //            joblog.Technicians = new List<Technician>();
                                //            foreach (_WA.Mapper.v2.Job.Technician2 proxytechnician in proxyjoblog.Technicians)
                                //            {
                                //                Technician technician = new Technician();
                                //                technician.TCEmployeeID = proxytechnician.TCEmployeeID;
                                //                technician.TCEmployeeName = proxytechnician.TCEmployeeName;
                                //                joblog.Technicians.Add(technician);
                                //            }
                                //        }
                                //        #endregion

                                //        #region//Job ActualTimeLogs
                                //        if (proxyjoblog.ActualTimeLogs != null && proxyjoblog.ActualTimeLogs.Length > 0)
                                //        {
                                //            joblog.ActualTimeLogs = new List<ActualTimeLog>();
                                //            foreach (_WA.Mapper.v2.Job.ActualTimeLog2 proxyactualtimelog in proxyjoblog.ActualTimeLogs)
                                //            {
                                //                ActualTimeLog actualtimelog = new ActualTimeLog();
                                //                actualtimelog.EndDateTimeLocal = proxyactualtimelog.EndDateTimeLocal;
                                //                actualtimelog.PauseReasonCode = proxyactualtimelog.PauseReasonCode;
                                //                actualtimelog.PauseReasonComment = proxyactualtimelog.PauseReasonComment;
                                //                actualtimelog.StartDateTimeLocal = proxyactualtimelog.StartDateTimeLocal;
                                //                actualtimelog.Status = proxyactualtimelog.Status;
                                //                actualtimelog.TCEmployeeID = proxyactualtimelog.TCEmployeeID;
                                //                actualtimelog.TCEmployeeName = proxyactualtimelog.TCEmployeeName;
                                //                joblog.ActualTimeLogs.Add(actualtimelog);
                                //            }
                                //        }
                                //        #endregion

                                //        #region//Job JobComments
                                //        if (proxyjoblog.JobComments != null && proxyjoblog.JobComments.Length > 0)
                                //        {
                                //            joblog.JobComments = new List<JobComment>();
                                //            foreach (_WA.Mapper.v2.Job.JobComment2 proxyjobcomment in proxyjoblog.JobComments)
                                //            {
                                //                JobComment jobcomment = new JobComment();
                                //                jobcomment.ActualWorkHour = proxyjobcomment.ActualWorkHour;
                                //                jobcomment.SubStatus = proxyjobcomment.SubStatus;
                                //                joblog.JobComments.Add(jobcomment);
                                //            }
                                //        }
                                //        #endregion

                                //        job.JobLogs.Add(joblog);
                                //    }
                                //}
                                //#endregion

                                //response.Job = job;
                                //}
                                #endregion
                            }
                        }
                        else
                        {
                            if (response.Errors != null)
                                response.Errors.Add(GetErrorData(ResponseCode.Fail, ResponseMessage.Fail));
                            else
                                response.Errors = GetErrorDataList(ResponseCode.Fail, ResponseMessage.Fail);
                        }
                        #endregion
                    }
                    break;
                case "v2.HMCIS.1C.v4":
                    {
                        #region v2.HMCIS.1C.v4 - RTR (Proxy Class Dll Name : _1C.v4)

                        #region JobChange Request Set

                        //Create proxy credential
                        NetworkCredential proxycredential = new NetworkCredential(request.TransactionHeader.Username, request.TransactionHeader.Password);

                        //Create proxy web service from dms web service with credential
                        _1C.v4.Job.Job proxyws = new _1C.v4.Job.Job(request.TransactionHeader.DMSServerUrl);
                        proxyws.Credentials = proxycredential;

                        //Create proxy request with jobchange and transaction
                        _1C.v4.Job.JobChangeRequest proxyrequest = new _1C.v4.Job.JobChangeRequest();

                        //Create proxy transaction
                        _1C.v4.Job.TransactionHeader2 proxytransactionheader = new _1C.v4.Job.TransactionHeader2();
                        if (request.TransactionHeader != null)
                        {
                            #region//TransactionHeader Set
                            proxytransactionheader.CountryID = request.TransactionHeader.CountryID;
                            proxytransactionheader.DealerID = request.TransactionHeader.DealerID;
                            proxytransactionheader.DistributorID = request.TransactionHeader.DistributorID;
                            proxytransactionheader.DMSCode = request.TransactionHeader.DMSCode;
                            proxytransactionheader.DMSServerUrl = request.TransactionHeader.DMSServerUrl;
                            proxytransactionheader.DMSVersion = request.TransactionHeader.DMSVersion;
                            proxytransactionheader.DocumentVersion = request.TransactionHeader.DocumentVersion;
                            proxytransactionheader.GroupID = request.TransactionHeader.GroupID;
                            proxytransactionheader.IneterfaceID = request.TransactionHeader.IneterfaceID;
                            proxytransactionheader.Password = request.TransactionHeader.Password;
                            proxytransactionheader.PollingToken = request.TransactionHeader.PollingToken;
                            proxytransactionheader.RequestPollingToken = request.TransactionHeader.RequestPollingToken;
                            proxytransactionheader.RequestType = request.TransactionHeader.RequestType;
                            proxytransactionheader.TransactionId = request.TransactionHeader.TransactionId;
                            proxytransactionheader.TransactionDateTimeLocal = request.TransactionHeader.TransactionDateTimeLocal;
                            proxytransactionheader.TransactionDateTimeUTC = request.TransactionHeader.TransactionDateTimeUTC;
                            proxytransactionheader.TransactionType = request.TransactionHeader.TransactionType;
                            proxytransactionheader.Username = request.TransactionHeader.Username;
                            proxytransactionheader.VenderTrackingCode = request.TransactionHeader.VenderTrackingCode;
                            proxyrequest.TransactionHeader = proxytransactionheader;
                            #endregion
                        }

                        //Create proxy jobchange
                        _1C.v4.Job.JobChange proxyjobchange = new _1C.v4.Job.JobChange();
                        if (request.JobChange != null)
                        {
                            #region//JobChange Header
                            proxyjobchange.ActualHours = request.JobChange.ActualHours;
                            proxyjobchange.DMSJobNo = request.JobChange.DMSJobNo;
                            proxyjobchange.DMSJobNo = request.JobChange.DMSJobNo;
                            proxyjobchange.DMSRONo = request.JobChange.DMSRONo;
                            proxyjobchange.EstimatedHours = request.JobChange.EstimatedHours;
                            proxyjobchange.ServiceLineNumber = request.JobChange.ServiceLineNumber;
                            proxyjobchange.SkillLevel = request.JobChange.SkillLevel;
                            #endregion

                            #region//JobChange Comments
                            if (request.JobChange.Comments != null && request.JobChange.Comments.Count > 0)
                            {
                                int commentscnt = 0;
                                _1C.v4.Job.Comment1[] proxycomments = new _1C.v4.Job.Comment1[request.JobChange.Comments.Count];
                                foreach (Comment Comment in request.JobChange.Comments)
                                {
                                    _1C.v4.Job.Comment1 proxycomment = new _1C.v4.Job.Comment1();
                                    proxycomment.DescriptionComment = Comment.DescriptionComment;
                                    proxycomment.SequenceNumber = Comment.SequenceNumber;
                                    proxycomments[commentscnt] = proxycomment;
                                    commentscnt++;
                                }
                                proxyjobchange.Comments = proxycomments;
                            }
                            #endregion

                            #region//JobChange Descriptions
                            if (request.JobChange.Descriptions != null && request.JobChange.Descriptions.Count > 0)
                            {
                                int descriptionscnt = 0;
                                _1C.v4.Job.Description1[] proxydescriptions = new _1C.v4.Job.Description1[request.JobChange.Descriptions.Count];
                                foreach (Description description in request.JobChange.Descriptions)
                                {
                                    _1C.v4.Job.Description1 proxydescription = new _1C.v4.Job.Description1();
                                    proxydescription.DescriptionComment = description.DescriptionComment;
                                    proxydescription.SequenceNumber = description.SequenceNumber;
                                    proxydescriptions[descriptionscnt] = proxydescription;
                                    descriptionscnt++;
                                }
                                proxyjobchange.Descriptions = proxydescriptions;
                            }
                            #endregion

                            #region//JobChange Causes
                            if (request.JobChange.Causes != null && request.JobChange.Causes.Count > 0)
                            {
                                int causescnt = 0;
                                _1C.v4.Job.Cause1[] proxycauses = new _1C.v4.Job.Cause1[request.JobChange.Causes.Count];
                                foreach (Cause cause in request.JobChange.Causes)
                                {
                                    _1C.v4.Job.Cause1 proxycause = new _1C.v4.Job.Cause1();
                                    proxycause.CauseLaborOpCode = cause.CauseLaborOpCode;
                                    proxycause.Comment = cause.Comment;
                                    proxycause.SequenceNumber = cause.SequenceNumber;
                                    proxycauses[causescnt] = proxycause;
                                    causescnt++;
                                }
                                proxyjobchange.Causes = proxycauses;
                            }
                            #endregion

                            #region//JobChange Corrections
                            if (request.JobChange.Corrections != null && request.JobChange.Corrections.Count > 0)
                            {
                                int correctionscnt = 0;
                                _1C.v4.Job.Correction1[] proxycorrections = new _1C.v4.Job.Correction1[request.JobChange.Corrections.Count];
                                foreach (Correction correction in request.JobChange.Corrections)
                                {
                                    _1C.v4.Job.Correction1 proxycorrection = new _1C.v4.Job.Correction1();
                                    proxycorrection.CorrectionLaborOpCode = correction.CorrectionLaborOpCode;
                                    proxycorrection.Comment = correction.Comment;
                                    proxycorrection.SequenceNumber = correction.SequenceNumber;
                                    proxycorrections[correctionscnt] = proxycorrection;
                                    correctionscnt++;
                                }
                                proxyjobchange.Corrections = proxycorrections;
                            }
                            #endregion

                            #region//JobChange OPCodes
                            if (request.JobChange.OPCodes != null && request.JobChange.OPCodes.Count > 0)
                            {
                                int opcodescnt = 0;
                                _1C.v4.Job.OPCode1[] proxyopcodes = new _1C.v4.Job.OPCode1[request.JobChange.OPCodes.Count];
                                foreach (WA.Standard.IF.Data.v2.Common.Job.OPCode opcode in request.JobChange.OPCodes)
                                {
                                    #region//JobChange OPCode Header
                                    _1C.v4.Job.OPCode1 proxyopcode = new _1C.v4.Job.OPCode1();
                                    proxyopcode.ActualHours = opcode.ActualHours;
                                    proxyopcode.Code = opcode.Code;
                                    proxyopcode.Description = opcode.Description;
                                    proxyopcode.EstimatedHours = opcode.EstimatedHours;
                                    proxyopcode.SkillLevel = opcode.SkillLevel;
                                    #endregion

                                    #region//JobChange OPCode Comments
                                    if (opcode.Comments != null && opcode.Comments.Count > 0)
                                    {
                                        int commentscnt = 0;
                                        _1C.v4.Job.Comment1[] proxycomments = new _1C.v4.Job.Comment1[opcode.Comments.Count];
                                        foreach (Comment comment in opcode.Comments)
                                        {
                                            _1C.v4.Job.Comment1 proxycomment = new _1C.v4.Job.Comment1();
                                            proxycomment.DescriptionComment = comment.DescriptionComment;
                                            proxycomment.SequenceNumber = comment.SequenceNumber;
                                            proxycomments[commentscnt] = proxycomment;
                                            commentscnt++;
                                        }
                                        proxyopcode.Comments = proxycomments;
                                    }
                                    #endregion

                                    #region//JobChange OPCode Descriptions
                                    if (opcode.Descriptions != null && opcode.Descriptions.Count > 0)
                                    {
                                        int descriptionscnt = 0;
                                        _1C.v4.Job.Description1[] proxydescriptions = new _1C.v4.Job.Description1[opcode.Descriptions.Count];
                                        foreach (Description description in opcode.Descriptions)
                                        {
                                            _1C.v4.Job.Description1 proxydescription = new _1C.v4.Job.Description1();
                                            proxydescription.DescriptionComment = description.DescriptionComment;
                                            proxydescription.SequenceNumber = description.SequenceNumber;
                                            proxydescriptions[descriptionscnt] = proxydescription;
                                            descriptionscnt++;
                                        }
                                        proxyopcode.Descriptions = proxydescriptions;
                                    }
                                    #endregion

                                    #region//JobChange OPCode Causes
                                    if (opcode.Causes != null && opcode.Causes.Count > 0)
                                    {
                                        int causescnt = 0;
                                        _1C.v4.Job.Cause1[] proxycauses = new _1C.v4.Job.Cause1[opcode.Causes.Count];
                                        foreach (Cause cause in opcode.Causes)
                                        {
                                            _1C.v4.Job.Cause1 proxycause = new _1C.v4.Job.Cause1();
                                            proxycause.CauseLaborOpCode = cause.CauseLaborOpCode;
                                            proxycause.Comment = cause.Comment;
                                            proxycause.SequenceNumber = cause.SequenceNumber;
                                            proxycauses[causescnt] = proxycause;
                                            causescnt++;
                                        }
                                        proxyopcode.Causes = proxycauses;
                                    }
                                    #endregion

                                    #region//JobChange OPCode Corrections
                                    if (opcode.Corrections != null && opcode.Corrections.Count > 0)
                                    {
                                        int correctionscnt = 0;
                                        _1C.v4.Job.Correction1[] proxycorrections = new _1C.v4.Job.Correction1[opcode.Corrections.Count];
                                        foreach (Correction correction in opcode.Corrections)
                                        {
                                            _1C.v4.Job.Correction1 proxycorrection = new _1C.v4.Job.Correction1();
                                            proxycorrection.CorrectionLaborOpCode = correction.CorrectionLaborOpCode;
                                            proxycorrection.Comment = correction.Comment;
                                            proxycorrection.SequenceNumber = correction.SequenceNumber;
                                            proxycorrections[correctionscnt] = proxycorrection;
                                            correctionscnt++;
                                        }
                                        proxyopcode.Corrections = proxycorrections;
                                    }
                                    #endregion

                                    proxyopcodes[opcodescnt] = proxyopcode;
                                    opcodescnt++;
                                }
                                proxyjobchange.OPCodes = proxyopcodes;
                            }
                            #endregion

                            #region//JobChange JobLogs
                            if (request.JobChange.JobLogs != null && request.JobChange.JobLogs.Count > 0)
                            {
                                int joblogsscnt = 0;
                                _1C.v4.Job.JobLog1[] proxyjoblogs = new _1C.v4.Job.JobLog1[request.JobChange.JobLogs.Count];
                                foreach (WA.Standard.IF.Data.v2.Common.Job.JobLog joblog in request.JobChange.JobLogs)
                                {
                                    #region//JobChange JobLogs Header
                                    _1C.v4.Job.JobLog1 proxyjoblog = new _1C.v4.Job.JobLog1();
                                    proxyjoblog.DMSJobStatus = joblog.DMSJobStatus;
                                    proxyjoblog.EstimatedLaborHour = joblog.EstimatedLaborHour;
                                    proxyjoblog.LogType = joblog.LogType;
                                    proxyjoblog.ScheduledDateTimeFromLocal = joblog.ScheduledDateTimeFromLocal;
                                    proxyjoblog.ScheduledDateTimeToLocal = joblog.ScheduledDateTimeToLocal;
                                    proxyjoblog.Stall = joblog.Stall;
                                    #endregion

                                    #region//JobChange JobLogs Technicians
                                    if (joblog.Technicians != null && joblog.Technicians.Count > 0)
                                    {
                                        int technicianscnt = 0;
                                        _1C.v4.Job.Technician1[] proxytechnicians = new _1C.v4.Job.Technician1[joblog.Technicians.Count];
                                        foreach (Technician technician in joblog.Technicians)
                                        {
                                            _1C.v4.Job.Technician1 proxytechnician = new _1C.v4.Job.Technician1();
                                            proxytechnician.TCEmployeeID = technician.TCEmployeeID;
                                            proxytechnician.TCEmployeeName = technician.TCEmployeeName;
                                            proxytechnicians[technicianscnt] = proxytechnician;
                                            technicianscnt++;
                                        }
                                        proxyjoblog.Technicians = proxytechnicians;
                                    }
                                    #endregion

                                    #region//JobChange JobLogs ActualTimeLogs
                                    if (joblog.ActualTimeLogs != null && joblog.ActualTimeLogs.Count > 0)
                                    {
                                        int actualtimelogscnt = 0;
                                        _1C.v4.Job.ActualTimeLog1[] proxyactualtimelogs = new _1C.v4.Job.ActualTimeLog1[joblog.ActualTimeLogs.Count];
                                        foreach (ActualTimeLog actualtimelog in joblog.ActualTimeLogs)
                                        {
                                            _1C.v4.Job.ActualTimeLog1 proxyactualtimelog = new _1C.v4.Job.ActualTimeLog1();
                                            proxyactualtimelog.EndDateTimeLocal = actualtimelog.EndDateTimeLocal;
                                            proxyactualtimelog.PauseReasonCode = actualtimelog.PauseReasonCode;
                                            proxyactualtimelog.PauseReasonComment = actualtimelog.PauseReasonComment;
                                            proxyactualtimelog.StartDateTimeLocal = actualtimelog.StartDateTimeLocal;
                                            proxyactualtimelog.Status = actualtimelog.Status;
                                            proxyactualtimelog.TCEmployeeID = actualtimelog.TCEmployeeID;
                                            proxyactualtimelog.TCEmployeeName = actualtimelog.TCEmployeeName;
                                            proxyactualtimelogs[actualtimelogscnt] = proxyactualtimelog;
                                            actualtimelogscnt++;
                                        }
                                        proxyjoblog.ActualTimeLogs = proxyactualtimelogs;
                                    }
                                    #endregion

                                    #region//JobChange JobLogs JobComments
                                    if (joblog.JobComments != null && joblog.JobComments.Count > 0)
                                    {
                                        int jobcommentscnt = 0;
                                        _1C.v4.Job.JobComment1[] proxyjobcomments = new _1C.v4.Job.JobComment1[joblog.JobComments.Count];
                                        foreach (JobComment jobcomment in joblog.JobComments)
                                        {
                                            _1C.v4.Job.JobComment1 proxyjobcomment = new _1C.v4.Job.JobComment1();
                                            proxyjobcomment.ActualWorkHour = jobcomment.ActualWorkHour;
                                            proxyjobcomment.SubStatus = jobcomment.SubStatus;
                                            proxyjobcomments[jobcommentscnt] = proxyjobcomment;
                                            jobcommentscnt++;
                                        }
                                        proxyjoblog.JobComments = proxyjobcomments;
                                    }
                                    #endregion

                                    proxyjoblogs[joblogsscnt] = proxyjoblog;
                                    joblogsscnt++;
                                }
                                proxyjobchange.JobLogs = proxyjoblogs;
                            }
                            #endregion
                        }
                        #endregion

                        //Run proxy web method with proxy request
                        _1C.v4.Job.JobChangeResponse proxyresponse = proxyws.JobChange(proxyrequest);

                        //Mapping with Standard Interface Specification Object
                        if (proxyresponse != null)
                        {
                            if (proxyresponse.TransactionHeader != null)
                            {
                                #region//TransactionHeader Set
                                TransactionHeader transactionheader = new TransactionHeader();
                                transactionheader.CountryID = proxyresponse.TransactionHeader.CountryID;
                                transactionheader.DealerID = proxyresponse.TransactionHeader.DealerID;
                                transactionheader.DistributorID = proxyresponse.TransactionHeader.DistributorID;
                                transactionheader.DMSCode = proxyresponse.TransactionHeader.DMSCode;
                                transactionheader.DMSServerUrl = proxyresponse.TransactionHeader.DMSServerUrl;
                                transactionheader.DMSVersion = proxyresponse.TransactionHeader.DMSVersion;
                                transactionheader.DocumentVersion = proxyresponse.TransactionHeader.DocumentVersion;
                                transactionheader.GroupID = proxyresponse.TransactionHeader.GroupID;
                                transactionheader.IneterfaceID = proxyresponse.TransactionHeader.IneterfaceID;
                                transactionheader.Password = proxyresponse.TransactionHeader.Password;
                                transactionheader.PollingToken = proxyresponse.TransactionHeader.PollingToken;
                                transactionheader.RequestPollingToken = proxyresponse.TransactionHeader.RequestPollingToken;
                                transactionheader.RequestType = proxyresponse.TransactionHeader.RequestType;
                                transactionheader.TransactionId = proxyresponse.TransactionHeader.TransactionId;
                                transactionheader.TransactionDateTimeLocal = proxyresponse.TransactionHeader.TransactionDateTimeLocal;
                                transactionheader.TransactionDateTimeUTC = proxyresponse.TransactionHeader.TransactionDateTimeUTC;
                                transactionheader.TransactionType = proxyresponse.TransactionHeader.TransactionType;
                                transactionheader.Username = proxyresponse.TransactionHeader.Username;
                                transactionheader.VenderTrackingCode = proxyresponse.TransactionHeader.VenderTrackingCode;
                                response.TransactionHeader = transactionheader;
                                #endregion
                            }

                            //ResultMessage Set
                            if (proxyresponse.ResultMessage != null)
                            {
                                response.ResultMessage = GetResultMessageData(proxyresponse.ResultMessage.Code, proxyresponse.ResultMessage.Message);
                            }

                            if (proxyresponse.Errors != null)
                            {
                                //Error List Set
                                foreach (_1C.v4.Job.Error1 proxyerror in proxyresponse.Errors)
                                {
                                    if (response.Errors != null)
                                        response.Errors.Add(GetErrorData(proxyerror.Code, proxyerror.Message));
                                    else
                                        response.Errors = GetErrorDataList(proxyerror.Code, proxyerror.Message);
                                }
                            }
                            else
                            {
                                #region//JobGetResponse Set

                                //if (proxyresponse.Job != null)
                                //{
                                //_1C.v4.Job.Job2 proxyjob = proxyresponse.Job;

                                //#region//Job Header
                                //Job job = new Job();
                                //job.ActualHours = proxyjob.ActualHours;
                                //job.DMSJobNo = proxyjob.DMSJobNo;
                                //job.DMSJobNo = proxyjob.DMSJobNo;
                                //job.DMSRONo = proxyjob.DMSRONo;
                                //job.ServiceLineNumber = proxyjob.ServiceLineNumber;
                                //job.SkillLevel = proxyjob.SkillLevel;
                                //#endregion

                                //#region //Job ManagementFields
                                //if (proxyjob.ManagementFields != null)
                                //{
                                //    ManagementFields managementfields = new ManagementFields();
                                //    managementfields.CreateDateTimeUTC = proxyjob.ManagementFields.CreateDateTimeUTC;
                                //    managementfields.LastModifiedDateTimeUTC = proxyjob.ManagementFields.LastModifiedDateTimeUTC;
                                //    job.ManagementFields = managementfields;
                                //}
                                //#endregion

                                //#region//Job Comments
                                //if (proxyjob.Comments != null && proxyjob.Comments.Length > 0)
                                //{
                                //    job.Comments = new List<Comment>();
                                //    foreach (_1C.v4.Job.Comment2 proxycomment in proxyjob.Comments)
                                //    {
                                //        Comment comment = new Comment();
                                //        comment.DescriptionComment = proxycomment.DescriptionComment;
                                //        comment.SequenceNumber = proxycomment.SequenceNumber;
                                //        job.Comments.Add(comment);
                                //    }
                                //}
                                //#endregion

                                //#region//Job Descriptions
                                //if (proxyjob.Descriptions != null && proxyjob.Descriptions.Length > 0)
                                //{
                                //    job.Descriptions = new List<Description>();
                                //    foreach (_1C.v4.Job.Description2 proxydescription in proxyjob.Descriptions)
                                //    {
                                //        Description description = new Description();
                                //        description.DescriptionComment = proxydescription.DescriptionComment;
                                //        description.SequenceNumber = proxydescription.SequenceNumber;
                                //        job.Descriptions.Add(description);
                                //    }
                                //}
                                //#endregion

                                //#region//Job Causes
                                //if (proxyjob.Causes != null && proxyjob.Causes.Length > 0)
                                //{
                                //    job.Causes = new List<Cause>();
                                //    foreach (_1C.v4.Job.Cause2 proxycause in proxyjob.Causes)
                                //    {
                                //        Cause cause = new Cause();
                                //        cause.CauseLaborOpCode = proxycause.CauseLaborOpCode;
                                //        cause.Comment = proxycause.Comment;
                                //        cause.SequenceNumber = proxycause.SequenceNumber;
                                //        job.Causes.Add(cause);
                                //    }
                                //}
                                //#endregion

                                //#region//Job Corrections
                                //if (proxyjob.Corrections != null && proxyjob.Corrections.Length > 0)
                                //{
                                //    job.Corrections = new List<Correction>();
                                //    foreach (_1C.v4.Job.Correction2 proxycorrection in proxyjob.Corrections)
                                //    {
                                //        Correction cause = new Correction();
                                //        cause.CorrectionLaborOpCode = proxycorrection.CorrectionLaborOpCode;
                                //        cause.Comment = proxycorrection.Comment;
                                //        cause.SequenceNumber = proxycorrection.SequenceNumber;
                                //        job.Corrections.Add(cause);
                                //    }
                                //}
                                //#endregion

                                //#region//Job OPCodes
                                //if (proxyjob.OPCodes != null && proxyjob.OPCodes.Length > 0)
                                //{
                                //    job.OPCodes = new List<Data.v2.Common.Job.OPCode>();
                                //    foreach (_1C.v4.Job.OPCode2 proxyopcode in proxyjob.OPCodes)
                                //    {
                                //        #region//Job OPCode Header
                                //        Data.v2.Common.Job.OPCode opcode = new Data.v2.Common.Job.OPCode();
                                //        opcode.ActualHours = proxyopcode.ActualHours;
                                //        opcode.Code = proxyopcode.Code;
                                //        opcode.Description = proxyopcode.Description;
                                //        opcode.EstimatedHours = proxyopcode.EstimatedHours;
                                //        opcode.SkillLevel = proxyopcode.SkillLevel;
                                //        #endregion

                                //        #region//Job OPCode Comments
                                //        if (proxyopcode.Comments != null && proxyopcode.Comments.Length > 0)
                                //        {
                                //            opcode.Comments = new List<Comment>();
                                //            foreach (_1C.v4.Job.Comment2 proxycomment in proxyopcode.Comments)
                                //            {
                                //                Comment comment = new Comment();
                                //                comment.DescriptionComment = proxycomment.DescriptionComment;
                                //                comment.SequenceNumber = proxycomment.SequenceNumber;
                                //                opcode.Comments.Add(comment);
                                //            }
                                //        }
                                //        #endregion

                                //        #region//Job OPCode Descriptions
                                //        if (proxyopcode.Descriptions != null && proxyopcode.Descriptions.Length > 0)
                                //        {
                                //            opcode.Descriptions = new List<Description>();
                                //            foreach (_1C.v4.Job.Description2 proxydescription in proxyopcode.Descriptions)
                                //            {
                                //                Description description = new Description();
                                //                description.DescriptionComment = proxydescription.DescriptionComment;
                                //                description.SequenceNumber = proxydescription.SequenceNumber;
                                //                opcode.Descriptions.Add(description);
                                //            }
                                //        }
                                //        #endregion

                                //        #region//Job OPCode Causes
                                //        if (proxyopcode.Causes != null && proxyopcode.Causes.Length > 0)
                                //        {
                                //            opcode.Causes = new List<Cause>();
                                //            foreach (_1C.v4.Job.Cause2 proxycause in proxyopcode.Causes)
                                //            {
                                //                Cause cause = new Cause();
                                //                cause.CauseLaborOpCode = proxycause.CauseLaborOpCode;
                                //                cause.Comment = proxycause.Comment;
                                //                cause.SequenceNumber = proxycause.SequenceNumber;
                                //                opcode.Causes.Add(cause);
                                //            }
                                //        }
                                //        #endregion

                                //        #region//Job OPCode Corrections
                                //        if (proxyopcode.Corrections != null && proxyopcode.Corrections.Length > 0)
                                //        {
                                //            opcode.Corrections = new List<Correction>();
                                //            foreach (_1C.v4.Job.Correction2 proxycorrection in proxyopcode.Corrections)
                                //            {
                                //                Correction correction = new Correction();
                                //                correction.CorrectionLaborOpCode = proxycorrection.CorrectionLaborOpCode;
                                //                correction.Comment = proxycorrection.Comment;
                                //                correction.SequenceNumber = proxycorrection.SequenceNumber;
                                //                opcode.Corrections.Add(correction);
                                //            }
                                //        }
                                //        #endregion

                                //        job.OPCodes.Add(opcode);
                                //    }
                                //}
                                //#endregion

                                //#region//Job JobLogs
                                //if (proxyjob.JobLogs != null && proxyjob.JobLogs.Length > 0)
                                //{
                                //    job.JobLogs = new List<JobLog>();
                                //    foreach (_1C.v4.Job.JobLog2 proxyjoblog in proxyjob.JobLogs)
                                //    {
                                //        #region//Job JobLogs Header
                                //        JobLog joblog = new JobLog();
                                //        joblog.DMSJobStatus = proxyjoblog.DMSJobStatus;
                                //        joblog.EstimatedLaborHour = proxyjoblog.EstimatedLaborHour;
                                //        joblog.LogType = proxyjoblog.LogType;
                                //        joblog.ScheduledDateTimeFromLocal = proxyjoblog.ScheduledDateTimeFromLocal;
                                //        joblog.ScheduledDateTimeToLocal = proxyjoblog.ScheduledDateTimeToLocal;
                                //        joblog.Stall = proxyjoblog.Stall;
                                //        #endregion

                                //        #region//Job Technicians
                                //        if (proxyjoblog.Technicians != null && proxyjoblog.Technicians.Length > 0)
                                //        {
                                //            joblog.Technicians = new List<Technician>();
                                //            foreach (_1C.v4.Job.Technician2 proxytechnician in proxyjoblog.Technicians)
                                //            {
                                //                Technician technician = new Technician();
                                //                technician.TCEmployeeID = proxytechnician.TCEmployeeID;
                                //                technician.TCEmployeeName = proxytechnician.TCEmployeeName;
                                //                joblog.Technicians.Add(technician);
                                //            }
                                //        }
                                //        #endregion

                                //        #region//Job ActualTimeLogs
                                //        if (proxyjoblog.ActualTimeLogs != null && proxyjoblog.ActualTimeLogs.Length > 0)
                                //        {
                                //            joblog.ActualTimeLogs = new List<ActualTimeLog>();
                                //            foreach (_1C.v4.Job.ActualTimeLog2 proxyactualtimelog in proxyjoblog.ActualTimeLogs)
                                //            {
                                //                ActualTimeLog actualtimelog = new ActualTimeLog();
                                //                actualtimelog.EndDateTimeLocal = proxyactualtimelog.EndDateTimeLocal;
                                //                actualtimelog.PauseReasonCode = proxyactualtimelog.PauseReasonCode;
                                //                actualtimelog.PauseReasonComment = proxyactualtimelog.PauseReasonComment;
                                //                actualtimelog.StartDateTimeLocal = proxyactualtimelog.StartDateTimeLocal;
                                //                actualtimelog.Status = proxyactualtimelog.Status;
                                //                actualtimelog.TCEmployeeID = proxyactualtimelog.TCEmployeeID;
                                //                actualtimelog.TCEmployeeName = proxyactualtimelog.TCEmployeeName;
                                //                joblog.ActualTimeLogs.Add(actualtimelog);
                                //            }
                                //        }
                                //        #endregion

                                //        #region//Job JobComments
                                //        if (proxyjoblog.JobComments != null && proxyjoblog.JobComments.Length > 0)
                                //        {
                                //            joblog.JobComments = new List<JobComment>();
                                //            foreach (_1C.v4.Job.JobComment2 proxyjobcomment in proxyjoblog.JobComments)
                                //            {
                                //                JobComment jobcomment = new JobComment();
                                //                jobcomment.ActualWorkHour = proxyjobcomment.ActualWorkHour;
                                //                jobcomment.SubStatus = proxyjobcomment.SubStatus;
                                //                joblog.JobComments.Add(jobcomment);
                                //            }
                                //        }
                                //        #endregion

                                //        job.JobLogs.Add(joblog);
                                //    }
                                //}
                                //#endregion

                                //response.Job = job;
                                //}
                                #endregion
                            }
                        }
                        else
                        {
                            if (response.Errors != null)
                                response.Errors.Add(GetErrorData(ResponseCode.Fail, ResponseMessage.Fail));
                            else
                                response.Errors = GetErrorDataList(ResponseCode.Fail, ResponseMessage.Fail);
                        }
                        #endregion
                    }
                    break;
                default: response.Errors = new List<Error>() { new Error() { Code = ResponseCode.NoMatchedProxy, Message = ResponseMessage.NoMatchedProxy } };
                    break;
            }

            return response;
        }
示例#7
0
        public JobGetResponse JobGet(JobGetRequest request)
        {
            JobGetResponse response = new JobGetResponse();

            //DMS information set by dealer information
            string proxypath = string.Format("{0}.{1}.{2}.{3}",
                request.TransactionHeader.DocumentVersion,
                request.TransactionHeader.DistributorID,
                request.TransactionHeader.DMSCode,
                request.TransactionHeader.DMSVersion);

            switch (proxypath)
            {
                case "v2.Common.WA.v2":
                    {
                        #region v2.Common.WA.v2 - Standard (Proxy Class Dll Name : _WA.Mapper.v2)

                        #region JobGet Request Set

                        //Create proxy credential
                        NetworkCredential proxycredential = new NetworkCredential(request.TransactionHeader.Username, request.TransactionHeader.Password);

                        //Create proxy web service from dms web service with credential
                        _WA.Mapper.v2.Job.Job proxyws = new _WA.Mapper.v2.Job.Job(request.TransactionHeader.DMSServerUrl);
                        proxyws.Credentials = proxycredential;

                        //Create proxy request with jobget and transaction
                        _WA.Mapper.v2.Job.JobGetRequest proxyrequest = new _WA.Mapper.v2.Job.JobGetRequest();

                        //Create proxy transaction
                        _WA.Mapper.v2.Job.TransactionHeader proxytransactionheader = new _WA.Mapper.v2.Job.TransactionHeader();
                        if (request.TransactionHeader != null)
                        {
                            #region//TransactionHeader Set
                            proxytransactionheader.CountryID = request.TransactionHeader.CountryID;
                            proxytransactionheader.DealerID = request.TransactionHeader.DealerID;
                            proxytransactionheader.DistributorID = request.TransactionHeader.DistributorID;
                            proxytransactionheader.DMSCode = request.TransactionHeader.DMSCode;
                            proxytransactionheader.DMSServerUrl = request.TransactionHeader.DMSServerUrl;
                            proxytransactionheader.DMSVersion = request.TransactionHeader.DMSVersion;
                            proxytransactionheader.DocumentVersion = request.TransactionHeader.DocumentVersion;
                            proxytransactionheader.GroupID = request.TransactionHeader.GroupID;
                            proxytransactionheader.IneterfaceID = request.TransactionHeader.IneterfaceID;
                            proxytransactionheader.Password = request.TransactionHeader.Password;
                            proxytransactionheader.PollingToken = request.TransactionHeader.PollingToken;
                            proxytransactionheader.RequestPollingToken = request.TransactionHeader.RequestPollingToken;
                            proxytransactionheader.RequestType = request.TransactionHeader.RequestType;
                            proxytransactionheader.TransactionId = request.TransactionHeader.TransactionId;
                            proxytransactionheader.TransactionDateTimeLocal = request.TransactionHeader.TransactionDateTimeLocal;
                            proxytransactionheader.TransactionDateTimeUTC = request.TransactionHeader.TransactionDateTimeUTC;
                            proxytransactionheader.TransactionType = request.TransactionHeader.TransactionType;
                            proxytransactionheader.Username = request.TransactionHeader.Username;
                            proxytransactionheader.VenderTrackingCode = request.TransactionHeader.VenderTrackingCode;
                            proxyrequest.TransactionHeader = proxytransactionheader;
                            #endregion
                        }

                        //Create proxy jobget
                        _WA.Mapper.v2.Job.JobGet proxyjobget = new _WA.Mapper.v2.Job.JobGet();
                        if (request.JobGet != null)
                        {
                            #region//JobGet Set
                            proxyjobget.DMSJobNo = request.JobGet.DMSJobNo;
                            proxyjobget.DMSJobNo = request.JobGet.DMSJobNo;
                            proxyjobget.DMSJobStatus = request.JobGet.DMSJobStatus;
                            proxyjobget.DMSRONo = request.JobGet.DMSRONo;
                            proxyjobget.LastModifiedDateTimeFromUTC = request.JobGet.LastModifiedDateTimeFromUTC;
                            proxyjobget.LastModifiedDateTimeToUTC = request.JobGet.LastModifiedDateTimeToUTC;
                            proxyjobget.ScheduledDateTimeFromLocal = request.JobGet.ScheduledDateTimeFromLocal;
                            proxyjobget.ScheduledDateTimeToLocal = request.JobGet.ScheduledDateTimeToLocal;
                            proxyrequest.JobGet = proxyjobget;
                            #endregion
                        }

                        #endregion

                        //Run proxy web method with proxy request
                        _WA.Mapper.v2.Job.JobGetResponse proxyresponse = proxyws.JobGet(proxyrequest);

                        //Mapping with Standard Interface Specification Object
                        if (proxyresponse != null)
                        {
                            if (proxyresponse.TransactionHeader != null)
                            {
                                #region//TransactionHeader Set
                                TransactionHeader transactionheader = new TransactionHeader();
                                transactionheader.CountryID = proxyresponse.TransactionHeader.CountryID;
                                transactionheader.DealerID = proxyresponse.TransactionHeader.DealerID;
                                transactionheader.DistributorID = proxyresponse.TransactionHeader.DistributorID;
                                transactionheader.DMSCode = proxyresponse.TransactionHeader.DMSCode;
                                transactionheader.DMSServerUrl = proxyresponse.TransactionHeader.DMSServerUrl;
                                transactionheader.DMSVersion = proxyresponse.TransactionHeader.DMSVersion;
                                transactionheader.DocumentVersion = proxyresponse.TransactionHeader.DocumentVersion;
                                transactionheader.GroupID = proxyresponse.TransactionHeader.GroupID;
                                transactionheader.IneterfaceID = proxyresponse.TransactionHeader.IneterfaceID;
                                transactionheader.Password = proxyresponse.TransactionHeader.Password;
                                transactionheader.PollingToken = proxyresponse.TransactionHeader.PollingToken;
                                transactionheader.RequestPollingToken = proxyresponse.TransactionHeader.RequestPollingToken;
                                transactionheader.RequestType = proxyresponse.TransactionHeader.RequestType;
                                transactionheader.TransactionId = proxyresponse.TransactionHeader.TransactionId;
                                transactionheader.TransactionDateTimeLocal = proxyresponse.TransactionHeader.TransactionDateTimeLocal;
                                transactionheader.TransactionDateTimeUTC = proxyresponse.TransactionHeader.TransactionDateTimeUTC;
                                transactionheader.TransactionType = proxyresponse.TransactionHeader.TransactionType;
                                transactionheader.Username = proxyresponse.TransactionHeader.Username;
                                transactionheader.VenderTrackingCode = proxyresponse.TransactionHeader.VenderTrackingCode;
                                response.TransactionHeader = transactionheader;
                                #endregion
                            }

                            //ResultMessage Set
                            if (proxyresponse.ResultMessage != null)
                            {
                                response.ResultMessage = GetResultMessageData(proxyresponse.ResultMessage.Code, proxyresponse.ResultMessage.Message);
                            }

                            if (proxyresponse.Errors != null)
                            {
                                //Error List Set
                                foreach (_WA.Mapper.v2.Job.Error proxyerror in proxyresponse.Errors)
                                {
                                    if (response.Errors != null)
                                        response.Errors.Add(GetErrorData(proxyerror.Code, proxyerror.Message));
                                    else
                                        response.Errors = GetErrorDataList(proxyerror.Code, proxyerror.Message);
                                }
                            }
                            else
                            {
                                #region//JobGetResponse Set

                                if (proxyresponse.Jobs != null && proxyresponse.Jobs.Length > 0)
                                {
                                    response.Jobs = new List<Job>();
                                    foreach (_WA.Mapper.v2.Job.Job1 proxyjob in proxyresponse.Jobs)
                                    {
                                        #region//Job Header
                                        Job job = new Job();
                                        job.ActualHours = proxyjob.ActualHours;
                                        job.DMSJobNo = proxyjob.DMSJobNo;
                                        job.DMSJobNo = proxyjob.DMSJobNo;
                                        job.DMSRONo = proxyjob.DMSRONo;
                                        job.ServiceLineNumber = proxyjob.ServiceLineNumber;
                                        job.SkillLevel = proxyjob.SkillLevel;
                                        #endregion

                                        #region //Job ManagementFields
                                        if (proxyjob.ManagementFields != null)
                                        {
                                            ManagementFields managementfields = new ManagementFields();
                                            managementfields.CreateDateTimeUTC = proxyjob.ManagementFields.CreateDateTimeUTC;
                                            managementfields.LastModifiedDateTimeUTC = proxyjob.ManagementFields.LastModifiedDateTimeUTC;
                                            job.ManagementFields = managementfields;
                                        }
                                        #endregion

                                        #region//Job Comments
                                        if (proxyjob.Comments != null && proxyjob.Comments.Length > 0)
                                        {
                                            job.Comments = new List<Comment>();
                                            foreach (_WA.Mapper.v2.Job.Comment proxycomment in proxyjob.Comments)
                                            {
                                                Comment comment = new Comment();
                                                comment.DescriptionComment = proxycomment.DescriptionComment;
                                                comment.SequenceNumber = proxycomment.SequenceNumber;
                                                job.Comments.Add(comment);
                                            }
                                        }
                                        #endregion

                                        #region//Job Descriptions
                                        if (proxyjob.Descriptions != null && proxyjob.Descriptions.Length > 0)
                                        {
                                            job.Descriptions = new List<Description>();
                                            foreach (_WA.Mapper.v2.Job.Description proxydescription in proxyjob.Descriptions)
                                            {
                                                Description description = new Description();
                                                description.DescriptionComment = proxydescription.DescriptionComment;
                                                description.SequenceNumber = proxydescription.SequenceNumber;
                                                job.Descriptions.Add(description);
                                            }
                                        }
                                        #endregion

                                        #region//Job Causes
                                        if (proxyjob.Causes != null && proxyjob.Causes.Length > 0)
                                        {
                                            job.Causes = new List<Cause>();
                                            foreach (_WA.Mapper.v2.Job.Cause proxycause in proxyjob.Causes)
                                            {
                                                Cause cause = new Cause();
                                                cause.CauseLaborOpCode = proxycause.CauseLaborOpCode;
                                                cause.Comment = proxycause.Comment;
                                                cause.SequenceNumber = proxycause.SequenceNumber;
                                                job.Causes.Add(cause);
                                            }
                                        }
                                        #endregion

                                        #region//Job Corrections
                                        if (proxyjob.Corrections != null && proxyjob.Corrections.Length > 0)
                                        {
                                            job.Corrections = new List<Correction>();
                                            foreach (_WA.Mapper.v2.Job.Correction proxycorrection in proxyjob.Corrections)
                                            {
                                                Correction cause = new Correction();
                                                cause.CorrectionLaborOpCode = proxycorrection.CorrectionLaborOpCode;
                                                cause.Comment = proxycorrection.Comment;
                                                cause.SequenceNumber = proxycorrection.SequenceNumber;
                                                job.Corrections.Add(cause);
                                            }
                                        }
                                        #endregion

                                        #region//Job OPCodes
                                        if (proxyjob.OPCodes != null && proxyjob.OPCodes.Length > 0)
                                        {
                                            job.OPCodes = new List<Data.v2.Common.Job.OPCode>();
                                            foreach (_WA.Mapper.v2.Job.OPCode proxyopcode in proxyjob.OPCodes)
                                            {
                                                #region//Job OPCode Header
                                                Data.v2.Common.Job.OPCode opcode = new Data.v2.Common.Job.OPCode();
                                                opcode.ActualHours = proxyopcode.ActualHours;
                                                opcode.Code = proxyopcode.Code;
                                                opcode.Description = proxyopcode.Description;
                                                opcode.EstimatedHours = proxyopcode.EstimatedHours;
                                                opcode.SkillLevel = proxyopcode.SkillLevel;
                                                #endregion

                                                #region//Job OPCode Comments
                                                if (proxyopcode.Comments != null && proxyopcode.Comments.Length > 0)
                                                {
                                                    opcode.Comments = new List<Comment>();
                                                    foreach (_WA.Mapper.v2.Job.Comment proxycomment in proxyopcode.Comments)
                                                    {
                                                        Comment comment = new Comment();
                                                        comment.DescriptionComment = proxycomment.DescriptionComment;
                                                        comment.SequenceNumber = proxycomment.SequenceNumber;
                                                        opcode.Comments.Add(comment);
                                                    }
                                                }
                                                #endregion

                                                #region//Job OPCode Descriptions
                                                if (proxyopcode.Descriptions != null && proxyopcode.Descriptions.Length > 0)
                                                {
                                                    opcode.Descriptions = new List<Description>();
                                                    foreach (_WA.Mapper.v2.Job.Description proxydescription in proxyopcode.Descriptions)
                                                    {
                                                        Description description = new Description();
                                                        description.DescriptionComment = proxydescription.DescriptionComment;
                                                        description.SequenceNumber = proxydescription.SequenceNumber;
                                                        opcode.Descriptions.Add(description);
                                                    }
                                                }
                                                #endregion

                                                #region//Job OPCode Causes
                                                if (proxyopcode.Causes != null && proxyopcode.Causes.Length > 0)
                                                {
                                                    opcode.Causes = new List<Cause>();
                                                    foreach (_WA.Mapper.v2.Job.Cause proxycause in proxyopcode.Causes)
                                                    {
                                                        Cause cause = new Cause();
                                                        cause.CauseLaborOpCode = proxycause.CauseLaborOpCode;
                                                        cause.Comment = proxycause.Comment;
                                                        cause.SequenceNumber = proxycause.SequenceNumber;
                                                        opcode.Causes.Add(cause);
                                                    }
                                                }
                                                #endregion

                                                #region//Job OPCode Corrections
                                                if (proxyopcode.Corrections != null && proxyopcode.Corrections.Length > 0)
                                                {
                                                    opcode.Corrections = new List<Correction>();
                                                    foreach (_WA.Mapper.v2.Job.Correction proxycorrection in proxyopcode.Corrections)
                                                    {
                                                        Correction correction = new Correction();
                                                        correction.CorrectionLaborOpCode = proxycorrection.CorrectionLaborOpCode;
                                                        correction.Comment = proxycorrection.Comment;
                                                        correction.SequenceNumber = proxycorrection.SequenceNumber;
                                                        opcode.Corrections.Add(correction);
                                                    }
                                                }
                                                #endregion

                                                job.OPCodes.Add(opcode);
                                            }
                                        }
                                        #endregion

                                        #region//Job JobLogs
                                        if (proxyjob.JobLogs != null && proxyjob.JobLogs.Length > 0)
                                        {
                                            job.JobLogs = new List<JobLog>();
                                            foreach (_WA.Mapper.v2.Job.JobLog proxyjoblog in proxyjob.JobLogs)
                                            {
                                                #region//Job JobLogs Header
                                                JobLog joblog = new JobLog();
                                                joblog.DMSJobStatus = proxyjoblog.DMSJobStatus;
                                                joblog.EstimatedLaborHour = proxyjoblog.EstimatedLaborHour;
                                                joblog.LogType = proxyjoblog.LogType;
                                                joblog.ScheduledDateTimeFromLocal = proxyjoblog.ScheduledDateTimeFromLocal;
                                                joblog.ScheduledDateTimeToLocal = proxyjoblog.ScheduledDateTimeToLocal;
                                                joblog.Stall = proxyjoblog.Stall;
                                                #endregion

                                                #region//Job Technicians
                                                if (proxyjoblog.Technicians != null && proxyjoblog.Technicians.Length > 0)
                                                {
                                                    joblog.Technicians = new List<Technician>();
                                                    foreach (_WA.Mapper.v2.Job.Technician proxytechnician in proxyjoblog.Technicians)
                                                    {
                                                        Technician technician = new Technician();
                                                        technician.TCEmployeeID = proxytechnician.TCEmployeeID;
                                                        technician.TCEmployeeName = proxytechnician.TCEmployeeName;
                                                        joblog.Technicians.Add(technician);
                                                    }
                                                }
                                                #endregion

                                                #region//Job ActualTimeLogs
                                                if (proxyjoblog.ActualTimeLogs != null && proxyjoblog.ActualTimeLogs.Length > 0)
                                                {
                                                    joblog.ActualTimeLogs = new List<ActualTimeLog>();
                                                    foreach (_WA.Mapper.v2.Job.ActualTimeLog proxyactualtimelog in proxyjoblog.ActualTimeLogs)
                                                    {
                                                        ActualTimeLog actualtimelog = new ActualTimeLog();
                                                        actualtimelog.EndDateTimeLocal = proxyactualtimelog.EndDateTimeLocal;
                                                        actualtimelog.PauseReasonCode = proxyactualtimelog.PauseReasonCode;
                                                        actualtimelog.PauseReasonComment = proxyactualtimelog.PauseReasonComment;
                                                        actualtimelog.StartDateTimeLocal = proxyactualtimelog.StartDateTimeLocal;
                                                        actualtimelog.Status = proxyactualtimelog.Status;
                                                        actualtimelog.TCEmployeeID = proxyactualtimelog.TCEmployeeID;
                                                        actualtimelog.TCEmployeeName = proxyactualtimelog.TCEmployeeName;
                                                        joblog.ActualTimeLogs.Add(actualtimelog);
                                                    }
                                                }
                                                #endregion

                                                #region//Job JobComments
                                                if (proxyjoblog.JobComments != null && proxyjoblog.JobComments.Length > 0)
                                                {
                                                    joblog.JobComments = new List<JobComment>();
                                                    foreach (_WA.Mapper.v2.Job.JobComment proxyjobcomment in proxyjoblog.JobComments)
                                                    {
                                                        JobComment jobcomment = new JobComment();
                                                        jobcomment.ActualWorkHour = proxyjobcomment.ActualWorkHour;
                                                        jobcomment.SubStatus = proxyjobcomment.SubStatus;
                                                        joblog.JobComments.Add(jobcomment);
                                                    }
                                                }
                                                #endregion

                                                job.JobLogs.Add(joblog);
                                            }
                                        }
                                        #endregion

                                        response.Jobs.Add(job);
                                    }
                                }
                                else
                                {
                                    response.ResultMessage = GetResultMessageData(ResponseCode.NoResult, ResponseMessage.NoResult);
                                }
                                #endregion
                            }
                        }
                        else
                        {
                            if (response.Errors != null)
                                response.Errors.Add(GetErrorData(ResponseCode.Fail, ResponseMessage.Fail));
                            else
                                response.Errors = GetErrorDataList(ResponseCode.Fail, ResponseMessage.Fail);
                        }
                        #endregion
                    }
                    break;
                case "v2.HMCIS.1C.v4":
                    {
                        #region v2.HMCIS.1C.v4 - RTR (Proxy Class Dll Name : _1C.v4)

                        #region JobGet Request Set

                        //Create proxy credential
                        NetworkCredential proxycredential = new NetworkCredential(request.TransactionHeader.Username, request.TransactionHeader.Password);

                        //Create proxy web service from dms web service with credential
                        _1C.v4.Job.Job proxyws = new _1C.v4.Job.Job(request.TransactionHeader.DMSServerUrl);
                        proxyws.Credentials = proxycredential;

                        //Create proxy request with jobget and transaction
                        _1C.v4.Job.JobGetRequest proxyrequest = new _1C.v4.Job.JobGetRequest();

                        //Create proxy transaction
                        _1C.v4.Job.TransactionHeader proxytransactionheader = new _1C.v4.Job.TransactionHeader();
                        if (request.TransactionHeader != null)
                        {
                            #region//TransactionHeader Set
                            proxytransactionheader.CountryID = request.TransactionHeader.CountryID;
                            proxytransactionheader.DealerID = request.TransactionHeader.DealerID;
                            proxytransactionheader.DistributorID = request.TransactionHeader.DistributorID;
                            proxytransactionheader.DMSCode = request.TransactionHeader.DMSCode;
                            proxytransactionheader.DMSServerUrl = request.TransactionHeader.DMSServerUrl;
                            proxytransactionheader.DMSVersion = request.TransactionHeader.DMSVersion;
                            proxytransactionheader.DocumentVersion = request.TransactionHeader.DocumentVersion;
                            proxytransactionheader.GroupID = request.TransactionHeader.GroupID;
                            proxytransactionheader.IneterfaceID = request.TransactionHeader.IneterfaceID;
                            proxytransactionheader.Password = request.TransactionHeader.Password;
                            proxytransactionheader.PollingToken = request.TransactionHeader.PollingToken;
                            proxytransactionheader.RequestPollingToken = request.TransactionHeader.RequestPollingToken;
                            proxytransactionheader.RequestType = request.TransactionHeader.RequestType;
                            proxytransactionheader.TransactionId = request.TransactionHeader.TransactionId;
                            proxytransactionheader.TransactionDateTimeLocal = request.TransactionHeader.TransactionDateTimeLocal;
                            proxytransactionheader.TransactionDateTimeUTC = request.TransactionHeader.TransactionDateTimeUTC;
                            proxytransactionheader.TransactionType = request.TransactionHeader.TransactionType;
                            proxytransactionheader.Username = request.TransactionHeader.Username;
                            proxytransactionheader.VenderTrackingCode = request.TransactionHeader.VenderTrackingCode;
                            proxyrequest.TransactionHeader = proxytransactionheader;
                            #endregion
                        }

                        //Create proxy jobget
                        _1C.v4.Job.JobGet proxyjobget = new _1C.v4.Job.JobGet();
                        if (request.JobGet != null)
                        {
                            #region//JobGet Set
                            proxyjobget.DMSJobNo = request.JobGet.DMSJobNo;
                            proxyjobget.DMSJobNo = request.JobGet.DMSJobNo;
                            proxyjobget.DMSJobStatus = request.JobGet.DMSJobStatus;
                            proxyjobget.DMSRONo = request.JobGet.DMSRONo;
                            proxyjobget.LastModifiedDateTimeFromUTC = request.JobGet.LastModifiedDateTimeFromUTC;
                            proxyjobget.LastModifiedDateTimeToUTC = request.JobGet.LastModifiedDateTimeToUTC;
                            proxyjobget.ScheduledDateTimeFromLocal = request.JobGet.ScheduledDateTimeFromLocal;
                            proxyjobget.ScheduledDateTimeToLocal = request.JobGet.ScheduledDateTimeToLocal;
                            proxyrequest.JobGet = proxyjobget;
                            #endregion
                        }

                        #endregion

                        //Run proxy web method with proxy request
                        _1C.v4.Job.JobGetResponse proxyresponse = proxyws.JobGet(proxyrequest);

                        //Mapping with Standard Interface Specification Object
                        if (proxyresponse != null)
                        {
                            if (proxyresponse.TransactionHeader != null)
                            {
                                #region//TransactionHeader Set
                                TransactionHeader transactionheader = new TransactionHeader();
                                transactionheader.CountryID = proxyresponse.TransactionHeader.CountryID;
                                transactionheader.DealerID = proxyresponse.TransactionHeader.DealerID;
                                transactionheader.DistributorID = proxyresponse.TransactionHeader.DistributorID;
                                transactionheader.DMSCode = proxyresponse.TransactionHeader.DMSCode;
                                transactionheader.DMSServerUrl = proxyresponse.TransactionHeader.DMSServerUrl;
                                transactionheader.DMSVersion = proxyresponse.TransactionHeader.DMSVersion;
                                transactionheader.DocumentVersion = proxyresponse.TransactionHeader.DocumentVersion;
                                transactionheader.GroupID = proxyresponse.TransactionHeader.GroupID;
                                transactionheader.IneterfaceID = proxyresponse.TransactionHeader.IneterfaceID;
                                transactionheader.Password = proxyresponse.TransactionHeader.Password;
                                transactionheader.PollingToken = proxyresponse.TransactionHeader.PollingToken;
                                transactionheader.RequestPollingToken = proxyresponse.TransactionHeader.RequestPollingToken;
                                transactionheader.RequestType = proxyresponse.TransactionHeader.RequestType;
                                transactionheader.TransactionId = proxyresponse.TransactionHeader.TransactionId;
                                transactionheader.TransactionDateTimeLocal = proxyresponse.TransactionHeader.TransactionDateTimeLocal;
                                transactionheader.TransactionDateTimeUTC = proxyresponse.TransactionHeader.TransactionDateTimeUTC;
                                transactionheader.TransactionType = proxyresponse.TransactionHeader.TransactionType;
                                transactionheader.Username = proxyresponse.TransactionHeader.Username;
                                transactionheader.VenderTrackingCode = proxyresponse.TransactionHeader.VenderTrackingCode;
                                response.TransactionHeader = transactionheader;
                                #endregion
                            }

                            //ResultMessage Set
                            if (proxyresponse.ResultMessage != null)
                            {
                                response.ResultMessage = GetResultMessageData(proxyresponse.ResultMessage.Code, proxyresponse.ResultMessage.Message);
                            }

                            if (proxyresponse.Errors != null)
                            {
                                //Error List Set
                                foreach (_1C.v4.Job.Error proxyerror in proxyresponse.Errors)
                                {
                                    if (response.Errors != null)
                                        response.Errors.Add(GetErrorData(proxyerror.Code, proxyerror.Message));
                                    else
                                        response.Errors = GetErrorDataList(proxyerror.Code, proxyerror.Message);
                                }
                            }
                            else
                            {
                                #region//JobGetResponse Set

                                if (proxyresponse.Jobs != null && proxyresponse.Jobs.Length > 0)
                                {
                                    response.Jobs = new List<Job>();
                                    foreach (_1C.v4.Job.Job1 proxyjob in proxyresponse.Jobs)
                                    {
                                        #region//Job Header
                                        Job job = new Job();
                                        job.ActualHours = proxyjob.ActualHours;
                                        job.DMSJobNo = proxyjob.DMSJobNo;
                                        job.DMSJobNo = proxyjob.DMSJobNo;
                                        job.DMSRONo = proxyjob.DMSRONo;
                                        job.ServiceLineNumber = proxyjob.ServiceLineNumber;
                                        job.SkillLevel = proxyjob.SkillLevel;
                                        #endregion

                                        #region //Job ManagementFields
                                        if (proxyjob.ManagementFields != null)
                                        {
                                            ManagementFields managementfields = new ManagementFields();
                                            managementfields.CreateDateTimeUTC = proxyjob.ManagementFields.CreateDateTimeUTC;
                                            managementfields.LastModifiedDateTimeUTC = proxyjob.ManagementFields.LastModifiedDateTimeUTC;
                                            job.ManagementFields = managementfields;
                                        }
                                        #endregion

                                        #region//Job Comments
                                        if (proxyjob.Comments != null && proxyjob.Comments.Length > 0)
                                        {
                                            job.Comments = new List<Comment>();
                                            foreach (_1C.v4.Job.Comment proxycomment in proxyjob.Comments)
                                            {
                                                Comment comment = new Comment();
                                                comment.DescriptionComment = proxycomment.DescriptionComment;
                                                comment.SequenceNumber = proxycomment.SequenceNumber;
                                                job.Comments.Add(comment);
                                            }
                                        }
                                        #endregion

                                        #region//Job Descriptions
                                        if (proxyjob.Descriptions != null && proxyjob.Descriptions.Length > 0)
                                        {
                                            job.Descriptions = new List<Description>();
                                            foreach (_1C.v4.Job.Description proxydescription in proxyjob.Descriptions)
                                            {
                                                Description description = new Description();
                                                description.DescriptionComment = proxydescription.DescriptionComment;
                                                description.SequenceNumber = proxydescription.SequenceNumber;
                                                job.Descriptions.Add(description);
                                            }
                                        }
                                        #endregion

                                        #region//Job Causes
                                        if (proxyjob.Causes != null && proxyjob.Causes.Length > 0)
                                        {
                                            job.Causes = new List<Cause>();
                                            foreach (_1C.v4.Job.Cause proxycause in proxyjob.Causes)
                                            {
                                                Cause cause = new Cause();
                                                cause.CauseLaborOpCode = proxycause.CauseLaborOpCode;
                                                cause.Comment = proxycause.Comment;
                                                cause.SequenceNumber = proxycause.SequenceNumber;
                                                job.Causes.Add(cause);
                                            }
                                        }
                                        #endregion

                                        #region//Job Corrections
                                        if (proxyjob.Corrections != null && proxyjob.Corrections.Length > 0)
                                        {
                                            job.Corrections = new List<Correction>();
                                            foreach (_1C.v4.Job.Correction proxycorrection in proxyjob.Corrections)
                                            {
                                                Correction cause = new Correction();
                                                cause.CorrectionLaborOpCode = proxycorrection.CorrectionLaborOpCode;
                                                cause.Comment = proxycorrection.Comment;
                                                cause.SequenceNumber = proxycorrection.SequenceNumber;
                                                job.Corrections.Add(cause);
                                            }
                                        }
                                        #endregion

                                        #region//Job OPCodes
                                        if (proxyjob.OPCodes != null && proxyjob.OPCodes.Length > 0)
                                        {
                                            job.OPCodes = new List<Data.v2.Common.Job.OPCode>();
                                            foreach (_1C.v4.Job.OPCode proxyopcode in proxyjob.OPCodes)
                                            {
                                                #region//Job OPCode Header
                                                Data.v2.Common.Job.OPCode opcode = new Data.v2.Common.Job.OPCode();
                                                opcode.ActualHours = proxyopcode.ActualHours;
                                                opcode.Code = proxyopcode.Code;
                                                opcode.Description = proxyopcode.Description;
                                                opcode.EstimatedHours = proxyopcode.EstimatedHours;
                                                opcode.SkillLevel = proxyopcode.SkillLevel;
                                                #endregion

                                                #region//Job OPCode Comments
                                                if (proxyopcode.Comments != null && proxyopcode.Comments.Length > 0)
                                                {
                                                    opcode.Comments = new List<Comment>();
                                                    foreach (_1C.v4.Job.Comment proxycomment in proxyopcode.Comments)
                                                    {
                                                        Comment comment = new Comment();
                                                        comment.DescriptionComment = proxycomment.DescriptionComment;
                                                        comment.SequenceNumber = proxycomment.SequenceNumber;
                                                        opcode.Comments.Add(comment);
                                                    }
                                                }
                                                #endregion

                                                #region//Job OPCode Descriptions
                                                if (proxyopcode.Descriptions != null && proxyopcode.Descriptions.Length > 0)
                                                {
                                                    opcode.Descriptions = new List<Description>();
                                                    foreach (_1C.v4.Job.Description proxydescription in proxyopcode.Descriptions)
                                                    {
                                                        Description description = new Description();
                                                        description.DescriptionComment = proxydescription.DescriptionComment;
                                                        description.SequenceNumber = proxydescription.SequenceNumber;
                                                        opcode.Descriptions.Add(description);
                                                    }
                                                }
                                                #endregion

                                                #region//Job OPCode Causes
                                                if (proxyopcode.Causes != null && proxyopcode.Causes.Length > 0)
                                                {
                                                    opcode.Causes = new List<Cause>();
                                                    foreach (_1C.v4.Job.Cause proxycause in proxyopcode.Causes)
                                                    {
                                                        Cause cause = new Cause();
                                                        cause.CauseLaborOpCode = proxycause.CauseLaborOpCode;
                                                        cause.Comment = proxycause.Comment;
                                                        cause.SequenceNumber = proxycause.SequenceNumber;
                                                        opcode.Causes.Add(cause);
                                                    }
                                                }
                                                #endregion

                                                #region//Job OPCode Corrections
                                                if (proxyopcode.Corrections != null && proxyopcode.Corrections.Length > 0)
                                                {
                                                    opcode.Corrections = new List<Correction>();
                                                    foreach (_1C.v4.Job.Correction proxycorrection in proxyopcode.Corrections)
                                                    {
                                                        Correction correction = new Correction();
                                                        correction.CorrectionLaborOpCode = proxycorrection.CorrectionLaborOpCode;
                                                        correction.Comment = proxycorrection.Comment;
                                                        correction.SequenceNumber = proxycorrection.SequenceNumber;
                                                        opcode.Corrections.Add(correction);
                                                    }
                                                }
                                                #endregion

                                                job.OPCodes.Add(opcode);
                                            }
                                        }
                                        #endregion

                                        #region//Job JobLogs
                                        if (proxyjob.JobLogs != null && proxyjob.JobLogs.Length > 0)
                                        {
                                            job.JobLogs = new List<JobLog>();
                                            foreach (_1C.v4.Job.JobLog proxyjoblog in proxyjob.JobLogs)
                                            {
                                                #region//Job JobLogs Header
                                                JobLog joblog = new JobLog();
                                                joblog.DMSJobStatus = proxyjoblog.DMSJobStatus;
                                                joblog.EstimatedLaborHour = proxyjoblog.EstimatedLaborHour;
                                                joblog.LogType = proxyjoblog.LogType;
                                                joblog.ScheduledDateTimeFromLocal = proxyjoblog.ScheduledDateTimeFromLocal;
                                                joblog.ScheduledDateTimeToLocal = proxyjoblog.ScheduledDateTimeToLocal;
                                                joblog.Stall = proxyjoblog.Stall;
                                                #endregion

                                                #region//Job Technicians
                                                if (proxyjoblog.Technicians != null && proxyjoblog.Technicians.Length > 0)
                                                {
                                                    joblog.Technicians = new List<Technician>();
                                                    foreach (_1C.v4.Job.Technician proxytechnician in proxyjoblog.Technicians)
                                                    {
                                                        Technician technician = new Technician();
                                                        technician.TCEmployeeID = proxytechnician.TCEmployeeID;
                                                        technician.TCEmployeeName = proxytechnician.TCEmployeeName;
                                                        joblog.Technicians.Add(technician);
                                                    }
                                                }
                                                #endregion

                                                #region//Job ActualTimeLogs
                                                if (proxyjoblog.ActualTimeLogs != null && proxyjoblog.ActualTimeLogs.Length > 0)
                                                {
                                                    joblog.ActualTimeLogs = new List<ActualTimeLog>();
                                                    foreach (_1C.v4.Job.ActualTimeLog proxyactualtimelog in proxyjoblog.ActualTimeLogs)
                                                    {
                                                        ActualTimeLog actualtimelog = new ActualTimeLog();
                                                        actualtimelog.EndDateTimeLocal = proxyactualtimelog.EndDateTimeLocal;
                                                        actualtimelog.PauseReasonCode = proxyactualtimelog.PauseReasonCode;
                                                        actualtimelog.PauseReasonComment = proxyactualtimelog.PauseReasonComment;
                                                        actualtimelog.StartDateTimeLocal = proxyactualtimelog.StartDateTimeLocal;
                                                        actualtimelog.Status = proxyactualtimelog.Status;
                                                        actualtimelog.TCEmployeeID = proxyactualtimelog.TCEmployeeID;
                                                        actualtimelog.TCEmployeeName = proxyactualtimelog.TCEmployeeName;
                                                        joblog.ActualTimeLogs.Add(actualtimelog);
                                                    }
                                                }
                                                #endregion

                                                #region//Job JobComments
                                                if (proxyjoblog.JobComments != null && proxyjoblog.JobComments.Length > 0)
                                                {
                                                    joblog.JobComments = new List<JobComment>();
                                                    foreach (_1C.v4.Job.JobComment proxyjobcomment in proxyjoblog.JobComments)
                                                    {
                                                        JobComment jobcomment = new JobComment();
                                                        jobcomment.ActualWorkHour = proxyjobcomment.ActualWorkHour;
                                                        jobcomment.SubStatus = proxyjobcomment.SubStatus;
                                                        joblog.JobComments.Add(jobcomment);
                                                    }
                                                }
                                                #endregion

                                                job.JobLogs.Add(joblog);
                                            }
                                        }
                                        #endregion

                                        response.Jobs.Add(job);
                                    }
                                }
                                else
                                {
                                    response.ResultMessage = GetResultMessageData(ResponseCode.NoResult, ResponseMessage.NoResult);
                                }
                                #endregion
                            }
                        }
                        else
                        {
                            if (response.Errors != null)
                                response.Errors.Add(GetErrorData(ResponseCode.Fail, ResponseMessage.Fail));
                            else
                                response.Errors = GetErrorDataList(ResponseCode.Fail, ResponseMessage.Fail);
                        }
                        #endregion
                    }
                    break;
                default: response.Errors = new List<Error>() { new Error() { Code = ResponseCode.NoMatchedProxy, Message = ResponseMessage.NoMatchedProxy } };
                    break;
            }

            return response;
        }
示例#8
0
        public PriceCheckResponse PriceCheck(PriceCheckRequest request)
        {
            PriceCheckResponse response = new PriceCheckResponse();

            //DMS information set by dealer information
            string proxypath = string.Format("{0}.{1}.{2}.{3}",
                request.TransactionHeader.DocumentVersion,
                request.TransactionHeader.DistributorID,
                request.TransactionHeader.DMSCode,
                request.TransactionHeader.DMSVersion);

            switch (proxypath)
            {
                case "v2.Common.WA.v2":
                    {
                        #region v2.Common.WA.v2 - RTR (Proxy Class Dll Name : _WA.Mapper.v2)

                        #region PriceCheck Request Set

                        //Create proxy credential
                        NetworkCredential proxycredential = new NetworkCredential(request.TransactionHeader.Username, request.TransactionHeader.Password);

                        //Create proxy web service from dms web service with credential
                        _WA.Mapper.v2.Price.Price proxyws = new _WA.Mapper.v2.Price.Price(request.TransactionHeader.DMSServerUrl);
                        proxyws.Credentials = proxycredential;

                        //Create proxy request with pricecheck and transaction
                        _WA.Mapper.v2.Price.PriceCheckRequest proxyrequest = new _WA.Mapper.v2.Price.PriceCheckRequest();

                        //Create proxy transaction
                        _WA.Mapper.v2.Price.TransactionHeader proxytransactionheader = new _WA.Mapper.v2.Price.TransactionHeader();
                        if (request.TransactionHeader != null)
                        {
                            #region//TransactionHeader Set
                            proxytransactionheader.CountryID = request.TransactionHeader.CountryID;
                            proxytransactionheader.DealerID = request.TransactionHeader.DealerID;
                            proxytransactionheader.DistributorID = request.TransactionHeader.DistributorID;
                            proxytransactionheader.DMSCode = request.TransactionHeader.DMSCode;
                            proxytransactionheader.DMSServerUrl = request.TransactionHeader.DMSServerUrl;
                            proxytransactionheader.DMSVersion = request.TransactionHeader.DMSVersion;
                            proxytransactionheader.DocumentVersion = request.TransactionHeader.DocumentVersion;
                            proxytransactionheader.GroupID = request.TransactionHeader.GroupID;
                            proxytransactionheader.IneterfaceID = request.TransactionHeader.IneterfaceID;
                            proxytransactionheader.Password = request.TransactionHeader.Password;
                            proxytransactionheader.PollingToken = request.TransactionHeader.PollingToken;
                            proxytransactionheader.RequestPollingToken = request.TransactionHeader.RequestPollingToken;
                            proxytransactionheader.RequestType = request.TransactionHeader.RequestType;
                            proxytransactionheader.TransactionId = request.TransactionHeader.TransactionId;
                            proxytransactionheader.TransactionDateTimeLocal = request.TransactionHeader.TransactionDateTimeLocal;
                            proxytransactionheader.TransactionDateTimeUTC = request.TransactionHeader.TransactionDateTimeUTC;
                            proxytransactionheader.TransactionType = request.TransactionHeader.TransactionType;
                            proxytransactionheader.Username = request.TransactionHeader.Username;
                            proxytransactionheader.VenderTrackingCode = request.TransactionHeader.VenderTrackingCode;
                            proxyrequest.TransactionHeader = proxytransactionheader;
                            #endregion
                        }

                        //Create proxy pricecheck
                        _WA.Mapper.v2.Price.PriceCheck proxypricecheck = new _WA.Mapper.v2.Price.PriceCheck();
                        if (request.PriceCheck != null)
                        {
                            #region//PriceCheck Header
                            proxypricecheck.DMSRONo = request.PriceCheck.DMSRONo;
                            #endregion

                            #region//PriceCheck OPCodes
                            if (request.PriceCheck.OPCodes != null && request.PriceCheck.OPCodes.Count > 0)
                            {
                                int opcodescnt = 0;
                                _WA.Mapper.v2.Price.OPCode[] proxyopcodes = new _WA.Mapper.v2.Price.OPCode[request.PriceCheck.OPCodes.Count];
                                foreach (Data.v2.HMCIS.Price.OPCode opcode in request.PriceCheck.OPCodes)
                                {
                                    #region//PriceCheck OPCode Header
                                    _WA.Mapper.v2.Price.OPCode proxyopcode = new _WA.Mapper.v2.Price.OPCode();
                                    proxyopcode.Code = opcode.Code;
                                    proxyopcode.Engine = opcode.Engine;
                                    proxyopcode.Make = opcode.Make;
                                    proxyopcode.Mileage = opcode.Mileage;
                                    proxyopcode.Model = opcode.Model;
                                    proxyopcode.Period = opcode.Period;
                                    proxyopcode.Year = opcode.Year;
                                    #endregion

                                    #region//PriceCheck OPCode PriceType
                                    if (opcode.PriceType != null)
                                    {
                                        _WA.Mapper.v2.Price.PriceType proxypricetype = new _WA.Mapper.v2.Price.PriceType();
                                        proxypricetype.DiscountPrice = opcode.PriceType.DiscountPrice;
                                        proxypricetype.DiscountRate = opcode.PriceType.DiscountRate;
                                        proxypricetype.TotalPrice = opcode.PriceType.TotalPrice;
                                        proxypricetype.TotalPriceIncludeTax = opcode.PriceType.TotalPriceIncludeTax;
                                        proxypricetype.UnitPrice = opcode.PriceType.UnitPrice;
                                        proxyopcode.PriceType = proxypricetype;
                                    }
                                    #endregion

                                    #region//PriceCheck OPCode Parts
                                    if (opcode.Parts != null && opcode.Parts.Count > 0)
                                    {
                                        int partscnt = 0;
                                        _WA.Mapper.v2.Price.Part[] proxyparts = new _WA.Mapper.v2.Price.Part[opcode.Parts.Count];
                                        foreach (Data.v2.HMCIS.Price.Part part in opcode.Parts)
                                        {
                                            #region//PriceCheck OPCode Parts Header
                                            _WA.Mapper.v2.Price.Part proxypart = new _WA.Mapper.v2.Price.Part();
                                            proxypart.Manufacturer = part.Manufacturer;
                                            proxypart.PartNumber = part.PartNumber;
                                            proxypart.Quantity = part.Quantity;
                                            proxypart.ServiceType = part.ServiceType;
                                            #endregion

                                            #region//PriceCheck OPCode Parts PriceType
                                            if (part.PriceType != null)
                                            {
                                                _WA.Mapper.v2.Price.PriceType proxypricetype = new _WA.Mapper.v2.Price.PriceType();
                                                proxypricetype.DiscountPrice = part.PriceType.DiscountPrice;
                                                proxypricetype.DiscountRate = part.PriceType.DiscountRate;
                                                proxypricetype.TotalPrice = part.PriceType.TotalPrice;
                                                proxypricetype.TotalPriceIncludeTax = part.PriceType.TotalPriceIncludeTax;
                                                proxypricetype.UnitPrice = part.PriceType.UnitPrice;
                                                proxypart.PriceType = proxypricetype;
                                            }
                                            #endregion

                                            proxyparts[partscnt] = proxypart;
                                            partscnt++;
                                        }

                                        proxyopcode.Parts = proxyparts;
                                    }
                                    #endregion

                                    proxyopcodes[opcodescnt] = proxyopcode;
                                    opcodescnt++;
                                }

                                proxypricecheck.OPCodes = proxyopcodes;
                            }
                            #endregion

                            proxyrequest.PriceCheck = proxypricecheck;
                        }
                        #endregion

                        //Run proxy web method with proxy request
                        _WA.Mapper.v2.Price.PriceCheckResponse proxyresponse = proxyws.PriceCheck(proxyrequest);

                        //Mapping with Standard Interface Specification Object
                        if (proxyresponse != null)
                        {
                            if (proxyresponse.TransactionHeader != null)
                            {
                                #region//TransactionHeader Set
                                TransactionHeader transactionheader = new TransactionHeader();
                                transactionheader.CountryID = proxyresponse.TransactionHeader.CountryID;
                                transactionheader.DealerID = proxyresponse.TransactionHeader.DealerID;
                                transactionheader.DistributorID = proxyresponse.TransactionHeader.DistributorID;
                                transactionheader.DMSCode = proxyresponse.TransactionHeader.DMSCode;
                                transactionheader.DMSServerUrl = proxyresponse.TransactionHeader.DMSServerUrl;
                                transactionheader.DMSVersion = proxyresponse.TransactionHeader.DMSVersion;
                                transactionheader.DocumentVersion = proxyresponse.TransactionHeader.DocumentVersion;
                                transactionheader.GroupID = proxyresponse.TransactionHeader.GroupID;
                                transactionheader.IneterfaceID = proxyresponse.TransactionHeader.IneterfaceID;
                                transactionheader.Password = proxyresponse.TransactionHeader.Password;
                                transactionheader.PollingToken = proxyresponse.TransactionHeader.PollingToken;
                                transactionheader.RequestPollingToken = proxyresponse.TransactionHeader.RequestPollingToken;
                                transactionheader.RequestType = proxyresponse.TransactionHeader.RequestType;
                                transactionheader.TransactionId = proxyresponse.TransactionHeader.TransactionId;
                                transactionheader.TransactionDateTimeLocal = proxyresponse.TransactionHeader.TransactionDateTimeLocal;
                                transactionheader.TransactionDateTimeUTC = proxyresponse.TransactionHeader.TransactionDateTimeUTC;
                                transactionheader.TransactionType = proxyresponse.TransactionHeader.TransactionType;
                                transactionheader.Username = proxyresponse.TransactionHeader.Username;
                                transactionheader.VenderTrackingCode = proxyresponse.TransactionHeader.VenderTrackingCode;
                                response.TransactionHeader = transactionheader;
                                #endregion
                            }

                            //ResultMessage Set
                            if (proxyresponse.ResultMessage != null)
                            {
                                response.ResultMessage = GetResultMessageData(proxyresponse.ResultMessage.Code, proxyresponse.ResultMessage.Message);
                            }

                            if (proxyresponse.Errors != null)
                            {
                                //Error List Set
                                foreach (_WA.Mapper.v2.Price.Error proxyerror in proxyresponse.Errors)
                                {
                                    if (response.Errors != null)
                                        response.Errors.Add(GetErrorData(proxyerror.Code, proxyerror.Message));
                                    else
                                        response.Errors = GetErrorDataList(proxyerror.Code, proxyerror.Message);
                                }
                            }
                            else
                            {
                                #region //OPCodeGetResponse Set

                                if (proxyresponse.Price != null)
                                {
                                    #region//PricesGetResponse Set

                                    _WA.Mapper.v2.Price.Price1 proxyprice = proxyresponse.Price;

                                    #region //Prices Header
                                    Price price = new Price();
                                    price.LaborCampaignDiscountAmount = proxyprice.LaborCampaignDiscountAmount;
                                    price.PartsCampaignDiscountAmount = proxyprice.PartsCampaignDiscountAmount;
                                    price.TotalAmount = proxyprice.TotalAmount;
                                    price.TotalCampaignDiscountAmount = proxyprice.TotalCampaignDiscountAmount;
                                    price.VATAmount = proxyprice.VATAmount;
                                    #endregion

                                    if (proxyprice.OPCodes != null && proxyprice.OPCodes.Length > 0)
                                    {
                                        #region//Prices OPCode
                                        price.OPCodes = new List<Data.v2.HMCIS.Price.OPCode>();
                                        foreach (_WA.Mapper.v2.Price.OPCode1 proxyopcode in proxyprice.OPCodes)
                                        {
                                            #region //Prices OPCode Header
                                            Data.v2.HMCIS.Price.OPCode opcode = new Data.v2.HMCIS.Price.OPCode();
                                            opcode.Code = proxyopcode.Code;
                                            opcode.Engine = proxyopcode.Engine;
                                            opcode.Make = proxyopcode.Make;
                                            opcode.Mileage = proxyopcode.Mileage;
                                            opcode.Model = proxyopcode.Model;
                                            opcode.Period = proxyopcode.Period;
                                            opcode.Year = proxyopcode.Year;
                                            //opcode.Quantity = proxyopcode.Quantity;
                                            #endregion

                                            #region //Prices OPCode PriceType
                                            if (proxyopcode.PriceType != null)
                                            {
                                                PriceType pricetype = new PriceType();
                                                pricetype.DiscountPrice = proxyopcode.PriceType.DiscountPrice;
                                                pricetype.DiscountRate = proxyopcode.PriceType.DiscountRate;
                                                pricetype.TotalPrice = proxyopcode.PriceType.TotalPrice;
                                                pricetype.TotalPriceIncludeTax = proxyopcode.PriceType.TotalPriceIncludeTax;
                                                pricetype.UnitPrice = proxyopcode.PriceType.UnitPrice;
                                                opcode.PriceType = pricetype;
                                            }
                                            #endregion

                                            #region //Prices OPCode Parts
                                            if (proxyopcode.Parts != null && proxyopcode.Parts.Length > 0)
                                            {
                                                opcode.Parts = new List<Data.v2.HMCIS.Price.Part>();
                                                foreach (_WA.Mapper.v2.Price.Part1 proxypart in proxyopcode.Parts)
                                                {
                                                    #region //Prices OPCode Part Header
                                                    Data.v2.HMCIS.Price.Part part = new Data.v2.HMCIS.Price.Part();
                                                    part.Manufacturer = proxypart.Manufacturer;
                                                    part.PartNumber = proxypart.PartNumber;
                                                    part.Quantity = proxypart.Quantity;
                                                    part.ServiceType = proxypart.ServiceType;
                                                    #endregion

                                                    #region //Prices OPCode Part PriceType
                                                    if (proxypart.PriceType != null)
                                                    {
                                                        PriceType pricetype = new PriceType();
                                                        pricetype.DiscountPrice = proxypart.PriceType.DiscountPrice;
                                                        pricetype.DiscountRate = proxypart.PriceType.DiscountRate;
                                                        pricetype.TotalPrice = proxypart.PriceType.TotalPrice;
                                                        pricetype.TotalPriceIncludeTax = proxypart.PriceType.TotalPriceIncludeTax;
                                                        pricetype.UnitPrice = proxypart.PriceType.UnitPrice;
                                                        part.PriceType = pricetype;
                                                    }
                                                    #endregion

                                                    opcode.Parts.Add(part);
                                                }
                                            }
                                            #endregion

                                            price.OPCodes.Add(opcode);
                                        }
                                        #endregion
                                    }

                                    response.Price = price;

                                    #endregion
                                }
                                else
                                {
                                    response.ResultMessage = GetResultMessageData(ResponseCode.NoResult, ResponseMessage.NoResult);
                                }
                                #endregion
                            }
                        }
                        else
                        {
                            if (response.Errors != null)
                                response.Errors.Add(GetErrorData(ResponseCode.Fail, ResponseMessage.Fail));
                            else
                                response.Errors = GetErrorDataList(ResponseCode.Fail, ResponseMessage.Fail);
                        }
                        #endregion
                    }
                    break;
                case "v2.HMCIS.1C.v4":
                    {
                        #region v2.HMCIS.1C.v4 - RTR (Proxy Class Dll Name : _1C.v4)

                        #region PriceCheck Request Set

                        //Create proxy credential
                        NetworkCredential proxycredential = new NetworkCredential(request.TransactionHeader.Username, request.TransactionHeader.Password);

                        //Create proxy web service from dms web service with credential
                        _1C.v4.Price.Price proxyws = new _1C.v4.Price.Price(request.TransactionHeader.DMSServerUrl);
                        proxyws.Credentials = proxycredential;

                        //Create proxy request with pricecheck and transaction
                        _1C.v4.Price.PriceCheckRequest proxyrequest = new _1C.v4.Price.PriceCheckRequest();

                        //Create proxy transaction
                        _1C.v4.Price.TransactionHeader proxytransactionheader = new _1C.v4.Price.TransactionHeader();
                        if (request.TransactionHeader != null)
                        {
                            #region//TransactionHeader Set
                            proxytransactionheader.CountryID = request.TransactionHeader.CountryID;
                            proxytransactionheader.DealerID = request.TransactionHeader.DealerID;
                            proxytransactionheader.DistributorID = request.TransactionHeader.DistributorID;
                            proxytransactionheader.DMSCode = request.TransactionHeader.DMSCode;
                            proxytransactionheader.DMSServerUrl = request.TransactionHeader.DMSServerUrl;
                            proxytransactionheader.DMSVersion = request.TransactionHeader.DMSVersion;
                            proxytransactionheader.DocumentVersion = request.TransactionHeader.DocumentVersion;
                            proxytransactionheader.GroupID = request.TransactionHeader.GroupID;
                            proxytransactionheader.IneterfaceID = request.TransactionHeader.IneterfaceID;
                            proxytransactionheader.Password = request.TransactionHeader.Password;
                            proxytransactionheader.PollingToken = request.TransactionHeader.PollingToken;
                            proxytransactionheader.RequestPollingToken = request.TransactionHeader.RequestPollingToken;
                            proxytransactionheader.RequestType = request.TransactionHeader.RequestType;
                            proxytransactionheader.TransactionId = request.TransactionHeader.TransactionId;
                            proxytransactionheader.TransactionDateTimeLocal = request.TransactionHeader.TransactionDateTimeLocal;
                            proxytransactionheader.TransactionDateTimeUTC = request.TransactionHeader.TransactionDateTimeUTC;
                            proxytransactionheader.TransactionType = request.TransactionHeader.TransactionType;
                            proxytransactionheader.Username = request.TransactionHeader.Username;
                            proxytransactionheader.VenderTrackingCode = request.TransactionHeader.VenderTrackingCode;
                            proxyrequest.TransactionHeader = proxytransactionheader;
                            #endregion
                        }

                        //Create proxy pricecheck
                        _1C.v4.Price.PriceCheck proxypricecheck = new _1C.v4.Price.PriceCheck();
                        if (request.PriceCheck != null)
                        {
                            #region//PriceCheck Header
                            proxypricecheck.DMSRONo = request.PriceCheck.DMSRONo;
                            #endregion

                            #region//PriceCheck OPCodes
                            if (request.PriceCheck.OPCodes != null && request.PriceCheck.OPCodes.Count > 0)
                            {
                                int opcodescnt = 0;
                                _1C.v4.Price.OPCode[] proxyopcodes = new _1C.v4.Price.OPCode[request.PriceCheck.OPCodes.Count];
                                foreach (Data.v2.HMCIS.Price.OPCode opcode in request.PriceCheck.OPCodes)
                                {
                                    #region//PriceCheck OPCode Header
                                    _1C.v4.Price.OPCode proxyopcode = new _1C.v4.Price.OPCode();
                                    proxyopcode.Code = opcode.Code;
                                    proxyopcode.Engine = opcode.Engine;
                                    proxyopcode.Make = opcode.Make;
                                    proxyopcode.Mileage = opcode.Mileage;
                                    proxyopcode.Model = opcode.Model;
                                    proxyopcode.Period = opcode.Period;
                                    proxyopcode.Year = opcode.Year;
                                    #endregion

                                    #region//PriceCheck OPCode PriceType
                                    if (opcode.PriceType != null)
                                    {
                                        _1C.v4.Price.PriceType proxypricetype = new _1C.v4.Price.PriceType();
                                        proxypricetype.DiscountPrice = opcode.PriceType.DiscountPrice;
                                        proxypricetype.DiscountRate = opcode.PriceType.DiscountRate;
                                        proxypricetype.TotalPrice = opcode.PriceType.TotalPrice;
                                        proxypricetype.TotalPriceIncludeTax = opcode.PriceType.TotalPriceIncludeTax;
                                        proxypricetype.UnitPrice = opcode.PriceType.UnitPrice;
                                        proxyopcode.PriceType = proxypricetype;
                                    }
                                    #endregion

                                    #region//PriceCheck OPCode Parts
                                    if (opcode.Parts != null && opcode.Parts.Count > 0)
                                    {
                                        int partscnt = 0;
                                        _1C.v4.Price.Part[] proxyparts = new _1C.v4.Price.Part[opcode.Parts.Count];
                                        foreach (Data.v2.HMCIS.Price.Part part in opcode.Parts)
                                        {
                                            #region//PriceCheck OPCode Parts Header
                                            _1C.v4.Price.Part proxypart = new _1C.v4.Price.Part();
                                            proxypart.Manufacturer = part.Manufacturer;
                                            proxypart.PartNumber = part.PartNumber;
                                            proxypart.Quantity = part.Quantity;
                                            proxypart.ServiceType = part.ServiceType;
                                            #endregion

                                            #region//PriceCheck OPCode Parts PriceType
                                            if (part.PriceType != null)
                                            {
                                                _1C.v4.Price.PriceType proxypricetype = new _1C.v4.Price.PriceType();
                                                proxypricetype.DiscountPrice = part.PriceType.DiscountPrice;
                                                proxypricetype.DiscountRate = part.PriceType.DiscountRate;
                                                proxypricetype.TotalPrice = part.PriceType.TotalPrice;
                                                proxypricetype.TotalPriceIncludeTax = part.PriceType.TotalPriceIncludeTax;
                                                proxypricetype.UnitPrice = part.PriceType.UnitPrice;
                                                proxypart.PriceType = proxypricetype;
                                            }
                                            #endregion

                                            proxyparts[partscnt] = proxypart;
                                            partscnt++;
                                        }

                                        proxyopcode.Parts = proxyparts;
                                    }
                                    #endregion

                                    proxyopcodes[opcodescnt] = proxyopcode;
                                    opcodescnt++;
                                }

                                proxypricecheck.OPCodes = proxyopcodes;
                            }
                            #endregion

                            proxyrequest.PriceCheck = proxypricecheck;
                        }
                        #endregion

                        //Run proxy web method with proxy request
                        _1C.v4.Price.PriceCheckResponse proxyresponse = proxyws.PriceCheck(proxyrequest);

                        //Mapping with Standard Interface Specification Object
                        if (proxyresponse != null)
                        {
                            if (proxyresponse.TransactionHeader != null)
                            {
                                #region//TransactionHeader Set
                                TransactionHeader transactionheader = new TransactionHeader();
                                transactionheader.CountryID = proxyresponse.TransactionHeader.CountryID;
                                transactionheader.DealerID = proxyresponse.TransactionHeader.DealerID;
                                transactionheader.DistributorID = proxyresponse.TransactionHeader.DistributorID;
                                transactionheader.DMSCode = proxyresponse.TransactionHeader.DMSCode;
                                transactionheader.DMSServerUrl = proxyresponse.TransactionHeader.DMSServerUrl;
                                transactionheader.DMSVersion = proxyresponse.TransactionHeader.DMSVersion;
                                transactionheader.DocumentVersion = proxyresponse.TransactionHeader.DocumentVersion;
                                transactionheader.GroupID = proxyresponse.TransactionHeader.GroupID;
                                transactionheader.IneterfaceID = proxyresponse.TransactionHeader.IneterfaceID;
                                transactionheader.Password = proxyresponse.TransactionHeader.Password;
                                transactionheader.PollingToken = proxyresponse.TransactionHeader.PollingToken;
                                transactionheader.RequestPollingToken = proxyresponse.TransactionHeader.RequestPollingToken;
                                transactionheader.RequestType = proxyresponse.TransactionHeader.RequestType;
                                transactionheader.TransactionId = proxyresponse.TransactionHeader.TransactionId;
                                transactionheader.TransactionDateTimeLocal = proxyresponse.TransactionHeader.TransactionDateTimeLocal;
                                transactionheader.TransactionDateTimeUTC = proxyresponse.TransactionHeader.TransactionDateTimeUTC;
                                transactionheader.TransactionType = proxyresponse.TransactionHeader.TransactionType;
                                transactionheader.Username = proxyresponse.TransactionHeader.Username;
                                transactionheader.VenderTrackingCode = proxyresponse.TransactionHeader.VenderTrackingCode;
                                response.TransactionHeader = transactionheader;
                                #endregion
                            }

                            //ResultMessage Set
                            if (proxyresponse.ResultMessage != null)
                            {
                                response.ResultMessage = GetResultMessageData(proxyresponse.ResultMessage.Code, proxyresponse.ResultMessage.Message);
                            }

                            if (proxyresponse.Errors != null)
                            {
                                //Error List Set
                                foreach (_1C.v4.Price.Error proxyerror in proxyresponse.Errors)
                                {
                                    if (response.Errors != null)
                                        response.Errors.Add(GetErrorData(proxyerror.Code, proxyerror.Message));
                                    else
                                        response.Errors = GetErrorDataList(proxyerror.Code, proxyerror.Message);
                                }
                            }
                            else
                            {
                                #region //PriceCheckResponse Set

                                if (proxyresponse.Price != null)
                                {
                                    #region//PricesGetResponse Set

                                    _1C.v4.Price.Price1 proxyprice = proxyresponse.Price;

                                    #region //Prices Header
                                    Price price = new Price();
                                    price.LaborCampaignDiscountAmount = proxyprice.LaborCampaignDiscountAmount;
                                    price.PartsCampaignDiscountAmount = proxyprice.PartsCampaignDiscountAmount;
                                    price.TotalAmount = proxyprice.TotalAmount;
                                    price.TotalCampaignDiscountAmount = proxyprice.TotalCampaignDiscountAmount;
                                    price.VATAmount = proxyprice.VATAmount;
                                    #endregion

                                    if (proxyprice.OPCodes != null && proxyprice.OPCodes.Length > 0)
                                    {
                                        #region//Prices OPCode
                                        price.OPCodes = new List<Data.v2.HMCIS.Price.OPCode>();
                                        foreach (_1C.v4.Price.OPCode1 proxyopcode in proxyprice.OPCodes)
                                        {
                                            #region //Prices OPCode Header
                                            Data.v2.HMCIS.Price.OPCode opcode = new Data.v2.HMCIS.Price.OPCode();
                                            opcode.Code = proxyopcode.Code;
                                            opcode.Engine = proxyopcode.Engine;
                                            opcode.Make = proxyopcode.Make;
                                            opcode.Mileage = proxyopcode.Mileage;
                                            opcode.Model = proxyopcode.Model;
                                            opcode.Period = proxyopcode.Period;
                                            opcode.Year = proxyopcode.Year;
                                            //opcode.Quantity = proxyopcode.Quantity;
                                            #endregion

                                            #region //Prices OPCode PriceType
                                            if (proxyopcode.PriceType != null)
                                            {
                                                PriceType pricetype = new PriceType();
                                                pricetype.DiscountPrice = proxyopcode.PriceType.DiscountPrice;
                                                pricetype.DiscountRate = proxyopcode.PriceType.DiscountRate;
                                                pricetype.TotalPrice = proxyopcode.PriceType.TotalPrice;
                                                pricetype.TotalPriceIncludeTax = proxyopcode.PriceType.TotalPriceIncludeTax;
                                                pricetype.UnitPrice = proxyopcode.PriceType.UnitPrice;
                                                opcode.PriceType = pricetype;
                                            }
                                            #endregion

                                            #region //Prices OPCode Parts
                                            if (proxyopcode.Parts != null && proxyopcode.Parts.Length > 0)
                                            {
                                                opcode.Parts = new List<Data.v2.HMCIS.Price.Part>();
                                                foreach (_1C.v4.Price.Part1 proxypart in proxyopcode.Parts)
                                                {
                                                    #region //Prices OPCode Part Header
                                                    Data.v2.HMCIS.Price.Part part = new Data.v2.HMCIS.Price.Part();
                                                    part.Manufacturer = proxypart.Manufacturer;
                                                    part.PartNumber = proxypart.PartNumber;
                                                    part.Quantity = proxypart.Quantity;
                                                    part.ServiceType = proxypart.ServiceType;
                                                    #endregion

                                                    #region //Prices OPCode Part PriceType
                                                    if (proxypart.PriceType != null)
                                                    {
                                                        PriceType pricetype = new PriceType();
                                                        pricetype.DiscountPrice = proxypart.PriceType.DiscountPrice;
                                                        pricetype.DiscountRate = proxypart.PriceType.DiscountRate;
                                                        pricetype.TotalPrice = proxypart.PriceType.TotalPrice;
                                                        pricetype.TotalPriceIncludeTax = proxypart.PriceType.TotalPriceIncludeTax;
                                                        pricetype.UnitPrice = proxypart.PriceType.UnitPrice;
                                                        part.PriceType = pricetype;
                                                    }
                                                    #endregion

                                                    opcode.Parts.Add(part);
                                                }
                                            }
                                            #endregion

                                            price.OPCodes.Add(opcode);
                                        }
                                        #endregion
                                    }

                                    response.Price = price;

                                    #endregion
                                }
                                else
                                {
                                    response.ResultMessage = GetResultMessageData(ResponseCode.NoResult, ResponseMessage.NoResult);
                                }
                                #endregion
                            }
                        }
                        else
                        {
                            if (response.Errors != null)
                                response.Errors.Add(GetErrorData(ResponseCode.Fail, ResponseMessage.Fail));
                            else
                                response.Errors = GetErrorDataList(ResponseCode.Fail, ResponseMessage.Fail);
                        }
                        #endregion
                    }
                    break;
                default: response.Errors = new List<Error>() { new Error() { Code = ResponseCode.NoMatchedProxy, Message = ResponseMessage.NoMatchedProxy } };
                    break;
            }

            return response;
        }
        public CustomerVehicleGetResponse CustomerVehicleGet(CustomerVehicleGetRequest request)
        {
            CustomerVehicleGetResponse response = new CustomerVehicleGetResponse();

            //DMS information set by dealer information
            string proxypath = string.Format("{0}.{1}.{2}.{3}",
                request.TransactionHeader.DocumentVersion,
                request.TransactionHeader.DistributorID,
                request.TransactionHeader.DMSCode,
                request.TransactionHeader.DMSVersion);

            switch (proxypath)
            {
                case "v2.Common.WA.v2":
                    {
                        #region v2.Common.WA.v2 - RTR (Proxy Class Dll Name : _WA.Mapper.v2)

                        #region CustomerVehicleGet Request Set

                        //Create proxy credential
                        NetworkCredential proxycredential = new NetworkCredential(request.TransactionHeader.Username, request.TransactionHeader.Password);

                        //Create proxy web service from dms web service with credential
                        _WA.Mapper.v2.CustomerVehicle.CustomerVehicle proxyws = new _WA.Mapper.v2.CustomerVehicle.CustomerVehicle(request.TransactionHeader.DMSServerUrl);
                        proxyws.Credentials = proxycredential;

                        //Create proxy request with customervehicleget and transaction
                        _WA.Mapper.v2.CustomerVehicle.CustomerVehicleGetRequest proxyrequest = new _WA.Mapper.v2.CustomerVehicle.CustomerVehicleGetRequest();

                        //Create proxy transaction
                        _WA.Mapper.v2.CustomerVehicle.TransactionHeader proxytransactionheader = new _WA.Mapper.v2.CustomerVehicle.TransactionHeader();
                        if (request.TransactionHeader != null)
                        {
                            #region//TransactionHeader Set
                            proxytransactionheader.CountryID = request.TransactionHeader.CountryID;
                            proxytransactionheader.DealerID = request.TransactionHeader.DealerID;
                            proxytransactionheader.DistributorID = request.TransactionHeader.DistributorID;
                            proxytransactionheader.DMSCode = request.TransactionHeader.DMSCode;
                            proxytransactionheader.DMSServerUrl = request.TransactionHeader.DMSServerUrl;
                            proxytransactionheader.DMSVersion = request.TransactionHeader.DMSVersion;
                            proxytransactionheader.DocumentVersion = request.TransactionHeader.DocumentVersion;
                            proxytransactionheader.GroupID = request.TransactionHeader.GroupID;
                            proxytransactionheader.IneterfaceID = request.TransactionHeader.IneterfaceID;
                            proxytransactionheader.Password = request.TransactionHeader.Password;
                            proxytransactionheader.PollingToken = request.TransactionHeader.PollingToken;
                            proxytransactionheader.RequestPollingToken = request.TransactionHeader.RequestPollingToken;
                            proxytransactionheader.RequestType = request.TransactionHeader.RequestType;
                            proxytransactionheader.TransactionId = request.TransactionHeader.TransactionId;
                            proxytransactionheader.TransactionDateTimeLocal = request.TransactionHeader.TransactionDateTimeLocal;
                            proxytransactionheader.TransactionDateTimeUTC = request.TransactionHeader.TransactionDateTimeUTC;
                            proxytransactionheader.TransactionType = request.TransactionHeader.TransactionType;
                            proxytransactionheader.Username = request.TransactionHeader.Username;
                            proxytransactionheader.VenderTrackingCode = request.TransactionHeader.VenderTrackingCode;
                            proxyrequest.TransactionHeader = proxytransactionheader;
                            #endregion
                        }

                        //Create proxy customervehicleget
                        _WA.Mapper.v2.CustomerVehicle.CustomerVehicleGet proxycustomervehicleget = new _WA.Mapper.v2.CustomerVehicle.CustomerVehicleGet();
                        if (request.CustomerVehicleGet != null)
                        {
                            #region//CustomerVehicleGet Customer
                            if (request.CustomerVehicleGet.Customer != null)
                            {
                                _WA.Mapper.v2.CustomerVehicle.Customer customerget = new _WA.Mapper.v2.CustomerVehicle.Customer();
                                customerget.CardNo = request.CustomerVehicleGet.Customer.CardNo;
                                customerget.DMSCustomerNo = request.CustomerVehicleGet.Customer.DMSCustomerNo;
                                customerget.Email = request.CustomerVehicleGet.Customer.Email;
                                customerget.LastName = request.CustomerVehicleGet.Customer.LastName;

                                if (request.CustomerVehicleGet.Customer.Contacts != null && request.CustomerVehicleGet.Customer.Contacts.Count > 0)
                                {
                                    int contactcnt = 0;
                                    _WA.Mapper.v2.CustomerVehicle.Contact[] proxycontacts = new _WA.Mapper.v2.CustomerVehicle.Contact[request.CustomerVehicleGet.Customer.Contacts.Count];
                                    foreach (WA.Standard.IF.Data.v2.Common.CustomerVehicle.Contact contact in request.CustomerVehicleGet.Customer.Contacts)
                                    {
                                        _WA.Mapper.v2.CustomerVehicle.Contact proxycontact = new _WA.Mapper.v2.CustomerVehicle.Contact();
                                        proxycontact.ContactType = contact.ContactType;
                                        proxycontact.ContactValue = contact.ContactValue;
                                        proxycontacts[contactcnt] = proxycontact;
                                        contactcnt++;
                                    }
                                    customerget.Contacts = proxycontacts;
                                }

                                proxycustomervehicleget.Customer = customerget;
                            }
                            #endregion

                            #region//CustomerVehicleGet Vehicle
                            if (request.CustomerVehicleGet.Vehicle != null)
                            {
                                _WA.Mapper.v2.CustomerVehicle.Vehicle proxyvehicle = new _WA.Mapper.v2.CustomerVehicle.Vehicle();
                                proxyvehicle.DMSVehicleNo = request.CustomerVehicleGet.Vehicle.DMSVehicleNo;
                                proxyvehicle.LastSixVIN = request.CustomerVehicleGet.Vehicle.LastSixVIN;
                                proxyvehicle.LicensePlateNo = request.CustomerVehicleGet.Vehicle.LicensePlateNo;
                                proxyvehicle.VIN = request.CustomerVehicleGet.Vehicle.VIN;
                                proxycustomervehicleget.Vehicle = proxyvehicle;
                            }
                            #endregion

                            proxyrequest.CustomerVehicleGet = proxycustomervehicleget;
                        }
                        #endregion

                        //Run proxy web method with proxy request
                        _WA.Mapper.v2.CustomerVehicle.CustomerVehicleGetResponse proxyresponse = proxyws.CustomerVehicleGet(proxyrequest);

                        //Mapping with Standard Interface Specification Object
                        if (proxyresponse != null)
                        {
                            if (proxyresponse.TransactionHeader != null)
                            {
                                #region//TransactionHeader Set
                                TransactionHeader transactionheader = new TransactionHeader();
                                transactionheader.CountryID = proxyresponse.TransactionHeader.CountryID;
                                transactionheader.DealerID = proxyresponse.TransactionHeader.DealerID;
                                transactionheader.DistributorID = proxyresponse.TransactionHeader.DistributorID;
                                transactionheader.DMSCode = proxyresponse.TransactionHeader.DMSCode;
                                transactionheader.DMSServerUrl = proxyresponse.TransactionHeader.DMSServerUrl;
                                transactionheader.DMSVersion = proxyresponse.TransactionHeader.DMSVersion;
                                transactionheader.DocumentVersion = proxyresponse.TransactionHeader.DocumentVersion;
                                transactionheader.GroupID = proxyresponse.TransactionHeader.GroupID;
                                transactionheader.IneterfaceID = proxyresponse.TransactionHeader.IneterfaceID;
                                transactionheader.Password = proxyresponse.TransactionHeader.Password;
                                transactionheader.PollingToken = proxyresponse.TransactionHeader.PollingToken;
                                transactionheader.RequestPollingToken = proxyresponse.TransactionHeader.RequestPollingToken;
                                transactionheader.RequestType = proxyresponse.TransactionHeader.RequestType;
                                transactionheader.TransactionId = proxyresponse.TransactionHeader.TransactionId;
                                transactionheader.TransactionDateTimeLocal = proxyresponse.TransactionHeader.TransactionDateTimeLocal;
                                transactionheader.TransactionDateTimeUTC = proxyresponse.TransactionHeader.TransactionDateTimeUTC;
                                transactionheader.TransactionType = proxyresponse.TransactionHeader.TransactionType;
                                transactionheader.Username = proxyresponse.TransactionHeader.Username;
                                transactionheader.VenderTrackingCode = proxyresponse.TransactionHeader.VenderTrackingCode;
                                response.TransactionHeader = transactionheader;
                                #endregion
                            }

                            //ResultMessage Set
                            if (proxyresponse.ResultMessage != null)
                            {
                                response.ResultMessage = GetResultMessageData(proxyresponse.ResultMessage.Code, proxyresponse.ResultMessage.Message);
                            }

                            if (proxyresponse.Errors != null)
                            {
                                //Error List Set
                                foreach (_WA.Mapper.v2.CustomerVehicle.Error proxyerror in proxyresponse.Errors)
                                {
                                    if (response.Errors != null)
                                        response.Errors.Add(GetErrorData(proxyerror.Code, proxyerror.Message));
                                    else
                                        response.Errors = GetErrorDataList(proxyerror.Code, proxyerror.Message);
                                }
                            }
                            else
                            {
                                #region //CustomerVehicleGetResponse Set

                                if (proxyresponse.CustomerVehicles != null && proxyresponse.CustomerVehicles.Length > 0)
                                {
                                    response.CustomerVehicles = new List<CustomerVehicle>();
                                    foreach (_WA.Mapper.v2.CustomerVehicle.CustomerVehicle1 proxycustomervehicle in proxyresponse.CustomerVehicles)
                                    {
                                        #region //CustomerVehicle Header
                                        CustomerVehicle customervehicle = new CustomerVehicle();
                                        #endregion

                                        #region //CustomerVehicle Customer & Vehicle
                                        if (proxycustomervehicle.Customer != null && proxycustomervehicle.Vehicle != null)
                                        {
                                            #region //CustomerVehicle Customer Header
                                            Data.v2.Common.Customer.Customer customer = new Data.v2.Common.Customer.Customer();
                                            customer.CardNo = proxycustomervehicle.Customer.CardNo;
                                            customer.CustomerInfoType = proxycustomervehicle.Customer.CustomerInfoType;
                                            customer.DMSCustomerNo = proxycustomervehicle.Customer.DMSCustomerNo;
                                            customer.Email = proxycustomervehicle.Customer.Email;
                                            customer.FirstName = proxycustomervehicle.Customer.FirstName;
                                            customer.FullName = proxycustomervehicle.Customer.FullName;
                                            customer.Gender = proxycustomervehicle.Customer.Gender;
                                            customer.LastName = proxycustomervehicle.Customer.LastName;
                                            customer.MiddleName = proxycustomervehicle.Customer.MiddleName;
                                            customer.Salutation = proxycustomervehicle.Customer.Salutation;
                                            #endregion

                                            #region //CustomerVehicle Customer SpecialMessage
                                            if (proxycustomervehicle.Customer.SpecialMessage != null)
                                            {
                                                SpecialMessage specialmessage = new SpecialMessage();
                                                specialmessage.Message = proxycustomervehicle.Customer.SpecialMessage.Message;
                                                customer.SpecialMessage = specialmessage;
                                            }
                                            #endregion

                                            #region //CustomerVehicle Customer Addresses
                                            if (proxycustomervehicle.Customer.Addresses != null && proxycustomervehicle.Customer.Addresses.Length > 0)
                                            {
                                                customer.Addresses = new List<Address>();
                                                foreach (_WA.Mapper.v2.CustomerVehicle.Address proxyaddress in proxycustomervehicle.Customer.Addresses)
                                                {
                                                    Address address = new Address();
                                                    address.Address1 = proxyaddress.Address1;
                                                    address.Address2 = proxyaddress.Address2;
                                                    address.AddressType = proxyaddress.AddressType;
                                                    address.City = proxyaddress.City;
                                                    address.Country = proxyaddress.Country;
                                                    address.State = proxyaddress.State;
                                                    address.ZipCode = proxyaddress.ZipCode;
                                                    customer.Addresses.Add(address);
                                                }
                                            }
                                            #endregion

                                            #region //CustomerVehicle Customer Contacts
                                            if (proxycustomervehicle.Customer.Contacts != null && proxycustomervehicle.Customer.Contacts.Length > 0)
                                            {
                                                customer.Contacts = new List<WA.Standard.IF.Data.v2.Common.Customer.Contact>();
                                                foreach (_WA.Mapper.v2.CustomerVehicle.Contact1 proxycontact in proxycustomervehicle.Customer.Contacts)
                                                {
                                                    WA.Standard.IF.Data.v2.Common.Customer.Contact contact = new WA.Standard.IF.Data.v2.Common.Customer.Contact();
                                                    contact.ContactMethodYN = string.IsNullOrEmpty(proxycontact.ContactMethodYN) ? "" : proxycontact.ContactMethodYN;
                                                    contact.ContactType = string.IsNullOrEmpty(proxycontact.ContactType) ? "" : proxycontact.ContactType;
                                                    contact.ContactValue = string.IsNullOrEmpty(proxycontact.ContactValue) ? "" : proxycontact.ContactValue;
                                                    customer.Contacts.Add(contact);
                                                }
                                            }
                                            #endregion

                                            #region //CustomerVehicle Customer CorporateInfos
                                            if (proxycustomervehicle.Customer.CorporateInfos != null && proxycustomervehicle.Customer.CorporateInfos.Length > 0)
                                            {
                                                customer.CorporateInfos = new List<WA.Standard.IF.Data.v2.Common.Customer.CorporateInfo>();
                                                foreach (_WA.Mapper.v2.CustomerVehicle.CorporateInfo proxycorporateinfo in proxycustomervehicle.Customer.CorporateInfos)
                                                {
                                                    WA.Standard.IF.Data.v2.Common.Customer.CorporateInfo corporateinfo = new WA.Standard.IF.Data.v2.Common.Customer.CorporateInfo();
                                                    corporateinfo.CorporateInfoName = proxycorporateinfo.Name;
                                                    corporateinfo.CorporateInfoValue = proxycorporateinfo.Value;
                                                    customer.CorporateInfos.Add(corporateinfo);
                                                }
                                            }
                                            #endregion

                                            customervehicle.Customer = customer;

                                            #region//CustomerVehicle Vehicle Header
                                            Data.v2.Common.Vehicle.Vehicle vehicle = new Data.v2.Common.Vehicle.Vehicle();
                                            vehicle.Color = proxycustomervehicle.Vehicle.Color;
                                            vehicle.Cylinders = proxycustomervehicle.Vehicle.Cylinders;
                                            vehicle.DateDelivered = proxycustomervehicle.Vehicle.DateDelivered;
                                            vehicle.DateInService = proxycustomervehicle.Vehicle.DateInService;
                                            vehicle.DeclinedJob = proxycustomervehicle.Vehicle.DeclinedJob;
                                            vehicle.DisplayDescription = proxycustomervehicle.Vehicle.DisplayDescription;
                                            vehicle.DMSVehicleNo = proxycustomervehicle.Vehicle.DMSVehicleNo;
                                            vehicle.EngineType = proxycustomervehicle.Vehicle.EngineType;
                                            vehicle.ExtendedWarranty = proxycustomervehicle.Vehicle.ExtendedWarranty;
                                            vehicle.FuelType = proxycustomervehicle.Vehicle.FuelType;
                                            vehicle.FullModelName = proxycustomervehicle.Vehicle.FullModelName;
                                            vehicle.InsuranceDate = proxycustomervehicle.Vehicle.InsuranceDate;
                                            vehicle.LastMileage = proxycustomervehicle.Vehicle.LastMileage;
                                            vehicle.LastServiceDate = proxycustomervehicle.Vehicle.LastServiceDate;
                                            //vehicle.LastSixVIN = proxycustomervehicle.Vehicle.VIN;  // not exists ??????
                                            vehicle.LicenseNumber = proxycustomervehicle.Vehicle.LicenseNumber;
                                            vehicle.LicensePlateNo = proxycustomervehicle.Vehicle.LicensePlateNo;
                                            vehicle.Make = proxycustomervehicle.Vehicle.Make;
                                            vehicle.ModelCode = proxycustomervehicle.Vehicle.ModelCode;
                                            vehicle.ModelName = proxycustomervehicle.Vehicle.ModelName;
                                            vehicle.ModelYear = proxycustomervehicle.Vehicle.ModelYear;
                                            vehicle.PendingJob = proxycustomervehicle.Vehicle.PendingJob;
                                            vehicle.StockNumber = proxycustomervehicle.Vehicle.StockNumber;
                                            vehicle.Trim = proxycustomervehicle.Vehicle.Trim;
                                            vehicle.VehicleType = proxycustomervehicle.Vehicle.VehicleType;
                                            vehicle.VIN = proxycustomervehicle.Vehicle.VIN;
                                            vehicle.WarrantyMiles = proxycustomervehicle.Vehicle.WarrantyMiles;
                                            vehicle.WarrantyMonths = proxycustomervehicle.Vehicle.WarrantyMonths;
                                            vehicle.WarrantyStartDate = proxycustomervehicle.Vehicle.WarrantyStartDate;
                                            #endregion

                                            #region//CustomerVehicle Vehicle Campaigns
                                            if (proxycustomervehicle.Vehicle.Campaigns != null && proxycustomervehicle.Vehicle.Campaigns.Length > 0)
                                            {
                                                vehicle.Campaigns = new List<Data.v2.Common.Vehicle.Campaign>();
                                                foreach (_WA.Mapper.v2.CustomerVehicle.Campaign proxycampaign in proxycustomervehicle.Vehicle.Campaigns)
                                                {
                                                    Data.v2.Common.Vehicle.Campaign campaign = new Data.v2.Common.Vehicle.Campaign();
                                                    campaign.CampaignDescription = proxycampaign.CampaignDescription;
                                                    campaign.CampaignID = proxycampaign.CampaignID;
                                                    campaign.CampaignPerformed = proxycampaign.CampaignPerformed;
                                                    vehicle.Campaigns.Add(campaign);
                                                }
                                            }
                                            #endregion

                                            customervehicle.Vehicle = vehicle;

                                            response.CustomerVehicles.Add(customervehicle);
                                        }
                                        #endregion
                                    }
                                }
                                else
                                {
                                    response.ResultMessage = GetResultMessageData(ResponseCode.NoResult, ResponseMessage.NoResult);
                                }
                                #endregion
                            }
                        }
                        else
                        {
                            if (response.Errors != null)
                                response.Errors.Add(GetErrorData(ResponseCode.Fail, ResponseMessage.Fail));
                            else
                                response.Errors = GetErrorDataList(ResponseCode.Fail, ResponseMessage.Fail);
                        }
                        #endregion
                    }
                    break;
                case "v2.HMCIS.1C.v4":
                    {
                        #region v2.HMCIS.1C.v4 - RTR (Proxy Class Dll Name : _1C.v4)

                        #region CustomerVehicleGet Request Set

                        //Create proxy credential
                        NetworkCredential proxycredential = new NetworkCredential(request.TransactionHeader.Username, request.TransactionHeader.Password);

                        //Create proxy web service from dms web service with credential
                        _1C.v4.CustomerVehicle.CustomerVehicle proxyws = new _1C.v4.CustomerVehicle.CustomerVehicle(request.TransactionHeader.DMSServerUrl);
                        proxyws.Credentials = proxycredential;

                        //Create proxy request with customervehicleget and transaction
                        _1C.v4.CustomerVehicle.CustomerVehicleGetRequest proxyrequest = new _1C.v4.CustomerVehicle.CustomerVehicleGetRequest();

                        //Create proxy transaction
                        _1C.v4.CustomerVehicle.TransactionHeader proxytransactionheader = new _1C.v4.CustomerVehicle.TransactionHeader();
                        if (request.TransactionHeader != null)
                        {
                            #region//TransactionHeader Set
                            proxytransactionheader.CountryID = request.TransactionHeader.CountryID;
                            proxytransactionheader.DealerID = request.TransactionHeader.DealerID;
                            proxytransactionheader.DistributorID = request.TransactionHeader.DistributorID;
                            proxytransactionheader.DMSCode = request.TransactionHeader.DMSCode;
                            proxytransactionheader.DMSServerUrl = request.TransactionHeader.DMSServerUrl;
                            proxytransactionheader.DMSVersion = request.TransactionHeader.DMSVersion;
                            proxytransactionheader.DocumentVersion = request.TransactionHeader.DocumentVersion;
                            proxytransactionheader.GroupID = request.TransactionHeader.GroupID;
                            proxytransactionheader.IneterfaceID = request.TransactionHeader.IneterfaceID;
                            proxytransactionheader.Password = request.TransactionHeader.Password;
                            proxytransactionheader.PollingToken = request.TransactionHeader.PollingToken;
                            proxytransactionheader.RequestPollingToken = request.TransactionHeader.RequestPollingToken;
                            proxytransactionheader.RequestType = request.TransactionHeader.RequestType;
                            proxytransactionheader.TransactionId = request.TransactionHeader.TransactionId;
                            proxytransactionheader.TransactionDateTimeLocal = request.TransactionHeader.TransactionDateTimeLocal;
                            proxytransactionheader.TransactionDateTimeUTC = request.TransactionHeader.TransactionDateTimeUTC;
                            proxytransactionheader.TransactionType = request.TransactionHeader.TransactionType;
                            proxytransactionheader.Username = request.TransactionHeader.Username;
                            proxytransactionheader.VenderTrackingCode = request.TransactionHeader.VenderTrackingCode;
                            proxyrequest.TransactionHeader = proxytransactionheader;
                            #endregion
                        }

                        //Create proxy customervehicleget
                        _1C.v4.CustomerVehicle.CustomerVehicleGet proxycustomervehicleget = new _1C.v4.CustomerVehicle.CustomerVehicleGet();
                        if (request.CustomerVehicleGet != null)
                        {
                            #region//CustomerVehicleGet Customer
                            if (request.CustomerVehicleGet.Customer != null)
                            {
                                _1C.v4.CustomerVehicle.CustomerGet customerget = new _1C.v4.CustomerVehicle.CustomerGet();
                                customerget.CardNo = request.CustomerVehicleGet.Customer.CardNo;
                                customerget.DMSCustomerNo = request.CustomerVehicleGet.Customer.DMSCustomerNo;
                                customerget.Email = request.CustomerVehicleGet.Customer.Email;
                                customerget.LastName = request.CustomerVehicleGet.Customer.LastName;

                                if (request.CustomerVehicleGet.Customer.Contacts != null && request.CustomerVehicleGet.Customer.Contacts.Count > 0)
                                {
                                    int contactcnt = 0;
                                    _1C.v4.CustomerVehicle.Contact[] proxycontacts = new _1C.v4.CustomerVehicle.Contact[request.CustomerVehicleGet.Customer.Contacts.Count];
                                    foreach (WA.Standard.IF.Data.v2.Common.CustomerVehicle.Contact contact in request.CustomerVehicleGet.Customer.Contacts)
                                    {
                                        _1C.v4.CustomerVehicle.Contact proxycontact = new _1C.v4.CustomerVehicle.Contact();
                                        proxycontact.ContactType = contact.ContactType;
                                        proxycontact.ContactValue = contact.ContactValue;
                                        proxycontacts[contactcnt] = proxycontact;
                                        contactcnt++;
                                    }
                                    customerget.Contacts = proxycontacts;
                                }

                                proxycustomervehicleget.CustomerGet = customerget;
                            }
                            #endregion

                            #region//CustomerVehicleGet Vehicle
                            if (request.CustomerVehicleGet.Vehicle != null)
                            {
                                _1C.v4.CustomerVehicle.VehicleGet proxyvehicle = new _1C.v4.CustomerVehicle.VehicleGet();
                                proxyvehicle.DMSVehicleNo = request.CustomerVehicleGet.Vehicle.DMSVehicleNo;
                                proxyvehicle.LastSixVIN = request.CustomerVehicleGet.Vehicle.LastSixVIN;
                                proxyvehicle.LicensePlateNo = request.CustomerVehicleGet.Vehicle.LicensePlateNo;
                                proxyvehicle.VIN = request.CustomerVehicleGet.Vehicle.VIN;
                                proxycustomervehicleget.VehicleGet = proxyvehicle;
                            }
                            #endregion

                            proxyrequest.CustomerVehicleGet = proxycustomervehicleget;
                        }
                        #endregion

                        //Run proxy web method with proxy request
                        _1C.v4.CustomerVehicle.CustomerVehicleGetResponse proxyresponse = proxyws.CustomerVehicleGet(proxyrequest);

                        //Mapping with Standard Interface Specification Object
                        if (proxyresponse != null)
                        {
                            if (proxyresponse.TransactionHeader != null)
                            {
                                #region//TransactionHeader Set
                                TransactionHeader transactionheader = new TransactionHeader();
                                transactionheader.CountryID = proxyresponse.TransactionHeader.CountryID;
                                transactionheader.DealerID = proxyresponse.TransactionHeader.DealerID;
                                transactionheader.DistributorID = proxyresponse.TransactionHeader.DistributorID;
                                transactionheader.DMSCode = proxyresponse.TransactionHeader.DMSCode;
                                transactionheader.DMSServerUrl = proxyresponse.TransactionHeader.DMSServerUrl;
                                transactionheader.DMSVersion = proxyresponse.TransactionHeader.DMSVersion;
                                transactionheader.DocumentVersion = proxyresponse.TransactionHeader.DocumentVersion;
                                transactionheader.GroupID = proxyresponse.TransactionHeader.GroupID;
                                transactionheader.IneterfaceID = proxyresponse.TransactionHeader.IneterfaceID;
                                transactionheader.Password = proxyresponse.TransactionHeader.Password;
                                transactionheader.PollingToken = proxyresponse.TransactionHeader.PollingToken;
                                transactionheader.RequestPollingToken = proxyresponse.TransactionHeader.RequestPollingToken;
                                transactionheader.RequestType = proxyresponse.TransactionHeader.RequestType;
                                transactionheader.TransactionId = proxyresponse.TransactionHeader.TransactionId;
                                transactionheader.TransactionDateTimeLocal = proxyresponse.TransactionHeader.TransactionDateTimeLocal;
                                transactionheader.TransactionDateTimeUTC = proxyresponse.TransactionHeader.TransactionDateTimeUTC;
                                transactionheader.TransactionType = proxyresponse.TransactionHeader.TransactionType;
                                transactionheader.Username = proxyresponse.TransactionHeader.Username;
                                transactionheader.VenderTrackingCode = proxyresponse.TransactionHeader.VenderTrackingCode;
                                response.TransactionHeader = transactionheader;
                                #endregion
                            }

                            //ResultMessage Set
                            if (proxyresponse.ResultMessage != null)
                            {
                                response.ResultMessage = GetResultMessageData(proxyresponse.ResultMessage.Code, proxyresponse.ResultMessage.Message);
                            }

                            if (proxyresponse.Errors != null)
                            {
                                //Error List Set
                                foreach (_1C.v4.CustomerVehicle.Error proxyerror in proxyresponse.Errors)
                                {
                                    if (response.Errors != null)
                                        response.Errors.Add(GetErrorData(proxyerror.Code, proxyerror.Message));
                                    else
                                        response.Errors = GetErrorDataList(proxyerror.Code, proxyerror.Message);
                                }
                            }
                            else
                            {
                                #region //CustomerVehicleGetResponse Set

                                if (proxyresponse.CustomerVehicles != null && proxyresponse.CustomerVehicles.Length > 0)
                                {
                                    response.CustomerVehicles = new List<CustomerVehicle>();
                                    foreach (_1C.v4.CustomerVehicle.CustomerVehicle1 proxycustomervehicle in proxyresponse.CustomerVehicles)
                                    {
                                        #region //CustomerVehicle Header
                                        CustomerVehicle customervehicle = new CustomerVehicle();
                                        #endregion

                                        #region //CustomerVehicle Customer & Vehicle
                                        if (proxycustomervehicle.Customer != null && proxycustomervehicle.Vehicle != null)
                                        {
                                            #region //CustomerVehicle Customer Header
                                            Data.v2.Common.Customer.Customer customer = new Data.v2.Common.Customer.Customer();
                                            customer.CardNo = proxycustomervehicle.Customer.CustomerCardNo;
                                            customer.CustomerInfoType = proxycustomervehicle.Customer.CustomerInfoType;
                                            customer.DMSCustomerNo = proxycustomervehicle.Customer.DMSCustomerNo;
                                            customer.Email = proxycustomervehicle.Customer.CustomerEmail;
                                            customer.FirstName = proxycustomervehicle.Customer.CustomerFirstName;
                                            customer.FullName = proxycustomervehicle.Customer.CustomerFullName;
                                            customer.Gender = proxycustomervehicle.Customer.Gender;
                                            customer.LastName = proxycustomervehicle.Customer.CustomerLastName;
                                            customer.MiddleName = proxycustomervehicle.Customer.CustomerMiddleName;
                                            customer.Salutation = proxycustomervehicle.Customer.Salutation;
                                            #endregion

                                            #region //CustomerVehicle Customer SpecialMessage
                                            if (proxycustomervehicle.Customer.CustomerSpecialMessage != null)
                                            {
                                                SpecialMessage specialmessage = new SpecialMessage();
                                                specialmessage.Message = proxycustomervehicle.Customer.CustomerSpecialMessage.Message;
                                                customer.SpecialMessage = specialmessage;
                                            }
                                            #endregion

                                            #region //CustomerVehicle Customer Addresses
                                            if (proxycustomervehicle.Customer.Addresses != null && proxycustomervehicle.Customer.Addresses.Length > 0)
                                            {
                                                customer.Addresses = new List<Address>();
                                                foreach (_1C.v4.CustomerVehicle.Address proxyaddress in proxycustomervehicle.Customer.Addresses)
                                                {
                                                    Address address = new Address();
                                                    address.Address1 = proxyaddress.Address1;
                                                    address.Address2 = proxyaddress.Address2;
                                                    address.AddressType = proxyaddress.AddressType;
                                                    address.City = proxyaddress.City;
                                                    address.Country = proxyaddress.Country;
                                                    address.State = proxyaddress.State;
                                                    address.ZipCode = proxyaddress.ZipCode;
                                                    customer.Addresses.Add(address);
                                                }
                                            }
                                            #endregion

                                            #region //CustomerVehicle Customer Contacts
                                            if (proxycustomervehicle.Customer.Contacts != null && proxycustomervehicle.Customer.Contacts.Length > 0)
                                            {
                                                customer.Contacts = new List<WA.Standard.IF.Data.v2.Common.Customer.Contact>();
                                                foreach (_1C.v4.CustomerVehicle.Contact proxycontact in proxycustomervehicle.Customer.Contacts)
                                                {
                                                    WA.Standard.IF.Data.v2.Common.Customer.Contact contact = new WA.Standard.IF.Data.v2.Common.Customer.Contact();
                                                    contact.ContactMethodYN = string.IsNullOrEmpty(proxycontact.ContactMethodYN) ? "" : proxycontact.ContactMethodYN;
                                                    contact.ContactType = string.IsNullOrEmpty(proxycontact.ContactType) ? "" : proxycontact.ContactType;
                                                    contact.ContactValue = string.IsNullOrEmpty(proxycontact.ContactValue) ? "" : proxycontact.ContactValue;
                                                    customer.Contacts.Add(contact);
                                                }
                                            }
                                            #endregion

                                            #region //CustomerVehicle Customer CorporateInfos
                                            if (proxycustomervehicle.Customer.CorporateInfos != null && proxycustomervehicle.Customer.CorporateInfos.Length > 0)
                                            {
                                                customer.CorporateInfos = new List<WA.Standard.IF.Data.v2.Common.Customer.CorporateInfo>();
                                                foreach (_1C.v4.CustomerVehicle.CorporateInfo proxycorporateinfo in proxycustomervehicle.Customer.CorporateInfos)
                                                {
                                                    WA.Standard.IF.Data.v2.Common.Customer.CorporateInfo corporateinfo = new WA.Standard.IF.Data.v2.Common.Customer.CorporateInfo();
                                                    corporateinfo.CorporateInfoName = proxycorporateinfo.Name;
                                                    corporateinfo.CorporateInfoValue = proxycorporateinfo.Value;
                                                    customer.CorporateInfos.Add(corporateinfo);
                                                }
                                            }
                                            #endregion

                                            customervehicle.Customer = customer;

                                            #region//CustomerVehicle Vehicle Header
                                            Data.v2.Common.Vehicle.Vehicle vehicle = new Data.v2.Common.Vehicle.Vehicle();
                                            vehicle.Color = proxycustomervehicle.Vehicle.Color;
                                            vehicle.Cylinders = proxycustomervehicle.Vehicle.Cylinders;
                                            vehicle.DateDelivered = proxycustomervehicle.Vehicle.DateDelivered;
                                            vehicle.DateInService = proxycustomervehicle.Vehicle.DateInService;
                                            vehicle.DeclinedJob = proxycustomervehicle.Vehicle.DeclinedJob;
                                            vehicle.DisplayDescription = proxycustomervehicle.Vehicle.DisplayDescription;
                                            vehicle.DMSVehicleNo = proxycustomervehicle.Vehicle.DMSVehicleNo;
                                            vehicle.EngineType = proxycustomervehicle.Vehicle.EngineType;
                                            vehicle.ExtendedWarranty = proxycustomervehicle.Vehicle.ExtendedWarranty;
                                            vehicle.FuelType = proxycustomervehicle.Vehicle.FuelType;
                                            vehicle.FullModelName = proxycustomervehicle.Vehicle.FullModelName;
                                            vehicle.InsuranceDate = proxycustomervehicle.Vehicle.InsuranceDate;
                                            vehicle.LastMileage = proxycustomervehicle.Vehicle.LastMileage;
                                            vehicle.LastServiceDate = proxycustomervehicle.Vehicle.LastServiceDate;
                                            //vehicle.LastSixVIN = proxycustomervehicle.Vehicle.VIN;  // not exists ??????
                                            vehicle.LicenseNumber = proxycustomervehicle.Vehicle.LicenseNumber;
                                            vehicle.LicensePlateNo = proxycustomervehicle.Vehicle.LicensePlateNo;
                                            vehicle.Make = proxycustomervehicle.Vehicle.Make;
                                            vehicle.ModelCode = proxycustomervehicle.Vehicle.ModelCode;
                                            vehicle.ModelName = proxycustomervehicle.Vehicle.ModelName;
                                            vehicle.ModelYear = proxycustomervehicle.Vehicle.ModelYear;
                                            vehicle.PendingJob = proxycustomervehicle.Vehicle.PendingJob;
                                            vehicle.StockNumber = proxycustomervehicle.Vehicle.StockNumber;
                                            vehicle.Trim = proxycustomervehicle.Vehicle.Trim;
                                            vehicle.VehicleType = proxycustomervehicle.Vehicle.VehicleType;
                                            vehicle.VIN = proxycustomervehicle.Vehicle.VIN;
                                            vehicle.WarrantyMiles = proxycustomervehicle.Vehicle.WarrantyMiles;
                                            vehicle.WarrantyMonths = proxycustomervehicle.Vehicle.WarrantyMonths;
                                            vehicle.WarrantyStartDate = proxycustomervehicle.Vehicle.WarrantyStartDate;
                                            #endregion

                                            #region//CustomerVehicle Vehicle Campaigns
                                            if (proxycustomervehicle.Vehicle.Campaigns != null && proxycustomervehicle.Vehicle.Campaigns.Length > 0)
                                            {
                                                vehicle.Campaigns = new List<Data.v2.Common.Vehicle.Campaign>();
                                                foreach (_1C.v4.CustomerVehicle.Campaign proxycampaign in proxycustomervehicle.Vehicle.Campaigns)
                                                {
                                                    Data.v2.Common.Vehicle.Campaign campaign = new Data.v2.Common.Vehicle.Campaign();
                                                    campaign.CampaignDescription = proxycampaign.CampaignDescription;
                                                    campaign.CampaignID = proxycampaign.CampaignID;
                                                    campaign.CampaignPerformed = proxycampaign.CampaignPerformed;
                                                    vehicle.Campaigns.Add(campaign);
                                                }
                                            }
                                            #endregion

                                            customervehicle.Vehicle = vehicle;

                                            response.CustomerVehicles.Add(customervehicle);
                                        }
                                        #endregion
                                    }
                                }
                                else
                                {
                                    response.ResultMessage = GetResultMessageData(ResponseCode.NoResult, ResponseMessage.NoResult);
                                }
                                #endregion
                            }
                        }
                        else
                        {
                            if (response.Errors != null)
                                response.Errors.Add(GetErrorData(ResponseCode.Fail, ResponseMessage.Fail));
                            else
                                response.Errors = GetErrorDataList(ResponseCode.Fail, ResponseMessage.Fail);
                        }
                        #endregion
                    }
                    break;
                case "v2.HMES.SERAUTO.v1":

                    break;
                default: response.Errors = new List<Error>() { new Error() { Code = ResponseCode.NoMatchedProxy, Message = ResponseMessage.NoMatchedProxy } };
                    break;
            }

            return response;
        }
示例#10
0
        public EmployeeGetResponse EmployeeGet(EmployeeGetRequest request)
        {
            EmployeeGetResponse response = new EmployeeGetResponse();

            //DMS information set by dealer information
            string proxypath = string.Format("{0}.{1}.{2}.{3}",
                request.TransactionHeader.DocumentVersion,
                request.TransactionHeader.DistributorID,
                request.TransactionHeader.DMSCode,
                request.TransactionHeader.DMSVersion);

            switch (proxypath)
            {
                case "v2.Common.WA.v2":
                    {
                        #region v2.Common.WA.v2 - Standard (Proxy Class Dll Name : _WA.Mapper.v2)

                        #region EmployeeGet Request Set

                        //Create proxy credential
                        NetworkCredential proxycredential = new NetworkCredential(request.TransactionHeader.Username, request.TransactionHeader.Password);

                        //Create proxy web service from dms web service with credential
                        _WA.Mapper.v2.Employee.Employee proxyws = new _WA.Mapper.v2.Employee.Employee(request.TransactionHeader.DMSServerUrl);
                        proxyws.Credentials = proxycredential;

                        //Create proxy request with employeeget and transaction
                        _WA.Mapper.v2.Employee.EmployeeGetRequest proxyrequest = new _WA.Mapper.v2.Employee.EmployeeGetRequest();

                        //Create proxy transaction
                        _WA.Mapper.v2.Employee.TransactionHeader proxytransactionheader = new _WA.Mapper.v2.Employee.TransactionHeader();
                        if (request.TransactionHeader != null)
                        {
                            #region//TransactionHeader Set
                            proxytransactionheader.CountryID = request.TransactionHeader.CountryID;
                            proxytransactionheader.DealerID = request.TransactionHeader.DealerID;
                            proxytransactionheader.DistributorID = request.TransactionHeader.DistributorID;
                            proxytransactionheader.DMSCode = request.TransactionHeader.DMSCode;
                            proxytransactionheader.DMSServerUrl = request.TransactionHeader.DMSServerUrl;
                            proxytransactionheader.DMSVersion = request.TransactionHeader.DMSVersion;
                            proxytransactionheader.DocumentVersion = request.TransactionHeader.DocumentVersion;
                            proxytransactionheader.GroupID = request.TransactionHeader.GroupID;
                            proxytransactionheader.IneterfaceID = request.TransactionHeader.IneterfaceID;
                            proxytransactionheader.Password = request.TransactionHeader.Password;
                            proxytransactionheader.PollingToken = request.TransactionHeader.PollingToken;
                            proxytransactionheader.RequestPollingToken = request.TransactionHeader.RequestPollingToken;
                            proxytransactionheader.RequestType = request.TransactionHeader.RequestType;
                            proxytransactionheader.TransactionId = request.TransactionHeader.TransactionId;
                            proxytransactionheader.TransactionDateTimeLocal = request.TransactionHeader.TransactionDateTimeLocal;
                            proxytransactionheader.TransactionDateTimeUTC = request.TransactionHeader.TransactionDateTimeUTC;
                            proxytransactionheader.TransactionType = request.TransactionHeader.TransactionType;
                            proxytransactionheader.Username = request.TransactionHeader.Username;
                            proxytransactionheader.VenderTrackingCode = request.TransactionHeader.VenderTrackingCode;
                            proxyrequest.TransactionHeader = proxytransactionheader;
                            #endregion
                        }

                        //Create proxy employeeget
                        _WA.Mapper.v2.Employee.EmployeeGet proxyemployeeget = new _WA.Mapper.v2.Employee.EmployeeGet();
                        if (request.EmployeeGet != null)
                        {
                            #region//EmployeeGet Set
                            proxyemployeeget.DMSEmployeeNo = request.EmployeeGet.DMSEmployeeNo;
                            proxyemployeeget.LastModifiedDateTimeFromUTC = request.EmployeeGet.LastModifiedDateTimeFromUTC;
                            proxyemployeeget.LastModifiedDateTimeToUTC = request.EmployeeGet.LastModifiedDateTimeToUTC;
                            proxyemployeeget.LoginID = request.EmployeeGet.LoginID;
                            proxyrequest.EmployeeGet = proxyemployeeget;
                            #endregion
                        }
                        #endregion

                        //Run proxy web method with proxy request
                        _WA.Mapper.v2.Employee.EmployeeGetResponse proxyresponse = proxyws.EmployeeGet(proxyrequest);

                        //Mapping with Standard Interface Specification Object
                        if (proxyresponse != null)
                        {
                            if (proxyresponse.TransactionHeader != null)
                            {
                                #region//TransactionHeader Set
                                TransactionHeader transactionheader = new TransactionHeader();
                                transactionheader.CountryID = proxyresponse.TransactionHeader.CountryID;
                                transactionheader.DealerID = proxyresponse.TransactionHeader.DealerID;
                                transactionheader.DistributorID = proxyresponse.TransactionHeader.DistributorID;
                                transactionheader.DMSCode = proxyresponse.TransactionHeader.DMSCode;
                                transactionheader.DMSServerUrl = proxyresponse.TransactionHeader.DMSServerUrl;
                                transactionheader.DMSVersion = proxyresponse.TransactionHeader.DMSVersion;
                                transactionheader.DocumentVersion = proxyresponse.TransactionHeader.DocumentVersion;
                                transactionheader.GroupID = proxyresponse.TransactionHeader.GroupID;
                                transactionheader.IneterfaceID = proxyresponse.TransactionHeader.IneterfaceID;
                                transactionheader.Password = proxyresponse.TransactionHeader.Password;
                                transactionheader.PollingToken = proxyresponse.TransactionHeader.PollingToken;
                                transactionheader.RequestPollingToken = proxyresponse.TransactionHeader.RequestPollingToken;
                                transactionheader.RequestType = proxyresponse.TransactionHeader.RequestType;
                                transactionheader.TransactionId = proxyresponse.TransactionHeader.TransactionId;
                                transactionheader.TransactionDateTimeLocal = proxyresponse.TransactionHeader.TransactionDateTimeLocal;
                                transactionheader.TransactionDateTimeUTC = proxyresponse.TransactionHeader.TransactionDateTimeUTC;
                                transactionheader.TransactionType = proxyresponse.TransactionHeader.TransactionType;
                                transactionheader.Username = proxyresponse.TransactionHeader.Username;
                                transactionheader.VenderTrackingCode = proxyresponse.TransactionHeader.VenderTrackingCode;
                                response.TransactionHeader = transactionheader;
                                #endregion
                            }

                            //ResultMessage Set
                            if (proxyresponse.ResultMessage != null)
                            {
                                response.ResultMessage = GetResultMessageData(proxyresponse.ResultMessage.Code, proxyresponse.ResultMessage.Message);
                            }

                            if (proxyresponse.Errors != null)
                            {
                                //Error List Set
                                foreach (_WA.Mapper.v2.Employee.Error proxyerror in proxyresponse.Errors)
                                {
                                    if (response.Errors != null)
                                        response.Errors.Add(GetErrorData(proxyerror.Code, proxyerror.Message));
                                    else
                                        response.Errors = GetErrorDataList(proxyerror.Code, proxyerror.Message);
                                }
                            }
                            else
                            {
                                #region //EmployeeGetResponse Set

                                if (proxyresponse.Employees != null && proxyresponse.Employees.Length > 0)
                                {
                                    response.Employees = new List<Employee>();
                                    foreach (_WA.Mapper.v2.Employee.Employee1 proxyemployee in proxyresponse.Employees)
                                    {
                                        #region //Employee Header
                                        Employee employee = new Employee();
                                        employee.DMSEmployeeNo = proxyemployee.DMSEmployeeNo;
                                        employee.Email = proxyemployee.Email;
                                        employee.EmployeeStatus = proxyemployee.EmployeeStatus;
                                        employee.FirstName = proxyemployee.FirstName;
                                        employee.FullName = proxyemployee.FullName;
                                        employee.Gender = proxyemployee.Gender;
                                        employee.Group = proxyemployee.Group;
                                        employee.Language = proxyemployee.Language;
                                        employee.LastName = proxyemployee.LastName;
                                        employee.LoginID = proxyemployee.LoginID;
                                        employee.LoginPassword = proxyemployee.LoginPassword;
                                        employee.MiddleName = proxyemployee.MiddleName;
                                        employee.MobileNumber = proxyemployee.MobileNumber;
                                        employee.PhoneNumber = proxyemployee.PhoneNumber;
                                        employee.Salution = proxyemployee.Salution;
                                        employee.SkillsetString = proxyemployee.SkillsetString;
                                        employee.Title = proxyemployee.Title;
                                        #endregion

                                        #region //Employee Roles
                                        if (proxyemployee.Roles != null && proxyemployee.Roles.Length > 0)
                                        {
                                            employee.Roles = new List<Role>();
                                            foreach (_WA.Mapper.v2.Employee.Role proxyrole in proxyemployee.Roles)
                                            {
                                                Role role = new Role();
                                                role.RoleName = proxyrole.RoleName;
                                                role.RoleUserID = proxyrole.RoleUserID;
                                                employee.Roles.Add(role);
                                            }
                                        }
                                        #endregion

                                        #region //Employee ManagementFields
                                        if (proxyemployee.ManagementFields != null)
                                        {
                                            ManagementFields managementfields = new ManagementFields();
                                            managementfields.LastModifiedDateTimeUTC = proxyemployee.ManagementFields.CreateDateTimeUTC;
                                            managementfields.LastModifiedDateTimeUTC = proxyemployee.ManagementFields.LastModifiedDateTimeUTC;
                                            employee.ManagementFields = managementfields;
                                        }
                                        #endregion
                                    }
                                }
                                else
                                {
                                    response.ResultMessage = GetResultMessageData(ResponseCode.NoResult, ResponseMessage.NoResult);
                                }
                                #endregion
                            }
                        }
                        else
                        {
                            if (response.Errors != null)
                                response.Errors.Add(GetErrorData(ResponseCode.Fail, ResponseMessage.Fail));
                            else
                                response.Errors = GetErrorDataList(ResponseCode.Fail, ResponseMessage.Fail);
                        }
                        #endregion
                    }
                    break;
                case "v2.HMCIS.1C.v4":
                    {
                        #region v2.HMCIS.1C.v4 - RTR (Proxy Class Dll Name : _1C.v4)

                        #region EmployeeGet Request Set

                        //Create proxy credential
                        NetworkCredential proxycredential = new NetworkCredential(request.TransactionHeader.Username, request.TransactionHeader.Password);

                        //Create proxy web service from dms web service with credential
                        _1C.v4.Employee.Employee proxyws = new _1C.v4.Employee.Employee(request.TransactionHeader.DMSServerUrl);
                        proxyws.Credentials = proxycredential;

                        //Create proxy request with employeeget and transaction
                        _1C.v4.Employee.EmployeeGetRequest proxyrequest = new _1C.v4.Employee.EmployeeGetRequest();

                        //Create proxy transaction
                        _1C.v4.Employee.TransactionHeader proxytransactionheader = new _1C.v4.Employee.TransactionHeader();
                        if (request.TransactionHeader != null)
                        {
                            #region//TransactionHeader Set
                            proxytransactionheader.CountryID = request.TransactionHeader.CountryID;
                            proxytransactionheader.DealerID = request.TransactionHeader.DealerID;
                            proxytransactionheader.DistributorID = request.TransactionHeader.DistributorID;
                            proxytransactionheader.DMSCode = request.TransactionHeader.DMSCode;
                            proxytransactionheader.DMSServerUrl = request.TransactionHeader.DMSServerUrl;
                            proxytransactionheader.DMSVersion = request.TransactionHeader.DMSVersion;
                            proxytransactionheader.DocumentVersion = request.TransactionHeader.DocumentVersion;
                            proxytransactionheader.GroupID = request.TransactionHeader.GroupID;
                            proxytransactionheader.IneterfaceID = request.TransactionHeader.IneterfaceID;
                            proxytransactionheader.Password = request.TransactionHeader.Password;
                            proxytransactionheader.PollingToken = request.TransactionHeader.PollingToken;
                            proxytransactionheader.RequestPollingToken = request.TransactionHeader.RequestPollingToken;
                            proxytransactionheader.RequestType = request.TransactionHeader.RequestType;
                            proxytransactionheader.TransactionId = request.TransactionHeader.TransactionId;
                            proxytransactionheader.TransactionDateTimeLocal = request.TransactionHeader.TransactionDateTimeLocal;
                            proxytransactionheader.TransactionDateTimeUTC = request.TransactionHeader.TransactionDateTimeUTC;
                            proxytransactionheader.TransactionType = request.TransactionHeader.TransactionType;
                            proxytransactionheader.Username = request.TransactionHeader.Username;
                            proxytransactionheader.VenderTrackingCode = request.TransactionHeader.VenderTrackingCode;
                            proxyrequest.TransactionHeader = proxytransactionheader;
                            #endregion
                        }

                        //Create proxy employeeget
                        _1C.v4.Employee.EmployeeGet proxyemployeeget = new _1C.v4.Employee.EmployeeGet();
                        if (request.EmployeeGet != null)
                        {
                            #region//EmployeeGet Set
                            proxyemployeeget.DMSEmployeeNo = request.EmployeeGet.DMSEmployeeNo;
                            proxyemployeeget.LastModifiedDateTimeFromUTC = request.EmployeeGet.LastModifiedDateTimeFromUTC;
                            proxyemployeeget.LastModifiedDateTimeToUTC = request.EmployeeGet.LastModifiedDateTimeToUTC;
                            proxyemployeeget.LoginID = request.EmployeeGet.LoginID;
                            proxyrequest.EmployeeGet = proxyemployeeget;
                            #endregion
                        }
                        #endregion

                        //Run proxy web method with proxy request
                        _1C.v4.Employee.EmployeeGetResponse proxyresponse = proxyws.EmployeeGet(proxyrequest);

                        //Mapping with Standard Interface Specification Object
                        if (proxyresponse != null)
                        {
                            if (proxyresponse.TransactionHeader != null)
                            {
                                #region//TransactionHeader Set
                                TransactionHeader transactionheader = new TransactionHeader();
                                transactionheader.CountryID = proxyresponse.TransactionHeader.CountryID;
                                transactionheader.DealerID = proxyresponse.TransactionHeader.DealerID;
                                transactionheader.DistributorID = proxyresponse.TransactionHeader.DistributorID;
                                transactionheader.DMSCode = proxyresponse.TransactionHeader.DMSCode;
                                transactionheader.DMSServerUrl = proxyresponse.TransactionHeader.DMSServerUrl;
                                transactionheader.DMSVersion = proxyresponse.TransactionHeader.DMSVersion;
                                transactionheader.DocumentVersion = proxyresponse.TransactionHeader.DocumentVersion;
                                transactionheader.GroupID = proxyresponse.TransactionHeader.GroupID;
                                transactionheader.IneterfaceID = proxyresponse.TransactionHeader.IneterfaceID;
                                transactionheader.Password = proxyresponse.TransactionHeader.Password;
                                transactionheader.PollingToken = proxyresponse.TransactionHeader.PollingToken;
                                transactionheader.RequestPollingToken = proxyresponse.TransactionHeader.RequestPollingToken;
                                transactionheader.RequestType = proxyresponse.TransactionHeader.RequestType;
                                transactionheader.TransactionId = proxyresponse.TransactionHeader.TransactionId;
                                transactionheader.TransactionDateTimeLocal = proxyresponse.TransactionHeader.TransactionDateTimeLocal;
                                transactionheader.TransactionDateTimeUTC = proxyresponse.TransactionHeader.TransactionDateTimeUTC;
                                transactionheader.TransactionType = proxyresponse.TransactionHeader.TransactionType;
                                transactionheader.Username = proxyresponse.TransactionHeader.Username;
                                transactionheader.VenderTrackingCode = proxyresponse.TransactionHeader.VenderTrackingCode;
                                response.TransactionHeader = transactionheader;
                                #endregion
                            }

                            //ResultMessage Set
                            if (proxyresponse.ResultMessage != null)
                            {
                                response.ResultMessage = GetResultMessageData(proxyresponse.ResultMessage.Code, proxyresponse.ResultMessage.Message);
                            }

                            if (proxyresponse.Errors != null)
                            {
                                //Error List Set
                                foreach (_1C.v4.Employee.Error proxyerror in proxyresponse.Errors)
                                {
                                    if (response.Errors != null)
                                        response.Errors.Add(GetErrorData(proxyerror.Code, proxyerror.Message));
                                    else
                                        response.Errors = GetErrorDataList(proxyerror.Code, proxyerror.Message);
                                }
                            }
                            else
                            {
                                #region //EmployeeGetResponse Set

                                if (proxyresponse.Employees != null && proxyresponse.Employees.Length > 0)
                                {
                                    response.Employees = new List<Employee>();
                                    foreach (_1C.v4.Employee.Employee1 proxyemployee in proxyresponse.Employees)
                                    {
                                        #region //Employee Header
                                        Employee employee = new Employee();
                                        employee.DMSEmployeeNo = proxyemployee.DMSEmployeeNo;
                                        employee.Email = proxyemployee.Email;
                                        employee.EmployeeStatus = proxyemployee.EmployeeStatus;
                                        employee.FirstName = proxyemployee.FirstName;
                                        employee.FullName = proxyemployee.FullName;
                                        employee.Gender = proxyemployee.Gender;
                                        employee.Group = proxyemployee.Group;
                                        employee.Language = proxyemployee.Language;
                                        employee.LastName = proxyemployee.LastName;
                                        employee.LoginID = proxyemployee.LoginID;
                                        employee.LoginPassword = proxyemployee.LoginPassword;
                                        employee.MiddleName = proxyemployee.MiddleName;
                                        employee.MobileNumber = proxyemployee.MobileNumber;
                                        employee.PhoneNumber = proxyemployee.PhoneNumber;
                                        employee.Salution = proxyemployee.Salution;
                                        employee.SkillsetString = proxyemployee.SkillsetString;
                                        employee.Title = proxyemployee.Title;
                                        #endregion

                                        #region //Employee Roles
                                        if (proxyemployee.Roles != null && proxyemployee.Roles.Length > 0)
                                        {
                                            employee.Roles = new List<Role>();
                                            foreach (_1C.v4.Employee.Role proxyrole in proxyemployee.Roles)
                                            {
                                                Role role = new Role();
                                                role.RoleName = proxyrole.RoleName;
                                                role.RoleUserID = proxyrole.RoleUserID;
                                                employee.Roles.Add(role);
                                            }
                                        }
                                        #endregion

                                        #region //Employee ManagementFields
                                        if (proxyemployee.ManagementFields != null)
                                        {
                                            ManagementFields managementfields = new ManagementFields();
                                            managementfields.LastModifiedDateTimeUTC = proxyemployee.ManagementFields.CreateDateTimeUTC;
                                            managementfields.LastModifiedDateTimeUTC = proxyemployee.ManagementFields.LastModifiedDateTimeUTC;
                                            employee.ManagementFields = managementfields;
                                        }
                                        #endregion
                                    }
                                }
                                else
                                {
                                    response.ResultMessage = GetResultMessageData(ResponseCode.NoResult, ResponseMessage.NoResult);
                                }
                                #endregion
                            }
                        }
                        else
                        {
                            if (response.Errors != null)
                                response.Errors.Add(GetErrorData(ResponseCode.Fail, ResponseMessage.Fail));
                            else
                                response.Errors = GetErrorDataList(ResponseCode.Fail, ResponseMessage.Fail);
                        }
                        #endregion
                    }
                    break;
                default: response.Errors = new List<Error>() { new Error() { Code = ResponseCode.NoMatchedProxy, Message = ResponseMessage.NoMatchedProxy } };
                    break;
            }

            return response;
        }