// To display candidate to Placement Consultant public List <ICandidateProfile> display_candidate_toPC() { try { ICandidateDB objCandidateDB = (ICandidateDB)CandidateDBFactory.Create_CandidateDB(); return(objCandidateDB.getCandidates()); } catch (Exception) { return(null); } }
// To update Medical Status public int med_update(int cand_ID, int Test_status, int Med_status) { ICandidateDB objCandidateDB = CandidateDBFactory.Create_CandidateDB(); List <ICandidateProfile> lstCandidateProfile = objCandidateDB.getCandidates(); foreach (ICandidateProfile objCandidateProfile in lstCandidateProfile) { if (objCandidateProfile.get_CandidateProfileID == cand_ID) { if (objCandidateProfile.get_TestStatus == 4) { objCandidateProfile.get_MedicalTestStatus = Med_status; objCandidateProfile.get_TestStatus = Test_status; return(objCandidateDB.updateCandidates(objCandidateProfile)); } } } return(0); }
// To add candidates. public int AddCandidateProfile(ICandidateProfile cand) { try { ICandidateDB objCandidateDB = CandidateDBFactory.Create_CandidateDB(); VacancyManager objvacancymanager = new VacancyManager(); if (filledstatus_50percent(cand.get_VacancyID) == false) { if (filledstatus_bydate(cand.get_VacancyID) == false) { objCandidateDB.save(cand); return(1); } else if ((filledstatus_bydate(cand.get_VacancyID) == true) && (filledstatus_20percent(cand.get_VacancyID) == true)) { objvacancymanager.updateStatus(cand.get_VacancyID, 2); return(3); } else { return(0); } } else if ((filledstatus_50percent(cand.get_VacancyID) == true) && (filledstatus_bydate(cand.get_VacancyID) == true)) { objvacancymanager.updateStatus(cand.get_VacancyID, 2); return(2); } else { return(0); } } catch (Exception EX) { Console.WriteLine(EX); return(0); } }
// To delete candidate public int DeleteCandidateProfile(int CandidateID) { ICandidateDB objCandidateDB = CandidateDBFactory.Create_CandidateDB(); return(objCandidateDB.delete(CandidateID)); }
public List <int> getVacancies() { ICandidateDB objCandidateDB = CandidateDBFactory.Create_CandidateDB(); return(objCandidateDB.Vacancies()); }
// To update candidates public int candidate_update(ICandidateProfile objCandidateProfile) { ICandidateDB objCandidateDB = CandidateDBFactory.Create_CandidateDB(); return(objCandidateDB.updateCandidates(objCandidateProfile)); }