protected void btnSubmitInfoCompany_OnClick(object sender, EventArgs e) { try { var companyName = txtFullNameCompany.Text; var companyShortName = txtShortNameCompany.Text; var companySize = new CompanySize(ddlQuyMoCongTy.SelectedValue, ddlQuyMoCongTy.SelectedItem.Text); var address = txtAddress.Text; Recruitor1 = (Recruitor)Session["Recruitor"]; var returnValue = Recruitor1.SetFullCompanyInfo(companyName, companyShortName, companySize, address); SetExistRecruiterInfo(); if (returnValue) { Session["Recruitor"] = Recruitor1; SetExistRecruiterInfo(); JavaScriptAleart("Thực hiện thành công"); } else { JavaScriptAleart("Chỉnh sửa không thành công. Vui lòng load lại trang và thử lại"); } } catch (Exception) { JavaScriptAleart("Chỉnh sửa không thành công. Vui lòng load lại trang và thử lại"); } }
protected void btnSubmitContactInfo_OnClick(object sender, EventArgs e) { try { var recruitorName = txtPeopleContact.Text; var phoneContact = txtPhoneContact.Text; var emailContact = txtEmailContact.Text; Recruitor1 = (Recruitor)Session["Recruitor"]; var returnValue = Recruitor1.SetFullContactInfo(recruitorName, phoneContact, emailContact); SetExistRecruiterInfo(); if (returnValue) { Session["Recruitor"] = Recruitor1; SetExistRecruiterInfo(); JavaScriptAleart("Thực hiện thành công"); } else { JavaScriptAleart("Chỉnh sửa không thành công. Vui lòng load lại trang và thử lại"); } } catch (Exception) { JavaScriptAleart("Chỉnh sửa không thành công. Vui lòng load lại trang và thử lại"); } }
public int SetFullJobInfo(string jobTitle, Certificate certificate, JobSalaryLevel salary, Province location, JobIndustries category, string jobDatail, string jobDescription, DateTime expiredDate, JobPosition jobPosition, ExperienceLevel experience, WorkType type, Recruitor recruitor, string numsApplicant) { JobTitle = jobTitle; Certificate = certificate; JobSalaryLevel = salary; Province = location; JobIndustries = category; ContentDetail = jobDatail; Description = jobDescription; ExpiredDate = expiredDate; WorkType = type; JobPosition = jobPosition; ExperienceLevel = experience; Recruitor = recruitor; NumsApplicant = numsApplicant; return(SaveJobInfo()); }
public bool SetFullJobInfo(string jobTitle, Certificate certificate, JobSalaryLevel salary, Province location, JobIndustries category, string jobDatail, string jobDescription, DateTime deadLine, JobPosition jobPostion, ExperienceLevel jobExperienceLevel, WorkType worktype, Recruitor recruitor, string numsApplicant, string jobid) { JobId = jobid; JobTitle = jobTitle; Certificate = certificate; JobSalaryLevel = salary; Province = location; JobIndustries = category; ContentDetail = jobDatail; Description = jobDescription; ExpiredDate = deadLine; WorkType = worktype; JobPosition = jobPostion; ExperienceLevel = jobExperienceLevel; Recruitor = recruitor; NumsApplicant = numsApplicant; return(SaveJobInfoUpdate()); }
public void SetFullJobInfo() { var dao = new DaoJobs(); DataTable infoTable = dao.GetFullJobInforById(Convert.ToInt32(JobId)); ContentDetail = infoTable.Rows[0]["ContentDetail"].ToString(); Description = infoTable.Rows[0]["Description"].ToString(); JobTitle = infoTable.Rows[0]["FullTitle"].ToString(); NumsApplicant = infoTable.Rows[0]["NumsApplicant"].ToString(); ExpiredDate = Convert.ToDateTime(infoTable.Rows[0]["ExpiredDate"]); JobSalaryLevel = new JobSalaryLevel(infoTable.Rows[0]["SalaryLevelID"].ToString(), infoTable.Rows[0]["SalaryLevel"].ToString()); JobIndustries = new JobIndustries(infoTable.Rows[0]["JobIndustryID"].ToString(), infoTable.Rows[0]["JobIndustryName"].ToString()); Province = new Province(infoTable.Rows[0]["ProvinceID"].ToString(), infoTable.Rows[0]["ProvinceName"].ToString()); JobPosition = new JobPosition(infoTable.Rows[0]["JobPositionID"].ToString(), infoTable.Rows[0]["JobPositionName"].ToString()); JobIndustries = new JobIndustries(infoTable.Rows[0]["JobIndustryID"].ToString(), infoTable.Rows[0]["JobIndustryName"].ToString()); WorkType = new WorkType(infoTable.Rows[0]["WorkTypeID"].ToString(), infoTable.Rows[0]["WorkTypeName"].ToString()); Certificate = new Certificate(infoTable.Rows[0]["CertificateID"].ToString(), infoTable.Rows[0]["CertificateName"].ToString()); ExperienceLevel = new ExperienceLevel(infoTable.Rows[0]["ExperienceLevelID"].ToString(), infoTable.Rows[0]["ExperienceLevelName"].ToString()); RewriteUrl = infoTable.Rows[0]["RewriteUrl"].ToString(); var companySize = new CompanySize(infoTable.Rows[0]["CompanySizeID"].ToString(), infoTable.Rows[0]["CompanySize"].ToString()); Recruitor = new Recruitor(infoTable.Rows[0]["CompanyFullName"].ToString(), infoTable.Rows[0]["RecruitorName"].ToString(), companySize, infoTable.Rows[0]["Address"].ToString()); }
protected void btnSubmit_OnClick(object sender, EventArgs e) { var login = new Models.Objects.Login(txtEmailId.Text, txtPassWord.Text); if (login.CheckLogin()==1) { DataTable dataTable = login.GetUserInfo(1); Session["Login"] = login; string userId = dataTable.Rows[0]["UserID"].ToString(); string emailLogin = dataTable.Rows[0]["Email"].ToString(); string firstName = dataTable.Rows[0]["FirstName"].ToString(); DateTime dateOfBirth = Convert.ToDateTime(dataTable.Rows[0]["DateOfBirth"].ToString()); var address = new Address(); var sex = new Sex(); var user = new User(userId, emailLogin, firstName,dateOfBirth, sex, address); Session["User"] = user; var url = (string)Session["url"]; JavaScriptAleart(url); if (!string.IsNullOrEmpty(url)) { Session["url"] = String.Empty; Response.Redirect(url); } else { Response.Redirect("Home.aspx"); } } else if (login.CheckLogin() == 2) { DataTable dataTable = login.GetUserInfo(2); Session["Login"] = login; string recruitorId = dataTable.Rows[0]["RecruitorID"].ToString(); string emailLogin = dataTable.Rows[0]["EmailLogin"].ToString(); string companyName = dataTable.Rows[0]["CompanyFullName"].ToString(); var address = dataTable.Rows[0]["Address"].ToString(); var phone = dataTable.Rows[0]["PhoneToCallForJob"].ToString(); var recruitorName = dataTable.Rows[0]["RecruitorName"].ToString(); var recruitor = new Recruitor(recruitorId, emailLogin, companyName, recruitorName, phone, address); Session["Recruitor"] = recruitor; Response.Redirect("Recruiters.aspx"); } else { JavaScriptAleart("Tài khoản,mật khẩu không chính xác! Hoặc có thể chưa được kích hoạt hay đã bị khóa, vui lòng liên hệ vơi quản trị viên để biết thêm thông tin "); } }
protected void btnSubmitRecuitmentInfo_OnClick(object sender, EventArgs e) { try { Recruitor1 = (Recruitor)Session["Recruitor"]; var jobTitle = txtJobTitle.Text; var numsApplicant = txtNumsApplicant.Text; var recruitor = new Recruitor(Recruitor1.Email, Recruitor1.RecruitorId); var certificate = new Certificate(ddlDegrees.SelectedValue, ddlDegrees.SelectedItem.Text); var salary = new JobSalaryLevel(ddlSalary.SelectedValue, ddlSalary.SelectedItem.Text); var location = new Province(ddlRegions.SelectedValue, ddlRegions.SelectedItem.Text); var category = new JobIndustries(ddlCategories.SelectedValue, ddlCategories.SelectedItem.Text); var jobPostion = new JobPosition(ddlJobPosition.SelectedValue, ddlJobPosition.SelectedItem.Text); var jobExperienceLevel = new ExperienceLevel(ddlJobExperienceLevel.SelectedValue, ddlJobExperienceLevel.SelectedItem.Text); var worktype = new WorkType(ddlWorkType.SelectedValue, ddlWorkType.SelectedItem.Text); var jobDatail = txtJobDetail.Value; var jobDescription = txtDescription.Value; var deadLine = Convert.ToDateTime(tbDeadline.Value); Jobs1 = new Jobs(); var jobid = Request.QueryString["jobid"]; if (jobid != null) { var returnValue = Jobs1.SetFullJobInfo(jobTitle, certificate, salary, location, category, jobDatail, jobDescription, deadLine, jobPostion, jobExperienceLevel, worktype, recruitor, numsApplicant, jobid); if (returnValue) { Session["Job"] = Jobs1; var emailContent = BuidRecommendResume(jobid); SendEmailMember(emailContent, Recruitor1.EmailToSendResume); JavaScriptAleart("Thực hiện thành công"); } else { JavaScriptAleart("Thực hiện không thành công. Vui lòng load lại trang và thử lại"); } } else { var returnValue1 = Jobs1.SetFullJobInfo(jobTitle, certificate, salary, location, category, jobDatail, jobDescription, deadLine, jobPostion, jobExperienceLevel, worktype, recruitor, numsApplicant); if (returnValue1>0) { Session["Job"] = Jobs1; var emailContent = BuidRecommendResume(returnValue1.ToString()); JavaScriptAleart(emailContent); SendEmailMember(emailContent, Recruitor1.EmailToSendResume); JavaScriptAleart("Thực hiện thành công"); } else { JavaScriptAleart("Thực hiện không thành công. Vui lòng load lại trang và thử lại"); } } } catch (Exception exception) { JavaScriptAleart(exception.Message); } }
protected void btnCancle_OnClick(object sender, EventArgs e) { Recruitor1 = (Recruitor)Session["Recruitor"]; SetExistRecruiterInfo(); }
private void SetExistRecruiterInfo() { Recruitor1 = (Recruitor)Session["Recruitor"]; if (Recruitor1 == null) { Session["Jobs"] = null; Session["Login"] = null; Session["Recruitor"] = null; Response.Redirect("Login.aspx"); } else { Recruitor1.SetFullRecruiterInfo(); Session["Recruitor"] = Recruitor1; txtFullNameCompany.Text = Recruitor1.CompanyFullname; txtAddress.Text = Recruitor1.Address; txtShortNameCompany.Text = Recruitor1.CompanyShortname; txtPeopleContact.Text = Recruitor1.RecruitorName; txtPhoneContact.Text = Recruitor1.PhoneToCallForJob; txtEmailContact.Text = Recruitor1.EmailToSendResume; BindDropDownList(ddlQuyMoCongTy, GetAllCompanySize(), "CompanySize", "CompanySizeID"); ddlQuyMoCongTy.SelectedValue = Recruitor1.CompanySize.CompanySizeId; } }
public bool SetFullJobInfo(string jobTitle, Certificate certificate, JobSalaryLevel salary, Province location, JobIndustries category, string jobDatail, string jobDescription, DateTime deadLine, JobPosition jobPostion, ExperienceLevel jobExperienceLevel, WorkType worktype, Recruitor recruitor, string numsApplicant, string jobid) { JobId = jobid; JobTitle = jobTitle; Certificate = certificate; JobSalaryLevel = salary; Province = location; JobIndustries = category; ContentDetail = jobDatail; Description = jobDescription; ExpiredDate = deadLine; WorkType = worktype; JobPosition = jobPostion; ExperienceLevel = jobExperienceLevel; Recruitor = recruitor; NumsApplicant = numsApplicant; return SaveJobInfoUpdate(); }
public int SetFullJobInfo(string jobTitle, Certificate certificate, JobSalaryLevel salary, Province location, JobIndustries category, string jobDatail, string jobDescription, DateTime expiredDate, JobPosition jobPosition, ExperienceLevel experience, WorkType type, Recruitor recruitor, string numsApplicant) { JobTitle = jobTitle; Certificate = certificate; JobSalaryLevel = salary; Province = location; JobIndustries = category; ContentDetail = jobDatail; Description = jobDescription; ExpiredDate = expiredDate; WorkType = type; JobPosition = jobPosition; ExperienceLevel = experience; Recruitor = recruitor; NumsApplicant = numsApplicant; return SaveJobInfo(); }