示例#1
0
        public EmployeeServiceResponse FetchingEmployeeData(ref Models.AgentonBoarding.RecruitmentAgent objRecruitmentAgent)
        {
            EmployeeServiceResponse objRootObject = new EmployeeServiceResponse();

            objRootObject.epfNo       = objRecruitmentAgent.EPFNo;
            objRootObject.empId       = objRecruitmentAgent.EmployeeID;
            objRootObject.companyCode = "00001";//objRecruitmentAgent.CompanyCode;
            return(objRootObject);
        }
示例#2
0
        public AIA.Life.Models.AgentonBoarding.RecruitmentAgent FetchCreateEmployeeData(Models.AgentonBoarding.RecruitmentAgent objRecruitmentAgent)
        {
            EmployeeServiceResponse objectData = FetchingEmployeeData(ref objRecruitmentAgent);
            string str = GetPostParametersToAPI("HRM_Sending", "HRM", "employeeDetails", objectData);
            EmployeeServiceResponse DataSerialize = JsonConvert.DeserializeObject <EmployeeServiceResponse>(str);

            if (DataSerialize.output != null)
            {
                if (DataSerialize.output[0].basicDetails != null)
                {
                    var basicDetails = DataSerialize.output[0].basicDetails;
                    objRecruitmentAgent.EmployeeType    = basicDetails.employeeType;
                    objRecruitmentAgent.AppointmentDate = Convert.ToDateTime(basicDetails.appointmentDate);
                    objRecruitmentAgent.Status          = basicDetails.status;
                }
                if (DataSerialize.output[0].personalInformation != null)
                {
                    var personalInformation = DataSerialize.output[0].personalInformation;
                    objRecruitmentAgent.Title         = personalInformation.title;
                    objRecruitmentAgent.FirstName     = personalInformation.firstName;
                    objRecruitmentAgent.MiddleName    = personalInformation.middleName;
                    objRecruitmentAgent.LastName      = personalInformation.lastName;
                    objRecruitmentAgent.DOB           = Convert.ToDateTime(personalInformation.dob);
                    objRecruitmentAgent.Gender        = personalInformation.gender;
                    objRecruitmentAgent.MaritalStatus = personalInformation.maritalStatuse;
                    objRecruitmentAgent.Nationality   = personalInformation.nationality;
                    objRecruitmentAgent.NICNO         = personalInformation.nicNo;
                    objRecruitmentAgent.Profession    = personalInformation.industryExperience;
                    objRecruitmentAgent.Salesexp      = personalInformation.salesExperience;
                    objRecruitmentAgent.Industryexp   = personalInformation.industryExperience;
                    if (personalInformation.mobile1 != null && personalInformation.mobile1 != " ")
                    {
                        //objRecruitmentAgent.MobileNo =Convert.ToInt64(personalInformation.mobile1);
                        if (personalInformation.mobile2 != null && personalInformation.mobile2 != " ")
                        {
                            objRecruitmentAgent.AltMobileNo = Convert.ToInt64(personalInformation.mobile2);
                        }
                    }

                    // objRecruitmentAgent.SLIIRegNo=personalInformation.ibs
                }
                if (DataSerialize.output[0].communicationAddress != null)
                {
                    var communicationAddress = DataSerialize.output[0].communicationAddress;
                    objRecruitmentAgent.objCommunicationAddress          = new Models.Common.Address();
                    objRecruitmentAgent.objCommunicationAddress.Address1 = communicationAddress.address1;
                    objRecruitmentAgent.objCommunicationAddress.Address2 = communicationAddress.address2;
                    objRecruitmentAgent.objCommunicationAddress.State    = communicationAddress.province;
                    objRecruitmentAgent.objCommunicationAddress.Pincode  = communicationAddress.postCode;
                    objRecruitmentAgent.objCommunicationAddress.City     = communicationAddress.city_Town;
                    objRecruitmentAgent.objCommunicationAddress.District = communicationAddress.district;
                }
                if (DataSerialize.output[0].permanentAddress != null)
                {
                    var permanentAddress = DataSerialize.output[0].permanentAddress;
                    objRecruitmentAgent.objPermanentAddress          = new Models.Common.Address();
                    objRecruitmentAgent.objPermanentAddress.Address1 = permanentAddress.address1;
                    objRecruitmentAgent.objPermanentAddress.Address2 = permanentAddress.address2;
                    objRecruitmentAgent.objPermanentAddress.State    = permanentAddress.province;
                    objRecruitmentAgent.objPermanentAddress.Pincode  = permanentAddress.postCode;
                    objRecruitmentAgent.objPermanentAddress.City     = permanentAddress.city_Town;
                    objRecruitmentAgent.objPermanentAddress.District = permanentAddress.district;
                }
                if (DataSerialize.output[0].emergencyContactDetails != null)
                {
                    var emergencyContactDetails = DataSerialize.output[0].emergencyContactDetails;
                    objRecruitmentAgent.objEmergencyContactAddress          = new Models.Common.Address();
                    objRecruitmentAgent.objEmergencyContactAddress.Address1 = emergencyContactDetails.address1;
                    objRecruitmentAgent.objEmergencyContactAddress.Address2 = emergencyContactDetails.address2;
                    objRecruitmentAgent.objEmergencyContactAddress.State    = emergencyContactDetails.province;
                    objRecruitmentAgent.objEmergencyContactAddress.Pincode  = emergencyContactDetails.zip_PinCode;
                    objRecruitmentAgent.objEmergencyContactAddress.City     = emergencyContactDetails.city_Town;
                    objRecruitmentAgent.objEmergencyContactAddress.District = emergencyContactDetails.district;
                    objRecruitmentAgent.EmergancyRelationship = emergencyContactDetails.relationship;
                    objRecruitmentAgent.EmergancyFirstName    = emergencyContactDetails.fullName;
                    if (emergencyContactDetails.mobile1 != null && emergencyContactDetails.mobile1 != " ")
                    {
                        objRecruitmentAgent.EmergancyMobile = Convert.ToInt64(emergencyContactDetails.mobile1);
                    }
                    objRecruitmentAgent.EmergancyEmail = emergencyContactDetails.email;
                    if (emergencyContactDetails.mobile2 != null && emergencyContactDetails.mobile2 != " ")
                    {
                        objRecruitmentAgent.EmergancyAltMobile = Convert.ToInt64(emergencyContactDetails.mobile2);
                    }
                    objRecruitmentAgent.EmergancyRelationshipOthers = emergencyContactDetails.others;
                }
                if (DataSerialize.output[0].officialDetails != null)
                {
                    var officialDetails = DataSerialize.output[0].officialDetails;
                    objRecruitmentAgent.PrintName = officialDetails.printName;
                    objRecruitmentAgent.EmployeeOfficialDetailsPosition = officialDetails.position;
                    objRecruitmentAgent.Designation = officialDetails.designation;
                    objRecruitmentAgent.EPFNo       = officialDetails.epfNo;
                    objRecruitmentAgent.OldEPFNo    = officialDetails.oldEPFNo;
                    objRecruitmentAgent.BranchCode  = officialDetails.branchCode;
                    //objRecruitmentAgent.ZoneCode=officialDetails.re
                }
                if (DataSerialize.output[0].reportingDetails != null)
                {
                    var reportingDetails = DataSerialize.output[0].reportingDetails;
                    objRecruitmentAgent.ReportingCode        = reportingDetails.code;
                    objRecruitmentAgent.ReportingDesignation = reportingDetails.designation;
                    objRecruitmentAgent.ReportingPosition    = reportingDetails.position;
                    objRecruitmentAgent.Name = reportingDetails.name;
                }
            }
            return(objRecruitmentAgent);
        }