protected void btnSubmit_Click(object sender, EventArgs e) { try { BEJobAlerts beJob = new BEJobAlerts(); BA_JobAlerts baJob = new BA_JobAlerts(); beJob.jobSeekerID = Session["PSJUID"].ToString(); beJob.keywords = txtKeywords.Text; beJob.location = ddlLocation.SelectedItem.Text; beJob.category = ddlCategory.SelectedItem.Text;; beJob.functionalarea = ddlFunctionalArea.SelectedItem.Text; beJob.expYears = Convert.ToInt32(ddlYears.SelectedValue); beJob.expMonths = Convert.ToInt32(ddlMonths.SelectedValue); beJob.type = 1; beJob.id = 0; baJob.SetJobAlert(beJob); txtKeywords.Text = ""; ddlLocation.SelectedValue = "Select"; ddlCategory.SelectedValue = "Select"; ddlMonths.SelectedValue = "-1"; ddlYears.SelectedValue = "-1"; ddlFunctionalArea.Items.Clear(); GetJobs(); lblmsg.Text = "Job Alert Successfully Created"; } catch (Exception eg) { throw (eg); } }
protected void btnupdate_Click(object sender, EventArgs e) { BEJobAlerts beJob = new BEJobAlerts(); BA_JobAlerts baJob = new BA_JobAlerts(); beJob.jobSeekerID = Session["PSJUID"].ToString(); beJob.keywords = txtKeyword.Text; beJob.location = ddlStateEdit.SelectedItem.Text; beJob.category = ddlCategoryEdit.SelectedItem.Text;; beJob.functionalarea = ddlFuncAreaEdit.SelectedItem.Text; beJob.expYears = Convert.ToInt32(ddlExpFrom.SelectedValue); beJob.expMonths = Convert.ToInt32(ddlExpTo.SelectedValue); beJob.id = int.Parse(ViewState["JobId"].ToString()); beJob.type = 2; baJob.SetJobAlert(beJob); txtKeywords.Text = ""; ddlStateEdit.SelectedValue = "Select"; ddlCategoryEdit.SelectedValue = "Select"; ddlExpFrom.SelectedValue = "-1"; ddlExpTo.SelectedValue = "-1"; ddlFuncAreaEdit.Items.Clear(); GetJobs(); lblmsg.Text = "Job Alert Modified"; }