Exemple #1
0
        public PersonalInformationEntity InsertCandidate(PersonalInformationEntity personalInformation)
        {
            var candidate = ConvertToServiceEntity(personalInformation);

            var candidateId = CandidateRepository.InsertCandidate(candidate);

            InsertDependents(personalInformation, candidateId);

            //InsertEmploymentDetails(candidateDisplayEntity, candidateId);
            //InsertMonthlyEmoluments(candidateDisplayEntity, candidateId);

            personalInformation.CandidateId = candidateId;
            return(personalInformation);
        }
Exemple #2
0
 private CandidateDependents ConvertToDependentsEntity(PersonalInformationEntity personalInformation, int candidateId)
 {
     return(new CandidateDependents()
     {
         CandidateId = candidateId,
         FatherBirthDate = personalInformation.FatherBirthDate,
         FatherName = personalInformation.FatherName,
         MotherName = personalInformation.MotherName,
         MotherBirthDate = personalInformation.MotherBirthDate,
         SpouseName = personalInformation.SpouseName,
         SpouseBirthDate = personalInformation.SpouseBirthDate,
         FirstChildName = personalInformation.FirstChildName,
         FirstChildBirthDate = personalInformation.FirstChildBirthDate,
         SecondChildName = personalInformation.SecondChildName,
         SecondChildBirthDate = personalInformation.SecondChildBirthDate
     });
 }
Exemple #3
0
        public ActionResult Create(PersonalInformationEntity personalInformation)
        {
            try
            {
                if (!ModelState.IsValid)
                {
                    return(View());
                }

                var result = CandidateService.InsertCandidate(personalInformation);
                Session["candidateId"] = result.CandidateId;

                return(RedirectToAction("Create", "ContactInfo", result.CandidateId));
            }
            catch (Exception exception)
            {
                return(View());
            }
        }
Exemple #4
0
        //public List<CandidateDisplayEntity> GetCandidateDetails(int candidateId)
        //{
        //    throw new NotImplementedException();
        //}

        private Candidate ConvertToServiceEntity(PersonalInformationEntity candidate)
        {
            return(new Candidate()
            {
                Prefix = candidate.Prefix,
                FirstName = candidate.FirstName,
                MiddleName = candidate.MiddleName,
                LastName = candidate.LastName,
                BirthDate = candidate.BirthDate,
                Anniversary = candidate.AnniversaryDate,
                Gender = candidate.Gender,
                MaritalStatus = candidate.MaritalStatus,
                Qualification = candidate.Qualification,
                WorkExperience = candidate.WorkExperience,
                PanCardNumber = candidate.PanCardNumber,
                AadharCardNumber = candidate.AadharCardNumber,
                UanNumber = candidate.UanNumber,
                PassportNumber = candidate.PassportNumber,
                PassportExpiry = candidate.PassportExpiry,
                PassportIssuePlace = candidate.PassportIssuePlace,
                VisaExpiry = candidate.VisaExpiry,
                Visa = candidate.Visa
            });
        }
Exemple #5
0
 public bool UpdateCandidate(PersonalInformationEntity personalInformation)
 {
     throw new NotImplementedException();
 }
Exemple #6
0
 private void InsertDependents(PersonalInformationEntity personalInformation, int candidateId)
 {
     CandidateRepository.InsertDependents(ConvertToDependentsEntity(personalInformation, candidateId));
 }