protected void btApplyJob_Click(object sender, EventArgs e) { try { User2 = (User)Session["User"]; if (User2 != null) { var dataNumber = GetAllAppliedJobs(Convert.ToInt32(User2.UserId)).Rows.Count; if (dataNumber >= 3) { JavaScriptAleart("Bạn chỉ được ứng tuyển tối đa 3 công việc"); return; } int jobid = Convert.ToInt32(Request.QueryString["jobid"]); var dao = new DaoResume(); var resumeid = Convert.ToInt32(dao.GetResumeActive(Convert.ToInt32(User2.UserId)).Rows[0]["ResumeID"]); JavaScriptAleart(ApplyJobs(Convert.ToInt32(User2.UserId), jobid, resumeid) ? "Nộp Hồ Sơ Thành Công" : "Nộp Hồ Sơ Thất Bại, Hồ Sơ Của Bạn Có Thể Đã Được Nộp Trước Đó"); } else { Session["url"] = HttpContext.Current.Request.Url.ToString(); Response.Redirect("Login.aspx"); } } catch (Exception exception) { JavaScriptAleart(exception.Message); } }
public bool DeleteAResume(int resumeId, int userId) { var dt = new DaoResume(); if (dt.DeleteAResumeByUser(resumeId, userId) > 0) { return(true); } return(false); }
private bool SaveResumeInfo() { var dao = new DaoResume(); var temp = dao.AddAResumeInfo(ResumeName, Convert.ToInt32(Certificate.CertificateId), Convert.ToInt32(JobSalaryLevel.JobSalaryLevelId), Convert.ToInt32(LangSkill.SillId), Convert.ToInt32(Province.Id), Convert.ToInt32(JobIndustries.JobIndutriesId), Convert.ToInt32(JobPosition.JobPositionId) , Convert.ToInt32(ExperienceLevel.ExperianceLevelId), Convert.ToInt32(WorkType.WorkTypeId), Achievement, CareerGoal, WorkExperience, Literacy, Skill, Reference, Convert.ToInt32(User.UserId), ContactEmail, Atachment); if (temp > 0) { return(true); } return(false); }
public void SetFullResumeInfo() { var dao = new DaoResume(); DataTable infoTable = dao.GetFullResumeInfoById(Convert.ToInt32(ResumeId)); Certificate = new Certificate(infoTable.Rows[0]["CertificateID"].ToString(), infoTable.Rows[0]["CertificateName"].ToString()); LangSkill = new LangSkill(infoTable.Rows[0]["SkillID"].ToString(), infoTable.Rows[0]["SkillName"].ToString()); JobSalaryLevel = new JobSalaryLevel(infoTable.Rows[0]["SalaryLevelID"].ToString(), infoTable.Rows[0]["SalaryLevel"].ToString()); Province = new Province(infoTable.Rows[0]["ProvinceID"].ToString(), infoTable.Rows[0]["ProvinceName"].ToString()); JobIndustries = new JobIndustries(infoTable.Rows[0]["JobIndustryID"].ToString(), infoTable.Rows[0]["JobIndustryName"].ToString()); JobPosition = new JobPosition(infoTable.Rows[0]["JobPositionID"].ToString(), infoTable.Rows[0]["JobPositionName"].ToString()); User = new User(infoTable.Rows[0]["UserID"].ToString()); ExperienceLevel = new ExperienceLevel(infoTable.Rows[0]["ExperienceLevelID"].ToString(), infoTable.Rows[0]["ExperienceLevelName"].ToString()); WorkType = new WorkType(infoTable.Rows[0]["WorkTypeID"].ToString(), infoTable.Rows[0]["WorkTypeName"].ToString()); Achievement = infoTable.Rows[0]["ACHIEVEMENTS"].ToString(); CareerGoal = infoTable.Rows[0]["CAREER_GOALS"].ToString(); WorkExperience = infoTable.Rows[0]["WORK_EXPERIENCE"].ToString(); Literacy = infoTable.Rows[0]["LITERACY"].ToString(); Skill = infoTable.Rows[0]["SKILLS"].ToString(); Reference = infoTable.Rows[0]["REFERENCE"].ToString(); ContactEmail = infoTable.Rows[0]["ContactEmail"].ToString(); ResumeName = infoTable.Rows[0]["ResumeName"].ToString(); Atachment = infoTable.Rows[0]["ATTACHMENT"].ToString(); }
public DataTable GetAllMyResumes(int userId) { var dt = new DaoResume(); return(dt.GetAllMyResumes(userId)); }
protected bool RecruitPeople(int recruiterId, int resumeId, int jobId) { var dao = new DaoResume(); return(dao.SetResumeRecruitedByRecruiter(recruiterId, resumeId, jobId) > 0); }
public bool UpdateAllResumeUnActive(int userId) { var dt = new DaoResume(); return(dt.UpdateAllResumeUnActive(userId) > 0); }
public bool UpdateJobsActiveByUser(int resumeId) { var dt = new DaoResume(); return(dt.UpdateJobsActiveByUser(resumeId) > 0); }
protected DataTable GetResumes(string certificateId, string jobSalaryLevelId, string provinceId, string jobIndutriesId, string jobPositionId, string experienceLevelId, string workTypeId, string userid, string langskillid, string sexid) { var dao = new DaoResume(); return(dao.FilterResumes(certificateId, jobSalaryLevelId, provinceId, jobIndutriesId, jobPositionId, experienceLevelId, workTypeId, userid, langskillid, sexid)); }
protected DataTable GetResumeRecruitedJob(string jobid) { var dao = new DaoResume(); return(dao.GetResumeRecruitedJob(Convert.ToInt32(jobid))); }
protected DataTable GetResumeInfo() { var dao = new DaoResume(); return(dao.GetResumeInfo()); }
public List <Resume> ResumesRanking() { try { var dao = new DaoResume(); DataTable tableData = dao.GetResumeRecommended(); var listRankResumes = new List <Resume>(); if (tableData != null && tableData.Rows.Count > 0) { foreach (DataRow dataRow in tableData.Rows) { int rank = 1; rank += JobPosition.JobPositionId == dataRow["JobPositionID"].ToString() ? 1 : 0; rank += WorkType.WorkTypeId == dataRow["WorkTypeID"].ToString() ? 1 : 0; rank += ExperienceLevel.ExperianceLevelId == dataRow["ExperienceLevelID"].ToString() ? 1 : 0; rank += Certificate.CertificateId == dataRow["CertificateID"].ToString() ? 1 : 0; rank += JobIndustries.JobIndutriesId == dataRow["JobIndustryID"].ToString() ? 1 : 0; rank += JobSalaryLevel.JobSalaryLevelId == dataRow["SalaryLevelID"].ToString() ? 1 : 0; switch (dataRow["SkillID"].ToString()) { case "1": case "2": rank += 0; break; case "3": rank += 1; break; case "4": case "7": case "8": case "9": case "10": rank += 2; break; case "5": case "6": rank += 3; break; case "11": rank -= 2; break; default: break; } var resume = new Resume(dataRow["ResumeID"].ToString(), rank); resume.SetFullResumeInfo(); listRankResumes.Add(resume); } } return(listRankResumes); } catch (Exception exception) { Console.Write(exception); return(null); } }