protected void submit_Click1(object sender, EventArgs e)
    {
        //dateinfo.ShortDatePattern = "DD/MM/YYYY";

        ICandidateProfile objCandidateProfile = CandidateProfileFactory.create_Candidates();

        objCandidateProfile.get_CandidateProfileID = (Int32)Session["CandidateProfileID"];
        try
        {
            objCandidateProfile.get_DOB = Convert.ToDateTime(dob.Text);
        }
        catch (Exception)
        {
            string script = "alert('please enter date of birth in DD/MM/YYYY');";
            ClientScript.RegisterClientScriptBlock(this.GetType(), "Alert", script);
        }


        objCandidateProfile.get_Gender        = gender.Text;
        objCandidateProfile.get_Location      = location.Text;
        objCandidateProfile.get_Percentage_10 = Convert.ToSingle(tenth.Text);
        objCandidateProfile.get_Percentage_12 = Convert.ToSingle(twelfth.Text);

        if (gapsedu.SelectedItem.Text == "No")
        {
            objCandidateProfile.get_GapInEducation = 0;
        }
        else
        {
            objCandidateProfile.get_GapInEducation = Convert.ToInt32(gapsedu_months.Text);
        }

        if (gapsexp.SelectedItem.Text == "No")
        {
            objCandidateProfile.get_GapInExperience = 0;
        }
        else
        {
            objCandidateProfile.get_GapInExperience = Convert.ToInt32(gapsexp_months.Text);
        }

        objCandidateProfile.get_VacancyID         = Convert.ToInt32(Session["VacancyID"]);
        objCandidateProfile.get_TestID            = 0;
        objCandidateProfile.get_TestStatus        = 0;
        objCandidateProfile.get_MedicalTestStatus = 0;
        objCandidateProfile.get_BGCTestID         = 0;
        objCandidateProfile.get_BGCTestStatus     = false;


        ICandidateManager objCandidateManager = CandidateManagerFactory.Candidate_Manager();

        if (objCandidateManager.candidate_update(objCandidateProfile) == 1)
        {
            DialogResult result = MessageBox.Show(" Do you want to edit more candidates? ", "Success:", MessageBoxButtons.YesNo);
            if (result == DialogResult.Yes)
            {
                Response.Redirect("Edit_Candidates_byPC.aspx");
            }
            else
            {
                Response.Redirect("Home_PlacementConsultant.aspx");
            }
        }
    }