//protected void ddlJobVenue_SelectedIndexChanged(object sender, EventArgs e) //{ // if (ddlJobVenue.SelectedItem.Text != "Select") // { // tblVenue.Visible = true; // } // else // { // tblVenue.Visible = false; // } //} protected void btnVenueConfirm_Click(object sender, EventArgs e) { try { Vacancy objVac = new Vacancy(); objVac.JobID = Convert.ToInt32(ddlJobVenue.SelectedValue); objVac.VenueAddress = txtVenueAddress.Text; objVac.InterviewDate = Convert.ToDateTime(txtInterviewDate.Text); //objVac.InterviewTime = Convert.ToDateTime(txtInterviewTime.Text); int res = new AddJobBO().UpdateJobDetails(objVac); if (res == 1) { txtVenueAddress.Text = null; txtInterviewDate.Text = null; bind(); } } catch (Exception) { lblError.Text = "Something Went Wrong"; } }
protected void btnAdd_Click(object sender, EventArgs e) { try { Vacancy objVacancy = new Vacancy(); objVacancy.JobPosition = txtJobPosition.Text; objVacancy.PostedDate = DateTime.Now; objVacancy.LastDate =Convert.ToDateTime(txtCalender.Text); objVacancy.Country =Convert.ToInt32(ddlCountry.SelectedItem.Value); objVacancy.State =Convert.ToInt32(ddlState.SelectedItem.Value); objVacancy.City =Convert.ToInt32(ddlCity.SelectedItem.Value); objVacancy.Skill =Convert.ToInt32(ddlSkillSet.SelectedItem.Value); objVacancy.EmpId = Convert.ToInt32(Session["ID"].ToString()); objVacancy.VenueAddress = "Testing"; objVacancy.InterviewDate = DateTime.Now; int i = new AddJobBO().AddJob(objVacancy); if (i == 1) { Response.Redirect("ProfileEmployer.aspx"); } if (i == 0) { lblAddError.Text = "Something Went Wrong"; } else { lblAddError.Text = ""; } } catch (Exception) { lblAddError.Text = "Something Went Wrong"; } }
private void AddEdit(NameValueCollection forms, List<Vacancy> collectionEmployee, out string strResponse) { string strOperation = forms.Get("oper"); string strEmpId = string.Empty; if (strOperation == "edit") { strEmpId = forms.Get("JobId").ToString(); } else if (strOperation == "add") { strResponse = "Adding functionality not yet implemented"; // var result = collectionEmployee.AsQueryable<Vacancy>().Select(c => c.JobID).Max(); // strEmpId = (Convert.ToInt32(result) + 1).ToString(); } Vacancy objVac=new Vacancy(); objVac.JobID =Convert.ToInt32(strEmpId); objVac.JobPosition= forms.Get("JobPosition").ToString(); objVac.CompanyName = forms.Get("CompanyName").ToString(); objVac.LastDate=Convert.ToDateTime(forms.Get("LastDate").ToString()); objVac.Skill =Convert.ToInt32(forms.Get("Skill").ToString()); objVac.City =Convert.ToInt32(forms.Get("City").ToString()); objVac.Qualification = forms.Get("Qualification").ToString().Trim(); objVac.Experience = forms.Get("Experience").ToString(); objVac.Salary = forms.Get("Salary").ToString(); int res= new AddJobBO().JQGridDetailsUpdate(objVac); if (res == 1) { strResponse = "Employee record successfully updated"; } else { strResponse = "Something went wrong"; } }
protected void btnAdd_Click(object sender, EventArgs e) { try { Vacancy objVacancy = new Vacancy(); objVacancy.JobPosition = txtJobPosition.Text; objVacancy.PostedDate = DateTime.Now; objVacancy.LastDate = Convert.ToDateTime(txtCalender.Text); objVacancy.Country = Convert.ToInt32(ddlCountry.SelectedItem.Value); objVacancy.State = Convert.ToInt32(ddlState.SelectedItem.Value); objVacancy.City = Convert.ToInt32(ddlCity.SelectedItem.Value); objVacancy.Skill = Convert.ToInt32(ddlSkillSet.SelectedItem.Value); objVacancy.EmpId = Convert.ToInt32(Session["ID"].ToString()); objVacancy.Qualification = txtJobQualification.Text; objVacancy.VenueAddress = ""; objVacancy.OtherSkills = txtOtherSkills.Text; objVacancy.CompanyName = txtCompanyName.Text; objVacancy.Experience = ddlExperienceSel.Items[ddlExperienceSel.SelectedIndex].Value; objVacancy.Salary = ddlSalarySel.Items[ddlSalarySel.SelectedIndex].Value; objVacancy.CompanyUrl = txtJobCompanyUrl.Text; objVacancy.JobDescription = txtAreaJobDescription.InnerText; objVacancy.InterviewDate = DateTime.Now; int i = new AddJobBO().InsertNew<Vacancy>(objVacancy); if (i == 1) { Response.Redirect("ProfileEmployer.aspx"); } if (i == 0) { lblAddError.Text = "Something Went Wrong"; } else { lblAddError.Text = ""; } } catch (Exception) { lblAddError.Text = "Something Went Wrong"; } }