protected void btnUpdate_Click(object sender, EventArgs e)
 {
     try
     {
         EducationalDetailsBAL educationalDetailsBAL = new EducationalDetailsBAL();
         EducationalDetailsEntity educationalDetails = new EducationalDetailsEntity();
         educationalDetails.CandidateId = candidateId;
         educationalDetails.DegreeId = Convert.ToInt32(degreeId); ;
         educationalDetails.MediumOfEducation = ddlMedium.SelectedValue.Trim();
         educationalDetails.OldSpecializationId = Convert.ToInt32(Request.QueryString["sId"]);
         educationalDetails.SpecializationId = Convert.ToInt32(ddlSpecialization.SelectedValue.Trim());
         educationalDetails.Status = rblStat.SelectedValue.Trim();
         educationalDetails.FromYear = ddlMonthFrom.Text + '/' + ddlYearFrom.Text;
         educationalDetails.ToYear = ddlMonthTo.Text + '/' + ddlYearTo.Text;
         educationalDetails.College = txtCollege.Text.Trim();
         educationalDetails.University = txtUniversity.Text.Trim();
         educationalDetails.Percantage = txtPercentage.Text.Trim();
         // Add object to the update education details
         educationalDetailsBAL.UpdateEducationalDetailsBAL(educationalDetails);
         //Response.Redirect("JSViewProfile.aspx");
     }
     catch (Exception)
     {
         // throw;
     }
 }
 /// <summary>
 ///Adding new Bachelor Degree in database
 /// </summary>
 /// <param name="sender">The source of event</param>
 /// <param name="e">the<see cref="EventArgs"/>containing event data</param>
 protected void btnBDAdd_Click(object sender, EventArgs e)
 {
     try
     {
         EducationalDetailsEntity educationalDetailsEntity = new EducationalDetailsEntity();
         EducationalDetailsBAL educationalDetailsBAL = new EducationalDetailsBAL();
         // Assign values to entity
         educationalDetailsEntity.AddBachelorDegreeName = txtBDAdd.Text;
         // Add data to the database
         educationalDetailsBAL.AddBachelorDegreeBAL(educationalDetailsEntity);
         BindDropDownBachelorDegree();
         txtBDAdd.Visible = false;
         btnBDAdd.Visible = false;
     }
     catch (Exception)
     {
         //  throw;
     }
 }
        protected void BtnAddNewEducation_Click(object sender, EventArgs e)
        {
            try
            {
                educationalDetails = new EducationalDetailsBAL();
                DataSet degreeData = new DataSet();
                degreeData = educationalDetails.GetEducationalDegreeTypeBAL(candidateId);
                if (degreeData != null)
                {
                    ddlHQ.DataSource = degreeData;
                    ddlHQ.DataValueField = "degreeId";
                    ddlHQ.DataTextField = "degreeType";
                    ddlHQ.DataBind();
                    ddlHQ.Items.Insert(0, new ListItem("--Select--", "0"));

                    chkList.DataSource = degreeData;
                    chkList.DataValueField = "degreeId";
                    chkList.DataTextField = "degreeType";
                    chkList.DataBind();
                }

                //educationalDetails = new EducationalDetailsBAL();
                //DataSet dsEducationalDetails = new DataSet();
                //dsEducationalDetails = educationalDetails.ViewEducationalDegreeDetailsBAL(candidateId);

                //if (dsEducationalDetails != null)
                {
                    //isAddNewEducation = true;
                    //Response.Redirect("DemoEducationalDetails.aspx?isAddNewEducation=" + isAddNewEducation );

                    divMain.Visible = true;

                    footer.Visible = false;
                }
            }
            catch (Exception)
            {
                //  throw;
            }
        }
        /// <summary>
        /// Method for binding DropDown with DegreeDetails_Table of Database
        /// </summary>
        private void BindDropDownHSC()
        {
            try
            {
                degreeId = 2;
                DataSet dsDegreeDetails = new DataSet();
                educationalDetails = new EducationalDetailsBAL();
                // Get HSC details
                dsDegreeDetails = educationalDetails.GetDegreeDetailsBAL(degreeId);
                if (dsDegreeDetails != null)
                {
                    ddlHSC.DataSource = dsDegreeDetails;
                    ddlHSC.DataValueField = "SpecializationId";
                    ddlHSC.DataTextField = "DegreeName";
                    ddlHSC.DataBind();

                    ddlHSC.Items.Insert(0, new ListItem("--Select--", "0"));
                }
            }
            catch (Exception)
            {
                // throw;
            }
        }
        /// <summary>
        /// Method for binding DropDown with MasterDegree_Table of Database
        /// </summary>
        private void BindDropDownDualMasterDegree()
        {
            try
            {
                degreeId = 6;
                DataSet dsDegreeDetails = new DataSet();
                educationalDetails = new EducationalDetailsBAL();
                // Get Dual Master Degree details
                dsDegreeDetails = educationalDetails.GetDegreeDetailsBAL(degreeId);
                if (dsDegreeDetails != null)
                {
                    ddlDualMD.DataSource = dsDegreeDetails;
                    ddlDualMD.DataValueField = "SpecializationId";
                    ddlDualMD.DataTextField = "DegreeName";
                    ddlDualMD.DataBind();

                    ddlDualMD.Items.Insert(Convert.ToInt32(ddlDualMD.Items.Count), new ListItem("----Other----", ""));
                    ddlDualMD.Items.Insert(0, new ListItem("--Select--", "0"));
                }
            }
            catch (Exception)
            {
                // throw;
            }
        }
        /// <summary>
        /// Handles the Click event of the btnSubmit control.
        /// </summary>
        /// <param name="sender">The source of the event</param>
        /// <param name="e"></param>
        protected void BtnSubmit_Click(object sender, EventArgs e)
        {
            try
            {
                List<EducationalDetailsEntity> educationDetailsList = new List<EducationalDetailsEntity>();
                educationalDetails = new EducationalDetailsBAL();
                // Get only selected checkboxes list
                var selectedDegreeTypes = chkList.Items.Cast<ListItem>().Where(li => li.Selected).ToList();

                foreach (var item in selectedDegreeTypes)
                {
                    switch (item.Text)
                    {
                        case "SSC / 10th":
                            EducationalDetailsEntity sscDetails = new EducationalDetailsEntity();
                            sscDetails.CandidateId = candidateId;
                            sscDetails.HighestQualificationId = ddlHQ.SelectedValue.Trim();
                            sscDetails.DegreeId = Convert.ToInt32(item.Value);
                            sscDetails.MediumOfEducation = ddlSSCMedium.SelectedValue.Trim();
                            sscDetails.SpecializationId = 0;
                            sscDetails.Status = rblSSCStat.SelectedValue.Trim();
                            sscDetails.FromYear = ddlSSCMonthFrom.Text + '/' + ddlSSCYearFrom.Text;
                            sscDetails.ToYear = ddlSSCMonthTo.Text + '/' + ddlSSCYearTo.Text;
                            sscDetails.College = txtSSCSchool.Text.Trim();
                            sscDetails.University = txtSSCBoard.Text.Trim();
                            sscDetails.Percantage = txtSSCPercentage.Text.Trim();
                            // Add object to the education details collection
                            educationDetailsList.Add(sscDetails);
                            break;

                        case "HSC / 12th":
                            EducationalDetailsEntity hscDetails = new EducationalDetailsEntity();
                            hscDetails.CandidateId = candidateId;
                            hscDetails.HighestQualificationId = ddlHQ.SelectedValue.Trim();
                            hscDetails.DegreeId = Convert.ToInt32(item.Value);
                            hscDetails.MediumOfEducation = ddlHSCMedium.SelectedValue.Trim();
                            hscDetails.SpecializationId = Convert.ToInt32(ddlHSC.SelectedValue.Trim());
                            hscDetails.Status = rblHSCStat.SelectedValue.Trim();
                            hscDetails.FromYear = ddlHSCMonthFrom.Text + '/' + ddlHSCYearFrom.Text;
                            hscDetails.ToYear = ddlHSCMonthTo.Text + '/' + ddlHSCYearTo.Text;
                            hscDetails.College = txtHSCCollege.Text.Trim();
                            hscDetails.University = txtHSCBoard.Text.Trim();
                            hscDetails.Percantage = txtHSCPercentage.Text.Trim();
                            // Add object to the education details collection
                            educationDetailsList.Add(hscDetails);
                            break;

                        case "UG Diploma":
                            EducationalDetailsEntity ugDiplomaDetails = new EducationalDetailsEntity();
                            ugDiplomaDetails.CandidateId = candidateId;
                            ugDiplomaDetails.HighestQualificationId = ddlHQ.SelectedValue.Trim();
                            ugDiplomaDetails.DegreeId = Convert.ToInt32(item.Value);
                            ugDiplomaDetails.MediumOfEducation = ddlDipMedium.SelectedValue.Trim();
                            ugDiplomaDetails.SpecializationId = Convert.ToInt32(ddlDip.SelectedValue.Trim());
                            ugDiplomaDetails.Status = rblDipStat.SelectedValue.Trim();
                            ugDiplomaDetails.FromYear = ddlDipMonthFrom.Text + '/' + ddlDipYearFrom.Text;
                            ugDiplomaDetails.ToYear = ddlDipMonthTo.Text + '/' + ddlDipYearTo.Text;
                            ugDiplomaDetails.College = txtDipCollege.Text.Trim();
                            ugDiplomaDetails.University = txtDipUniversity.Text.Trim();
                            ugDiplomaDetails.Percantage = txtDipPercentage.Text.Trim();
                            // Add object to the education details collection
                            educationDetailsList.Add(ugDiplomaDetails);
                            break;

                        case "Bachelors Degree":
                            EducationalDetailsEntity bachelorDegreeDetails = new EducationalDetailsEntity();
                            bachelorDegreeDetails.CandidateId = candidateId;
                            bachelorDegreeDetails.HighestQualificationId = ddlHQ.SelectedValue.Trim();
                            bachelorDegreeDetails.DegreeId = Convert.ToInt32(item.Value);
                            bachelorDegreeDetails.MediumOfEducation = ddlBDMedium.SelectedValue.Trim();
                            bachelorDegreeDetails.Status = rblBDStat.SelectedValue.Trim();
                            bachelorDegreeDetails.SpecializationId = Convert.ToInt32(ddlBD.SelectedValue.Trim());
                            bachelorDegreeDetails.FromYear = ddlBDMonthFrom.Text + '/' + ddlBDYearFrom.Text;
                            bachelorDegreeDetails.ToYear = ddlBDMonthTo.Text + '/' + ddlBDYearTo.Text;
                            bachelorDegreeDetails.College = txtBDCollege.Text.Trim();
                            bachelorDegreeDetails.University = txtBDUniversity.Text.Trim();
                            bachelorDegreeDetails.Percantage = txtBDPercentage.Text.Trim();
                            // Add object to the education details collection
                            educationDetailsList.Add(bachelorDegreeDetails);
                            // functionality for adding records for Dual Bachelore Degree
                            if (pnlCollapsableDualBD.Visible == true)
                            {
                                EducationalDetailsEntity dualBachelorDegreeDetails = new EducationalDetailsEntity();
                                dualBachelorDegreeDetails.CandidateId = candidateId;
                                dualBachelorDegreeDetails.HighestQualificationId = ddlHQ.SelectedValue.Trim();
                                dualBachelorDegreeDetails.DegreeId = Convert.ToInt32(item.Value);
                                dualBachelorDegreeDetails.MediumOfEducation = ddlDualBDMedium.SelectedValue.Trim();
                                dualBachelorDegreeDetails.Status = rblDualBDStat.SelectedValue.Trim();
                                dualBachelorDegreeDetails.SpecializationId = Convert.ToInt32(ddlDualBD.SelectedValue.Trim());
                                dualBachelorDegreeDetails.FromYear = ddlDualBDMonthFrom.Text + '/' + ddlDualBDYearFrom.Text;
                                dualBachelorDegreeDetails.ToYear = ddlDualBDMonthTo.Text + '/' + ddlDualBDYearTo.Text;
                                dualBachelorDegreeDetails.College = txtDualBDCollege.Text.Trim();
                                dualBachelorDegreeDetails.University = txtDualBDUniversity.Text.Trim();
                                dualBachelorDegreeDetails.Percantage = txtDualBDPercentage.Text.Trim();
                                // Add object to the education details collection
                                educationDetailsList.Add(dualBachelorDegreeDetails);
                            }
                            break;

                        case "PG Diploma":
                            EducationalDetailsEntity pgDiplomaDetails = new EducationalDetailsEntity();
                            pgDiplomaDetails.CandidateId = candidateId;
                            pgDiplomaDetails.HighestQualificationId = ddlHQ.SelectedValue.Trim();
                            pgDiplomaDetails.DegreeId = Convert.ToInt32(item.Value);
                            pgDiplomaDetails.MediumOfEducation = ddlPgdMedium.SelectedValue.Trim();
                            pgDiplomaDetails.Status = rblPgdStat.SelectedValue.Trim();
                            pgDiplomaDetails.SpecializationId = Convert.ToInt32(ddlPgd.SelectedValue.Trim());
                            pgDiplomaDetails.FromYear = ddlPgdMonthFrom.Text + '/' + ddlPgdYearFrom.Text;
                            pgDiplomaDetails.ToYear = ddlPgdMonthTo.Text + '/' + ddlPgdYearTo.Text;
                            pgDiplomaDetails.College = txtPgdCollege.Text.Trim();
                            pgDiplomaDetails.University = txtPgdUniversity.Text.Trim();
                            pgDiplomaDetails.Percantage = txtPgdPercentage.Text.Trim();
                            // Add object to the education details collection
                            educationDetailsList.Add(pgDiplomaDetails);
                            break;

                        case "Masters Degree":
                            EducationalDetailsEntity masterDegreeDetails = new EducationalDetailsEntity();
                            masterDegreeDetails.CandidateId = candidateId;
                            masterDegreeDetails.HighestQualificationId = ddlHQ.SelectedValue.Trim();
                            masterDegreeDetails.DegreeId = Convert.ToInt32(item.Value);
                            masterDegreeDetails.MediumOfEducation = ddlMDMedium.SelectedValue.Trim();
                            masterDegreeDetails.SpecializationId = Convert.ToInt32(ddlMD.SelectedValue.Trim());
                            masterDegreeDetails.Status = rblMDStat.SelectedValue.Trim();
                            masterDegreeDetails.FromYear = ddlMDMonthFrom.Text + '/' + ddlMDYearFrom.Text;
                            masterDegreeDetails.ToYear = ddlMDMonthTo.Text + '/' + ddlMDYearTo.Text;
                            masterDegreeDetails.College = txtMDCollege.Text.Trim();
                            masterDegreeDetails.University = txtMDUniversity.Text.Trim();
                            masterDegreeDetails.Percantage = txtMDPercentage.Text.Trim();
                            // Add object to the education details collection
                            educationDetailsList.Add(masterDegreeDetails);
                            // functionality for adding records for Dual Master Degree
                            if (pnlCollapsableDualMD.Visible == true)
                            {
                                EducationalDetailsEntity dualMasterDegreeDetails = new EducationalDetailsEntity();
                                dualMasterDegreeDetails.CandidateId = candidateId;
                                dualMasterDegreeDetails.HighestQualificationId = ddlHQ.SelectedValue.Trim();
                                dualMasterDegreeDetails.DegreeId = Convert.ToInt32(item.Value);
                                dualMasterDegreeDetails.MediumOfEducation = ddlDualMDMedium.SelectedValue.Trim();
                                dualMasterDegreeDetails.SpecializationId = Convert.ToInt32(ddlDualMD.SelectedValue.Trim());
                                dualMasterDegreeDetails.Status = rblDualMDStat.SelectedValue.Trim();
                                dualMasterDegreeDetails.FromYear = ddlDualMDMonthFrom.Text + '/' + ddlDualMDYearFrom.Text;
                                dualMasterDegreeDetails.ToYear = ddlDualMDMonthTo.Text + '/' + ddlDualMDYearTo.Text;
                                dualMasterDegreeDetails.College = txtDualMDCollege.Text.Trim();
                                dualMasterDegreeDetails.University = txtDualMDUniversity.Text.Trim();
                                dualMasterDegreeDetails.Percantage = txtDualMDPercentage.Text.Trim();
                                // Add object to the education details collection
                                educationDetailsList.Add(dualMasterDegreeDetails);
                            }
                            break;

                        case "Doctorate/ PHD Degree":
                            EducationalDetailsEntity phdDetails = new EducationalDetailsEntity();
                            phdDetails.CandidateId = candidateId;
                            phdDetails.HighestQualificationId = ddlHQ.SelectedValue.Trim();
                            phdDetails.DegreeId = Convert.ToInt32(item.Value);
                            phdDetails.MediumOfEducation = ddlPHDMedium.SelectedValue.Trim();
                            phdDetails.SpecializationId = Convert.ToInt32(ddlPHD.SelectedValue.Trim());
                            phdDetails.Status = rblPHDStat.SelectedValue.Trim();
                            phdDetails.FromYear = ddlPHDMonthFrom.Text + '/' + ddlPHDYearFrom.Text;
                            phdDetails.ToYear = ddlPHDMonthTo.Text + '/' + ddlPHDYearTo.Text;
                            phdDetails.College = txtPHDCollege.Text.Trim();
                            phdDetails.University = txtPHDUniversity.Text.Trim();
                            phdDetails.Percantage = txtPHDPercentage.Text.Trim();
                            // Add object to the education details collection
                            educationDetailsList.Add(phdDetails);
                            break;

                        default:
                            break;
                    }
                }

                // Save educational deails.
                if (educationalDetails.SaveEducationalDetailsBAL(educationDetailsList))
                {
                    pnlCollapsableSSC.Visible = false;

                    pnlCollapsableHSC.Visible = false;

                    pnlCollapsableDip.Visible = false;

                    pnlCollapsableBD.Visible = false;

                    pnlCollapsableDualBD.Visible = false;

                    pnlCollapsablePgd.Visible = false;

                    pnlCollapsableMD.Visible = false;

                    pnlCollapsableDualMD.Visible = false;

                    pnlCollapsablePHD.Visible = false;

                    lblSuccess.Text = "Data saved Successfully...!!";
                    lblSuccess.Visible = true;
                }
                else
                {
                    lblError.Text = "Data was not saved successfuly";
                    lblError.Visible = true;
                }
            }
            catch (Exception)
            {
                //  throw;
            }
        }
 /// <summary>
 ///Adding new Doctor Of Philosophy in database
 /// </summary>
 /// <param name="sender">The source of event</param>
 /// <param name="e">the<see cref="EventArgs"/>containing event data</param>
 protected void btnPHDAdd_Click(object sender, EventArgs e)
 {
     try
     {
         EducationalDetailsEntity educationalDetailsEntity = new EducationalDetailsEntity();
         EducationalDetailsBAL educationalDetailsBAL = new EducationalDetailsBAL();
         // Assign values to entity
         educationalDetailsEntity.AddPHDName = txtPHDAdd.Text;
         // Add data to the database
         educationalDetailsBAL.AddPHDBAL(educationalDetailsEntity);
         BindDropDownDoctorOfPhilosophy();
         txtPHDAdd.Visible = false;
         btnPHDAdd.Visible = false;
     }
     catch (Exception)
     {
         // throw;
     }
 }
 /// <summary>
 ///Adding new Post Graduate Diploma in database
 /// </summary>
 /// <param name="sender">The source of event</param>
 /// <param name="e">the<see cref="EventArgs"/>containing event data</param>
 protected void btnPgdAdd_Click(object sender, EventArgs e)
 {
     try
     {
         EducationalDetailsEntity educationalDetailsEntity = new EducationalDetailsEntity();
         EducationalDetailsBAL educationalDetailsBAL = new EducationalDetailsBAL();
         // Assign values to entity
         educationalDetailsEntity.AddPostGraduateDiplomaName = txtPgdAdd.Text;
         // Add data to the database
         educationalDetailsBAL.AddPostGraduateDiplomaBAL(educationalDetailsEntity);
         BindDropDownPostGraduateDiploma();
         txtPgdAdd.Visible = false;
         btnPgdAdd.Visible = false;
     }
     catch (Exception)
     {
         // throw;
     }
 }
        private void BindEducationalDegreeType()
        {
            try
            {
                educationalDetails = new EducationalDetailsBAL();
                DataSet degreeData = new DataSet();

                // Get educational degree type details
                degreeData = educationalDetails.GetEducationalDegreeTypeBAL();
                if (degreeData != null)
                {
                    ddlHQ.DataSource = degreeData;
                    ddlHQ.DataValueField = "degreeId";
                    ddlHQ.DataTextField = "degreeType";
                    ddlHQ.DataBind();
                    ddlHQ.Items.Insert(0, new ListItem("--Select--", "0"));

                    chkList.DataSource = degreeData;
                    chkList.DataValueField = "degreeId";
                    chkList.DataTextField = "degreeType";
                    chkList.DataBind();
                }
            }
            catch (Exception)
            {
                //  throw;
            }
        }
        private void BindDropDownUnderGraduateDiploma()
        {
            //    try
            //    {
            //        DataSet UnderGraduateDiplomaData = new DataSet();
            //        educationalDetails = new EducationalDetailsBAL();
            //        // Get Under Graduate Diploma details
            //        UnderGraduateDiplomaData = educationalDetails.GetUnderGraduateDiplomaBAL();
            //        if (UnderGraduateDiplomaData != null)
            //        {
            //            ddlDip.DataSource = UnderGraduateDiplomaData;
            //            ddlDip.DataValueField = "UGDID";
            //            ddlDip.DataTextField = "UGDName";
            //            ddlDip.DataBind();

            //            ddlDip.Items.Insert(Convert.ToInt32(ddlDip.Items[ddlDip.Items.Count - 1].Value), new ListItem("----Other----", ""));
            //            ddlDip.Items.Insert(0, new ListItem("--Select--", "0"));
            //        }
            //    }
            try
            {
                degreeId = 3;
                DataSet dsDegreeDetails = new DataSet();
                educationalDetails = new EducationalDetailsBAL();
                // Get Under Graduate Diploma details
                dsDegreeDetails = educationalDetails.GetDegreeDetailsBAL(degreeId);
                if (dsDegreeDetails != null)
                {
                    ddlDip.DataSource = dsDegreeDetails;
                    ddlDip.DataValueField = "SpecializationId";
                    ddlDip.DataTextField = "DegreeName";
                    ddlDip.DataBind();

                    ddlDip.Items.Insert(Convert.ToInt32(ddlDip.Items.Count), new ListItem("----Other----", ""));
                    ddlDip.Items.Insert(0, new ListItem("--Select--", "0"));
                }
            }
            catch (Exception)
            {
                // throw;
            }
        }
Esempio n. 11
0
        private void BindEducation()
        {
            try
            {
                educationalDetails = new EducationalDetailsBAL();
                DataSet degreeData = new DataSet();
                // Get educational degree type details
                degreeData = educationalDetails.GetEducationalDegreeTypeBAL();
                chkEducation.DataSource = degreeData;
                chkEducation.DataTextField = "degreeType";
                chkEducation.DataValueField = "degreeId";
                chkEducation.DataBind();
            }
            catch (Exception)
            {

                // throw;
            }
        }
        private void BindAllEducationalDetails()
        {
            try
            {
                BindSpecialization();

                //Declration For ALL
                List<string> YearList = CommonUtil.Utility.GetYears();
                List<string> MonthList = CommonUtil.Utility.GetMonths();
                BindYear(YearList);
                BindMonth(MonthList);

                //Declration For Medium of Education
                DataSet dsLanguageDetails = new DataSet();
                // Get Language Details
                EducationalDetailsBAL educationalDetails = new EducationalDetailsBAL();
                dsLanguageDetails = educationalDetails.GetLanguageBAL();
                BindDropDownMedium(dsLanguageDetails);
            }
            catch (Exception)
            {
                // throw;
            }
        }
        /// <summary>
        /// Method for binding DropDown with DegreeDetails_Table of Database
        /// </summary>
        private void BindSpecialization()
        {
            try
            {
                degreeId = Convert.ToInt32(Request.QueryString["dId"]);
                DataSet dsDegreeDetails = new DataSet();
                EducationalDetailsBAL specializationDetails = new EducationalDetailsBAL();
                // Get Degree details
                dsDegreeDetails = specializationDetails.GetDegreeDetailsBAL(degreeId);
                if (dsDegreeDetails != null)
                {
                    ddlSpecialization.DataSource = dsDegreeDetails;
                    ddlSpecialization.DataValueField = "SpecializationId";
                    ddlSpecialization.DataTextField = "DegreeName";
                    ddlSpecialization.DataBind();

                    ddlSpecialization.Items.Insert(0, new ListItem("--Select--", "0"));
                }
            }
            catch (Exception)
            {
                // throw;
            }
        }
        private void BindEducationalDetails()
        {
            try
            {
                //List<EducationalDetailsEntity> educationDetailsList = new List<EducationalDetailsEntity>();
                EducationalDetailsBAL educationalDetails = new EducationalDetailsBAL();
                // Get only selected checkboxes list
                //var selectedDegreeTypes = chkList.Items.Cast<ListItem>().Where(li => li.Selected).ToList();

                // Get only selected checkboxes list
                //var selectedDegreeTypes = chkList.Items.Cast<ListItem>().Where(li => li.Selected).ToList();

                DataSet dsEducationalDetails = new DataSet();

                dsEducationalDetails = educationalDetails.SelectEducationalDetailsBAL(candidateId, degreeId, specializationId);
                if (dsEducationalDetails != null)
                {
                    // var listofDegrees = Convert.ToString(degreeIdS);
                    // foreach (var list in listofDegrees)
                    // for (; ; degreeIdS++)
                    {
                        EducationalDetailsEntity EditDetails = new EducationalDetailsEntity();
                        EditDetails.CandidateId = candidateId;
                        //ddlHQ.SelectedItem.Text = Convert.ToString(dsEducationalDetails.Tables[0].Rows[0]["HighestQualificationId"]);
                        //dsEducationalDetails = educationalDetails.UpdateEducationalDetailsBAL(CandidateId);
                        lblHead.Text = Convert.ToString(dsEducationalDetails.Tables[0].Rows[0]["DegreeName"]);
                        EditDetails.DegreeId = Convert.ToInt32(degreeId); ;
                        //txtMedium.Text = Convert.ToString(dsEducationalDetails.Tables[0].Rows[0]["MediumOfEducation"]);
                        ddlMedium.SelectedValue = Convert.ToString(dsEducationalDetails.Tables[0].Rows[0]["LanguageId"]);
                        string Status = Convert.ToString(dsEducationalDetails.Tables[0].Rows[0]["Status"]);
                        rblStat.Items.FindByValue(Status).Selected = true;
                        ddlSpecialization.SelectedValue = Convert.ToString(dsEducationalDetails.Tables[0].Rows[0]["SpecializationId"]);

                        string FromYear = Convert.ToString(dsEducationalDetails.Tables[0].Rows[0]["FromYear"]); ;
                        string[] FromYearSplit = FromYear.Split(new char[] { '/' });
                        int CountFrom = 0;
                        foreach (string Word in FromYearSplit)
                        {
                            CountFrom += 1;
                            if (CountFrom == 1)
                            { ddlMonthFrom.SelectedValue = Word; }
                            if (CountFrom == 2)
                            { ddlYearFrom.SelectedValue = Word; }
                        }

                        string ToYear = Convert.ToString(dsEducationalDetails.Tables[0].Rows[0]["ToYear"]); ;
                        string[] ToYearSplit = ToYear.Split(new char[] { '/' });
                        int countTo = 0;
                        foreach (string Word in ToYearSplit)
                        {
                            countTo += 1;
                            if (countTo == 1)
                            { ddlMonthTo.SelectedValue = Word; }
                            if (countTo == 2)
                            { ddlYearTo.SelectedValue = Word; }
                        }

                        //ddlSSCMonthFrom.SelectedItem.Text + ddlSSCYearFrom.SelectedItem.Text = Convert.ToString(dsEducationalDetails.Tables[0].Rows[0]["FromYear"]);
                        //ddlSSCMonthTo.Text + ddlSSCYearTo.Text = Convert.ToString(dsEducationalDetails.Tables[0].Rows[0]["ToYear"]);
                        txtCollege.Text = Convert.ToString(dsEducationalDetails.Tables[0].Rows[0]["College"]);
                        txtUniversity.Text = Convert.ToString(dsEducationalDetails.Tables[0].Rows[0]["University"]);
                        txtPercentage.Text = Convert.ToString(dsEducationalDetails.Tables[0].Rows[0]["Percantage"]);
                        // Add object to the education details collection
                        //educationDetailsList.Add(sscDetails);
                        btnUpdate.Visible = true;
                    }
                }
            }
            catch (Exception)
            {
                // throw;
            }
        }