public int Add(AccountDetails job) //Insert DB Details { string encryptPassword = Encrypt(job.Password); using (DBUtills db = new DBUtills()) { job.Password = encryptPassword; db.AccountDb.Add(job); db.SaveChanges(); return(job.AccountId); } //SqlParameter firstName = new SqlParameter("@FirstName", job.FirstName);//sample for stored procedures //SqlParameter lastName = new SqlParameter("@LastName", job.LastName); //SqlParameter address = new SqlParameter("@Address", job.Address); //SqlParameter gender = new SqlParameter("@Gender", job.Gender); //SqlParameter phone = new SqlParameter("@PhoneNumber", job.PhoneNumber); //SqlParameter password = new SqlParameter("@Password", job.Password); //SqlParameter role = new SqlParameter("@Role", job.Role); //SqlParameter countryId = new SqlParameter("@CountryId", job.CountryId); //SqlParameter email = new SqlParameter("@Email", job.Email); //try //{ //int result = db.Database.ExecuteSqlCommand("sp_InsertAccountDetails @FirstName,@LastName, @Address,@Gender,@PhoneNumber,@Password,@Role,@CountryId,@Email", firstName, lastName, address, gender, phone, password, role, countryId, email); //return result; //} //catch (System.Data.SqlClient.SqlException) //{ // return 0; //} //db.AccountDb.Add(job); //db.SaveChanges(); }
/*Recruiter*/ public void AddRecruiterDetails(RecruiterJobDetails job) //Insert recruiter vacancy { using (DBUtills db = new DBUtills()) { db.RecruiterDb.Add(job); db.SaveChanges(); } }
public void AddExperience(WorkExperiences work) //Add work experience { using (DBUtills dB = new DBUtills()) { dB.WorkExperienceDb.Add(work); dB.SaveChanges(); } }
public void AddCgpa(Cgpas cgpa) //Add Cgpas { using (DBUtills db = new DBUtills()) { db.CgpaDb.Add(cgpa); db.SaveChanges(); } }
public void UpdateLocation(Locations locations) //Update Location { using (DBUtills dBUtills = new DBUtills()) { dBUtills.Entry(locations).State = EntityState.Modified; dBUtills.SaveChanges(); } }
public void AddProfile(RecruiterProfile profile) //Add profile { using (DBUtills db = new DBUtills()) { db.ProfileDb.Add(profile); db.SaveChanges(); } }
public void UpdateCgpa(Cgpas job) //Update Cgpas { using (DBUtills dBUtills = new DBUtills()) { dBUtills.Entry(job).State = EntityState.Modified; dBUtills.SaveChanges(); } }
public void AddLocation(Locations locations) //Add Location { using (DBUtills db = new DBUtills()) { db.LocationDb.Add(locations); db.SaveChanges(); } }
public void UpdateJobType(JobTypes job) //Update Jobtypes { using (DBUtills dBUtills = new DBUtills()) { dBUtills.Entry(job).State = EntityState.Modified; dBUtills.SaveChanges(); } }
public void UpdateVacancyMatching(VacancyMatching matching) //Update Location { using (DBUtills dBUtills = new DBUtills()) { dBUtills.Entry(matching).State = EntityState.Modified; dBUtills.SaveChanges(); } }
public void AddJobTypes(JobTypes job) //Add JobTypes { using (DBUtills db = new DBUtills()) { db.JobTypeDb.Add(job); db.SaveChanges(); } }
public void AddMatching(VacancyMatching vacancyMatching) //Add details to vacancy matching { using (DBUtills db = new DBUtills()) { db.VacancyDB.Add(vacancyMatching); db.SaveChanges(); } }
public void AddCandidateDetails(SearcherJobDetails job) //Insert searcher application { using (DBUtills db = new DBUtills()) { db.SearcherDb.Add(job); db.SaveChanges(); } }
public Locations EditLocation(int idValue) //Fetch particular location { using (DBUtills dBUtills = new DBUtills()) { Locations loc = null; loc = dBUtills.LocationDb.Find(idValue); return(loc); } }
public SearcherSkillSets FetchSkill(int log) //Check Skill Exists { using (DBUtills db = new DBUtills()) { SearcherSkillSets output = null; output = db.SkillDb.Find(log); return(output); } }
public void RemoveFile(int idValue) //Delete files { using (DBUtills dBUtills = new DBUtills()) { Resume resume = dBUtills.ResumeDb.Find(idValue); dBUtills.ResumeDb.Remove(resume); dBUtills.SaveChanges(); } }
public void RemoveCgpa(int idValue) //Delete Cgpas { using (DBUtills dBUtills = new DBUtills()) { Cgpas job = dBUtills.CgpaDb.Find(idValue); dBUtills.CgpaDb.Remove(job); dBUtills.SaveChanges(); } }
public JobTypes EditJobType(int idValue) //Fetch particular Jobtypes { using (DBUtills dBUtills = new DBUtills()) { JobTypes job = null; job = dBUtills.JobTypeDb.Find(idValue); return(job); } }
public void RemoveJobType(int idValue) //Delete Jobtypes { using (DBUtills dBUtills = new DBUtills()) { JobTypes job = dBUtills.JobTypeDb.Find(idValue); dBUtills.JobTypeDb.Remove(job); dBUtills.SaveChanges(); } }
public Cgpas EditCgpa(int idValue) //Fetch particular Cgpas { using (DBUtills dBUtills = new DBUtills()) { Cgpas job = null; job = dBUtills.CgpaDb.Find(idValue); return(job); } }
public void RemoveExperience(int idValue) //Delete experience { using (DBUtills dBUtills = new DBUtills()) { WorkExperiences work = dBUtills.WorkExperienceDb.Find(idValue); dBUtills.WorkExperienceDb.Remove(work); dBUtills.SaveChanges(); } }
public void RemoveValue(int idValue) //Delete DB Details { using (DBUtills dBUtills = new DBUtills()) { AccountDetails account = dBUtills.AccountDb.Find(idValue); dBUtills.AccountDb.Remove(account); dBUtills.SaveChanges(); } }
public void RemoveLocation(int idValue) //Delete Location { using (DBUtills dBUtills = new DBUtills()) { Locations loc = dBUtills.LocationDb.Find(idValue); dBUtills.LocationDb.Remove(loc); dBUtills.SaveChanges(); } }
public int Update(AccountDetails job) //Update details { using (DBUtills dBUtills = new DBUtills()) { dBUtills.Entry(job).State = EntityState.Modified; dBUtills.SaveChanges(); return(1); } }
public void RemoveVacancy(int idValue) //Delete vacancy { using (DBUtills dBUtills = new DBUtills()) { RecruiterJobDetails loc = dBUtills.RecruiterDb.Find(idValue); dBUtills.RecruiterDb.Remove(loc); dBUtills.SaveChanges(); } }
public IEnumerable <AccountDetails> GetDetails() //View DB Details { using (DBUtills dBUtills = new DBUtills()) { IEnumerable <AccountDetails> account = null; account = dBUtills.AccountDb.Where(s => s.Role != "Admin").ToList(); return(account); } }
public VacancyMatching FetchMatch(int id) //Fetch individual detail from vacancy matching table { VacancyMatching vacancy = null; using (DBUtills db = new DBUtills()) { vacancy = db.VacancyDB.FirstOrDefault(item => item.ResumeId == id); } return(vacancy); }
public IEnumerable <SearcherJobDetails> FetchCandidate(int recruiterId) //Extract applied job of searcher { IEnumerable <SearcherJobDetails> account = null; using (DBUtills db = new DBUtills()) { account = db.SearcherDb.Include("Jobtype").Include("cgpa").Where(s => s.AccountId == recruiterId).ToList(); return(account); } }
/*Searcher*/ public IEnumerable <SearcherJobDetails> FetchSearcherApplications() //Getting applications of searcher { IEnumerable <SearcherJobDetails> searchers = null; using (DBUtills dB = new DBUtills()) { searchers = dB.SearcherDb.Include("Jobtype").Include("Account").Include("cgpa").ToList(); return(searchers); } }
public RecruiterProfile FetchProfile(int log) //Fetch profile { RecruiterProfile profile = null; using (DBUtills db = new DBUtills()) { profile = db.ProfileDb.FirstOrDefault(id => id.AccountId == log); return(profile); } }