Пример #1
0
        public EmployeeGetResponse EmployeeGet(EmployeeGetRequest request)
        {
            EmployeeGetResponse response = new EmployeeGetResponse();

            //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.EmployeeGet(request);
                    }
                    break;
                case "v2.1C.v8241":
                    {
                        _1C.v8241.ProxyService proxyservice = new _1C.v8241.ProxyService();
                        response = proxyservice.EmployeeGet(request);
                    }
                    break;
                default: response.TransactionHeader = request.TransactionHeader; response.Errors = new List<Error>() { new Error() { Code = ResponseCode.WA_NoMatchedProxy, Message = ResponseMessage.NoMatchedProxy } };
                    break;
            }

            return response;
        }
Пример #2
0
        public EmployeeGetResponse EmployeeGet(EmployeeGetRequest request)
        {
            EmployeeGetResponse response = new EmployeeGetResponse();

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

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

            return response;
        }
Пример #3
0
        public EmployeeGetResponse EmployeeGet(EmployeeGetRequest request)
        {
            EmployeeGetResponse response = new EmployeeGetResponse();

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

                if (response.Errors == null)
                {
                    using (Employee_Biz biz = new Employee_Biz())
                    {
                        response = biz.EmployeeGet(request);
                    }

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

            return response;
        }
Пример #4
0
        public EmployeeGetResponse EmployeeGet(EmployeeGetRequest request)
        {
            EmployeeGetResponse response = new EmployeeGetResponse();

            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.Employee_Proxy proxy = new Proxy.v2.Common.Employee_Proxy();
                response = proxy.EmployeeGet(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<Employee> Employees = Util.DataHelper.GetListByElementName<Employee>(System.Web.HttpContext.Current.Server.MapPath("/v2/Repository/Employees.xml"), "Employee");

                if (Employees != null && Employees.Count > 0)
                {
                    List<Employee> resultlist = Employees.Where(item =>
                        (string.IsNullOrEmpty(request.EmployeeGet.DMSEmployeeNo) || request.EmployeeGet.DMSEmployeeNo == item.DMSEmployeeNo)
                        && (string.IsNullOrEmpty(request.EmployeeGet.LoginID) || request.EmployeeGet.LoginID == item.LoginID)
                        && (request.EmployeeGet.LastModifiedDateTimeFromUTC == null || request.EmployeeGet.LastModifiedDateTimeFromUTC <= item.ManagementFields.LastModifiedDateTimeUTC)
                        && (request.EmployeeGet.LastModifiedDateTimeToUTC == null || request.EmployeeGet.LastModifiedDateTimeToUTC >= item.ManagementFields.LastModifiedDateTimeUTC)
                        ).ToList<Employee>();

                    response.Employees = 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 (Employee_Dac dac = new Employee_Dac())
                {
                    resultDS = dac.SelectEmployee(request.TransactionHeader.CountryID
                                                        , request.TransactionHeader.DistributorID
                                                        , request.TransactionHeader.GroupID
                                                        , request.TransactionHeader.DealerID
                                                        , request.TransactionHeader.Language // Need to check
                                                        , request.EmployeeGet
                                                        );
                }

                //0. Employee Data
                //1. Role Data

                if (resultDS.Tables != null && resultDS.Tables.Count > 0)
                {
                    List<Employee> Employees = null;
                    if (resultDS.Tables[0].Rows.Count > 0)
                    {
                        #region Employees
                        Employees = resultDS.Tables[0].AsEnumerable()
                            .Select(row =>
                        new Employee
                        {
                            DMSEmployeeNo = Util.DataHelper.ConvertObjectToString(row["DMSEmployeeNo"]),
                            Email = Util.DataHelper.ConvertObjectToString(row["Email"]),
                            EmployeeStatus = Util.DataHelper.ConvertObjectToString(row["EmployeeStatus"]),
                            FirstName = Util.DataHelper.ConvertObjectToString(row["FirstName"]),
                            FullName = Util.DataHelper.ConvertObjectToString(row["FullName"]),
                            Gender = Util.DataHelper.ConvertObjectToString(row["Gender"]),
                            Group = Util.DataHelper.ConvertObjectToString(row["Group"]),
                            Language = Util.DataHelper.ConvertObjectToString(row["Language"]),
                            LastName = Util.DataHelper.ConvertObjectToString(row["LastName"]),
                            LoginID = Util.DataHelper.ConvertObjectToString(row["LoginID"]),
                            LoginPassword = Util.DataHelper.ConvertObjectToString(row["LoginPassword"]),
                            MiddleName = Util.DataHelper.ConvertObjectToString(row["MiddleName"]),
                            MobileNumber = Util.DataHelper.ConvertObjectToString(row["MobileNumber"]),
                            PhoneNumber = Util.DataHelper.ConvertObjectToString(row["PhoneNumber"]),
                            Salution = Util.DataHelper.ConvertObjectToString(row["Salution"]),
                            SkillsetString = Util.DataHelper.ConvertObjectToString(row["SkillsetString"]),
                            Title = Util.DataHelper.ConvertObjectToString(row["Title"]),
                            ManagementFields = new ManagementFields() {
                                CreateDateTimeUTC = Util.DataHelper.ConvertObjectToDateTime(row["CreateDateTimeUTC"]),
                                LastModifiedDateTimeUTC = Util.DataHelper.ConvertObjectToDateTime(row["LastModifiedDateTimeUTC"]) },
                            Roles = new List<Role>(),
                        }).ToList();
                        #endregion

                        if (Employees != null && Employees.Count > 0)
                        {
                            foreach (Employee employee in Employees)
                            {
                                #region Roles
                                List<Role> Roles = resultDS.Tables[1].AsEnumerable()
                                    .Where(row => Util.DataHelper.ConvertObjectToString(row["DMSEmployeeNo"]) == employee.DMSEmployeeNo)
                                    .Select(row =>
                                new Role
                                {
                                    RoleName = Util.DataHelper.ConvertObjectToString(row["RoleName"]),
                                    RoleUserID = Util.DataHelper.ConvertObjectToString(row["RoleUserID"]),
                                }).ToList();
                                if (Roles.Count > 0)
                                    employee.Roles = Roles;
                                #endregion
                            }

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

            return response;
        }
Пример #5
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;
        }