Exemplo n.º 1
0
        public JobGetResponse JobGet(JobGetRequest request)
        {
            JobGetResponse response = new JobGetResponse();

            try
            {
                //Request body-header object validation
                response.Errors = GetErrorDataListFromRequestTransactionHeader(request.TransactionHeader);
                if (response.Errors != null)
                {
                    response.TransactionHeader = new Data.v2.Common.Common.TransactionHeader();
                    return response;
                }
                response.Errors = GetErrorDataListFromRequest(request.JobGet);
                if (response.Errors != null)
                {
                    response.TransactionHeader = request.TransactionHeader;
                    return response;
                }

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

            return response;
        }
Exemplo n.º 2
0
        public JobGetResponse JobGet(JobGetRequest request)
        {
            JobGetResponse response = new JobGetResponse();

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

            switch (proxypath)
            {
                case "v2.WA.v2":
                    {
                        WA.v2.ProxyService proxyservice = new WA.v2.ProxyService();
                        response = proxyservice.JobGet(request);
                    }
                    break;
                case "v2.1C.v8241":
                    {
                        _1C.v8241.ProxyService proxyservice = new _1C.v8241.ProxyService();
                        response = proxyservice.JobGet(request);
                    }
                    break;
                default: response.TransactionHeader = request.TransactionHeader; response.Errors = new List<Error>() { new Error() { Code = ResponseCode.WA_NoMatchedProxy, Message = ResponseMessage.NoMatchedProxy } };
                    break;
            }

            return response;
        }
Exemplo n.º 3
0
        public JobGetResponse JobGet(JobGetRequest request)
        {
            JobGetResponse response = new JobGetResponse();

            try
            {
                WA.Standard.IF.Logger.Log.Log.SaveXMLLog(0, request.TransactionHeader.DealerID, "WA JobGetRequest XML", request);

                //Request body-header object validation
                response.Errors = GetErrorDataListFromRequestTransactionHeader(request.TransactionHeader);
                if (response.Errors != null)
                {
                    response.TransactionHeader = new Data.v2.Common.Common.TransactionHeader();
                }
                response.Errors = GetErrorDataListFromRequest(request.JobGet);
                if (response.Errors != null)
                {
                    response.TransactionHeader = request.TransactionHeader;
                }

                if (response.Errors == null)
                {
                    using (Job_Biz biz = new Job_Biz())
                    {
                        response = biz.JobGet(request);
                    }

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

            return response;
        }
Exemplo n.º 4
0
        public JobGetResponse JobGet(JobGetRequest request)
        {
            JobGetResponse response = new JobGetResponse();

            if (WA.Standard.IF.Logger.Log.Log.RunningMode.Equals(WA.Standard.IF.Data.v2.Common.Common.RunningMode.Mapper))
            {
                #region For Mapper Process
                WA.Standard.IF.Proxy.v2.Common.Job_Proxy proxy = new Proxy.v2.Common.Job_Proxy();
                response = proxy.JobGet(request);
                #endregion
            }
            else if (WA.Standard.IF.Logger.Log.Log.RunningMode.Equals(WA.Standard.IF.Data.v2.Common.Common.RunningMode.XMLDMS))
            {
                response.TransactionHeader = request.TransactionHeader;

                #region For XML Process
                List<Job> Jobs = Util.DataHelper.GetListByElementName<Job>(System.Web.HttpContext.Current.Server.MapPath("/v2/Repository/Jobs.xml"), "Job");

                if (Jobs != null && Jobs.Count > 0)
                {
                    List<Job> resultlist = Jobs
                        .Where(item =>
                        (string.IsNullOrEmpty(request.JobGet.DMSAppointmentNo) || request.JobGet.DMSAppointmentNo == item.DMSAppointmentNo)
                        && (string.IsNullOrEmpty(request.JobGet.DMSJobNo) || request.JobGet.DMSJobNo == item.DMSJobNo)
                        && (string.IsNullOrEmpty(request.JobGet.DMSRONo) || request.JobGet.DMSRONo == item.DMSRONo)
                        && (request.JobGet.LastModifiedDateTimeFromUTC == null || request.JobGet.LastModifiedDateTimeFromUTC <= item.ManagementFields.LastModifiedDateTimeUTC)
                        && (request.JobGet.LastModifiedDateTimeToUTC == null || request.JobGet.LastModifiedDateTimeToUTC >= item.ManagementFields.LastModifiedDateTimeUTC)
                        //ScheduledDateTimeLocal From & To, DMSJobStatus
                        ).ToList<Job>();

                    response.Jobs = resultlist;

                    if (resultlist.Count > 0)
                        response.ResultMessage = GetResultMessageData(ResponseCode.Success, ResponseMessage.Success);
                    else
                        response.ResultMessage = GetResultMessageData(ResponseCode.NoResult, ResponseMessage.NoResult);
                }
                else
                {
                    response.ResultMessage = GetResultMessageData(ResponseCode.NoResult, ResponseMessage.NoResult);
                }
                #endregion
            }
            else if (WA.Standard.IF.Logger.Log.Log.RunningMode.Equals(WA.Standard.IF.Data.v2.Common.Common.RunningMode.DBDMS))
            {
                #region For DB Process

                /*
                DataSet resultDS = new DataSet();
                using (Job_Dac dac = new Job_Dac())
                {
                    resultDS = dac.SelectJob(request.TransactionHeader.CountryID
                                                        , request.TransactionHeader.DistributorID
                                                        , request.TransactionHeader.GroupID
                                                        , request.TransactionHeader.DealerID
                                                        , request.TransactionHeader.Language // Need to check
                                                        , request.JobGet
                        );

                }

                if (resultDS.Tables != null && resultDS.Tables.Count == 0)
                {
                    List<Job> jobDataList = null;
                    if (resultDS.Tables[0].Rows.Count > 0)
                    {
                        #region Job Header
                        jobDataList = resultDS.Tables[0].AsEnumerable()
                            .Select(row =>
                        new Job
                        {
                            ActualHours = Util.DataHelper.ConvertObjectToDouble(row[""]),

                            DMSAppointmentNo = Util.DataHelper.ConvertObjectToString(row[""]),
                            DMSJobNo = Util.DataHelper.ConvertObjectToString(row[""]),
                            DMSRONo = Util.DataHelper.ConvertObjectToString(row[""]),
                            EstimatedHours = Util.DataHelper.ConvertObjectToDouble(row[""]),
                            ServiceLineNumber = Util.DataHelper.ConvertObjectToString(row[""]),
                            SkillLevel = Util.DataHelper.ConvertObjectToString(row[""]),

                            OPCodes = new List<Data.v2.Common.Job.OPCode>(),
                            ManagementFields = new ManagementFields(),
                            JobLogs = new List<JobLog>(),
                            Causes = new List<Cause>(),
                            Comments = new List<Comment>(),
                            Corrections = new List<Correction>(),
                            Descriptions = new List<Description>(),
                        }).ToList();
                        #endregion

                        if (jobDataList != null && jobDataList.Count > 0)
                        {
                            foreach (Job jobData in jobDataList)
                            {
                                #region Job Header
                                jobDataList = resultDS.Tables[0].AsEnumerable()
                                    .Select(row =>
                                new Job
                                {
                                    ActualHours = Util.DataHelper.ConvertObjectToDouble(row[""]),

                                    DMSAppointmentNo = Util.DataHelper.ConvertObjectToString(row[""]),
                                    DMSJobNo = Util.DataHelper.ConvertObjectToString(row[""]),
                                    DMSRONo = Util.DataHelper.ConvertObjectToString(row[""]),
                                    EstimatedHours = Util.DataHelper.ConvertObjectToDouble(row[""]),
                                    ServiceLineNumber = Util.DataHelper.ConvertObjectToString(row[""]),
                                    SkillLevel = Util.DataHelper.ConvertObjectToString(row[""]),

                                    OPCodes = new List<Data.v2.Common.Job.OPCode>(),
                                    ManagementFields = new ManagementFields(),
                                    JobLogs = new List<JobLog>(),
                                    Causes = new List<Cause>(),
                                    Comments = new List<Comment>(),
                                    Corrections = new List<Correction>(),
                                    Descriptions = new List<Description>(),
                                }).ToList();
                                #endregion
                            }
                        }

                        response.ResultMessage = GetResultMessageData(PredefinedCode._SuccessDone, PredefinedMessage._SuccessDone);
                        response.Jobs = jobDataList;
                    }
                    else
                    {
                        response.ResultMessage = GetResultMessageData(PredefinedCode._SuccessNoResult, PredefinedMessage._SuccessNoResult);
                    }
                }
                else
                {
                    response.ResultMessage = GetResultMessageData(PredefinedCode._SuccessNoResult, PredefinedMessage._SuccessNoResult);
                }
                 */
                #endregion
            }

            return response;
        }
Exemplo n.º 5
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;
        }