Beispiel #1
0
    protected void BtnUpdateInterviewProcess_Click(object sender, EventArgs e)
    {
        if (TxtNumberOfAptitude.Text == string.Empty || int.Parse(TxtNumberOfAptitude.Text) <= 0)
        {
            LblNumberOfAptitudeError.Visible = true;
            TxtNumberOfAptitude.Focus();
            return;
        }
        if (TxtNumberOfGD.Text == string.Empty || int.Parse(TxtNumberOfGD.Text) <= 0)
        {
            LblNumberOfGDError.Visible = true;
            TxtNumberOfGD.Focus();
            return;
        }
        if (TxtNumberOfTechnical.Text == string.Empty || int.Parse(TxtNumberOfTechnical.Text) <= 0)
        {
            LblNumberOfTechnicalError.Visible = true;
            TxtNumberOfTechnical.Focus();
            return;
        }
        if (TxtNumberOfInterviews.Text == string.Empty || int.Parse(TxtNumberOfInterviews.Text) <= 0)
        {
            LblNumberOfInteviewsError.Visible = true;
            TxtNumberOfInterviews.Focus();
            return;
        }
        JobPost_InterviewProcess ObjInterViewProcess = new JobPost_InterviewProcess(int.Parse(JobPost_InterviewProcess.GetJobPost_InterviewProcessRecords("JobPostId=" + Request.QueryString["Id"]).Rows[0]["Id"].ToString()));

        ObjInterViewProcess.NumberOfAptitudeTests      = int.Parse(TxtNumberOfAptitude.Text);
        ObjInterViewProcess.NumberOfGDs                = int.Parse(TxtNumberOfGD.Text);
        ObjInterViewProcess.NumberOfTechnicalRounds    = int.Parse(TxtNumberOfTechnical.Text);
        ObjInterViewProcess.NumberOfPersonalInterviews = int.Parse(TxtNumberOfInterviews.Text);
        ObjInterViewProcess.Update();
        EditInterViewProcessModal.Visible = false;
        this.Form.DefaultButton           = string.Empty;
        Page_Load(null, null);
    }
Beispiel #2
0
 protected void BtnAdJobPost_Click(object sender, EventArgs e)
 {
     if (this.IsValid == true)
     {
         bool AllOk = true;
         if (CheckCheckboxeList(ChkLstBranches) == false)
         {
             LblSelectBranchError.Visible = true;
             AllOk = false;
         }
         if (DdlAptitude.SelectedIndex != 0 && (TxtNumberOfAptitude.Text == string.Empty || int.Parse(TxtNumberOfAptitude.Text) <= 0))
         {
             LblNumberOfAptitudeError.Visible = true;
             TxtNumberOfAptitude.Focus();
             return;
         }
         if (DdlGD.SelectedIndex != 0 && (TxtNumberOfGD.Text == string.Empty || int.Parse(TxtNumberOfGD.Text) <= 0))
         {
             LblNumberOfGDError.Visible = true;
             TxtNumberOfGD.Focus();
             return;
         }
         if (DdlTechnical.SelectedIndex != 0 && (TxtNumberOfTechnical.Text == string.Empty || int.Parse(TxtNumberOfTechnical.Text) <= 0))
         {
             LblNumberOfTechnicalError.Visible = true;
             TxtNumberOfTechnical.Focus();
             return;
         }
         if (DdlPersonalInterview.SelectedIndex != 0 && (TxtNumberOfInterviews.Text == string.Empty || int.Parse(TxtNumberOfInterviews.Text) <= 0))
         {
             LblNumberOfInteviewsError.Visible = true;
             TxtNumberOfInterviews.Focus();
             return;
         }
         if (JobPost.GetJobPostRecords("JobTitle='" + TxtJobTitle.Text + "' and recruiterId=" + this.Page.User.Identity.Name).Rows.Count > 0)
         {
             LblDuplicateJobTitleError.Visible = true;
             TxtJobTitle.Focus();
             return;
         }
         if (AllOk == false)
         {
             return;
         }
         if (AllOk == true)
         {
             int NewJobPostId = JobPost.AddJobPost(int.Parse(this.Page.User.Identity.Name), TxtJobTitle.Text, int.Parse(DdlCompany.SelectedValue), int.Parse(DdlDepartment.SelectedValue), int.Parse(DdlDesignation.SelectedValue), BtnLstJobType.SelectedValue, BtnLstGender.SelectedValue, decimal.Parse(TxtMinSalary.Text), decimal.Parse(TxtMaxSalary.Text), TxtJobDescription.Text, "Active");
             foreach (ListItem ObjListItem in ChkLstBranches.Items)
             {
                 if (ObjListItem.Selected == true)
                 {
                     JobPost_Branches.AddJobPost_Branches(NewJobPostId, int.Parse(ObjListItem.Value));
                 }
             }
             JobPost_Requirement.AddJobPost_Requirement(NewJobPostId, int.Parse(DdlDegree.SelectedValue), int.Parse(DdlExperience.SelectedValue));
             DataTable ObjSkillTable = (DataTable)ViewState["SkillTable"];
             foreach (DataRow ObjRow in ObjSkillTable.Rows)
             {
                 JobPost_Skills.AddJobPost_Skills(NewJobPostId, int.Parse(ObjRow["SkillId"].ToString()));
             }
             //throw new Exception(int.Parse(TxtNumberOfGD.Text).ToString());
             JobPost_InterviewProcess.AddJobPost_InterviewProcess(NewJobPostId, DdlAptitude.SelectedValue, int.Parse(TxtNumberOfAptitude.Text), DdlGD.SelectedValue, int.Parse(TxtNumberOfGD.Text), DdlTechnical.SelectedValue, int.Parse(TxtNumberOfTechnical.Text), DdlPersonalInterview.SelectedValue, int.Parse(TxtNumberOfInterviews.Text));
         }
     }
 }