/// <summary>
        /// Handles the Click event of btnSaveMoreJobs control
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
        protected void btnSaveMoreJobs_Click(object sender, EventArgs e)
        {
            CurrentDesiredJobBAL currentDesiredJobBAL = new CurrentDesiredJobBAL();
            CurrentDesiredJobEntity currentDesiredJobEntity = new CurrentDesiredJobEntity();
            var selectedcity = chklCity.Items.Cast<ListItem>().Where(li => li.Selected).ToList();
            var selectedarea = chklArea.Items.Cast<ListItem>().Where(li => li.Selected).ToList();
            var selectedstate = chklState.Items.Cast<ListItem>().Where(li => li.Selected).ToList();
            DataTable dtJobDetails = (DataTable)ViewState["JobDetails"];
            DataTable dtAddExperience = (DataTable)ViewState["ProfessionalDetails"];
            try
            {
                if (!isEdit)
                {
                    currentDesiredJobEntity.Candidateid = hfCandidateId.Value.Trim();
                    currentDesiredJobEntity.Objective = txtObjective.Text.Trim();
                    currentDesiredJobEntity.ProfileSummary = txtProfileSummary.Text.Trim();
                    if (rbtEmployed.Checked)
                    {
                        currentDesiredJobEntity.CurrentEmployeedUnemployeed = rbtEmployed.Text.Trim();
                    }
                    else
                    {
                        currentDesiredJobEntity.CurrentEmployeedUnemployeed = rbtUnEmployed.Text.Trim();
                    }
                    currentDesiredJobEntity.TotalExperience = lblTotalExp.Text;
                    currentDesiredJobEntity.ResumeHeadline = txtResumeHeadline.Text.Trim();
                    currentDesiredJobEntity.CurrentWorkingStatus = ddlWorkStatus.SelectedItem.Text.Trim();
                    currentDesiredJobEntity.CurrentAnualSal = Convert.ToDouble(txtcurrentannualsalary.Text);
                    currentDesiredJobEntity.ExpectedAnualSal = Convert.ToDouble(txtexpectedsalary.Text);
                    currentDesiredJobEntity.NoticePeriod = ddlNoticePeriod.SelectedItem.Text.Trim();

                    var selectedStatus = chklEmploymentStatus.Items.Cast<ListItem>().Where(li => li.Selected).ToList();
                    currentDesiredJobEntity.EmploymentStatus = string.Join(",", selectedStatus.Select(x => x.Text));

                    var selectedJobType = chklJobType.Items.Cast<ListItem>().Where(li => li.Selected).ToList();
                    currentDesiredJobEntity.JobType = string.Join(",", selectedJobType.Select(x => x.Text));

                    var selectedCompanyType = chklCompanyType.Items.Cast<ListItem>().Where(li => li.Selected).ToList();
                    currentDesiredJobEntity.CompanyType = string.Join(",", selectedCompanyType.Select(x => x.Text));

                    currentDesiredJobEntity.Availabilityforinterview = rblYesNo.SelectedItem.Text;
                    currentDesiredJobEntity.TimeInWeekdays = "From" + ddlBeforeHours.SelectedItem.Text + "." + ddlBeforeMinutes.SelectedItem.Text + " " + ddlBeforeTime.SelectedItem.Text + " To " + ddlAfterHours.SelectedItem.Text + "." + ddlAfterMinutes.SelectedItem.Text + " " + ddlAfterTime.SelectedItem.Text + " " + ddlISTETE.SelectedItem.Text;
                    currentDesiredJobEntity.PreferredCountry = Convert.ToInt32(ddlPreferredCountry.SelectedValue);
                    currentDesiredJobEntity.PreferredState = string.Join(",", selectedstate.Select(x => x.Value));
                    currentDesiredJobEntity.PreferredCity = string.Join(",", selectedcity.Select(x => x.Value));
                    currentDesiredJobEntity.PreferrefArea = string.Join(",", selectedarea.Select(x => x.Value));

                    currentDesiredJobEntity.BeforeTime = ddlBeforeHours.SelectedItem.Text + ":" + ddlBeforeMinutes.SelectedItem.Text + ":" + ddlBeforeTime.SelectedItem.Text;

                    currentDesiredJobEntity.AfterTime = ddlAfterHours.SelectedItem.Text + ":" + ddlAfterMinutes.SelectedItem.Text + ":" + ddlAfterTime.SelectedItem.Text + ":" + ddlISTETE.SelectedItem.Text;
                    currentDesiredJobBAL.SaveExperienceDetailsBAL(dtAddExperience);
                    currentDesiredJobBAL.SaveJobLookingDetailsBAL(dtJobDetails);
                    currentDesiredJobBAL.SaveDesiredJobDetailsBAL(currentDesiredJobEntity);
                    currentDesiredJobBAL.SaveJobDetailsBAL(currentDesiredJobEntity);
                    Response.Write("<script language='javascript'>alert('Details saved successfully')</script>");
                }
                else
                {
                    currentDesiredJobEntity.Candidateid = hfCandidateId.Value.Trim();
                    currentDesiredJobEntity.Objective = txtObjective.Text.Trim();
                    currentDesiredJobEntity.ProfileSummary = txtProfileSummary.Text.Trim();
                    if (rbtEmployed.Checked)
                    {
                        currentDesiredJobEntity.CurrentEmployeedUnemployeed = rbtEmployed.Text.Trim();
                    }
                    else
                    {
                        currentDesiredJobEntity.CurrentEmployeedUnemployeed = rbtUnEmployed.Text.Trim();
                    }
                    currentDesiredJobEntity.TotalExperience = lblTotalExp.Text;
                    currentDesiredJobEntity.ResumeHeadline = txtResumeHeadline.Text.Trim();
                    currentDesiredJobEntity.CurrentWorkingStatus = ddlWorkStatus.SelectedItem.Text.Trim();
                    currentDesiredJobEntity.CurrentAnualSal = Convert.ToDouble(txtcurrentannualsalary.Text);
                    currentDesiredJobEntity.ExpectedAnualSal = Convert.ToDouble(txtexpectedsalary.Text);
                    currentDesiredJobEntity.NoticePeriod = ddlNoticePeriod.SelectedItem.Text.Trim();

                    var selectedStatus = chklEmploymentStatus.Items.Cast<ListItem>().Where(li => li.Selected).ToList();
                    currentDesiredJobEntity.EmploymentStatus = string.Join(",", selectedStatus.Select(x => x.Text));

                    var selectedJobType = chklJobType.Items.Cast<ListItem>().Where(li => li.Selected).ToList();
                    currentDesiredJobEntity.JobType = string.Join(",", selectedJobType.Select(x => x.Text));

                    var selectedCompanyType = chklCompanyType.Items.Cast<ListItem>().Where(li => li.Selected).ToList();
                    currentDesiredJobEntity.CompanyType = string.Join(",", selectedCompanyType.Select(x => x.Text));

                    currentDesiredJobEntity.Availabilityforinterview = rblYesNo.SelectedItem.Text;
                    currentDesiredJobEntity.TimeInWeekdays = "From" + ddlBeforeHours.SelectedItem.Text + "." + ddlBeforeMinutes.SelectedItem.Text + " " + ddlBeforeTime.SelectedItem.Text + " To " + ddlAfterHours.SelectedItem.Text + "." + ddlAfterMinutes.SelectedItem.Text + " " + ddlAfterTime.SelectedItem.Text + " " + ddlISTETE.SelectedItem.Text;
                    currentDesiredJobEntity.PreferredCountry = Convert.ToInt32(ddlPreferredCountry.SelectedValue);
                    currentDesiredJobEntity.PreferredState = string.Join(",", selectedstate.Select(x => x.Value));
                    currentDesiredJobEntity.PreferredCity = string.Join(",", selectedcity.Select(x => x.Value));
                    currentDesiredJobEntity.PreferrefArea = string.Join(",", selectedarea.Select(x => x.Value));

                    currentDesiredJobEntity.BeforeTime = ddlBeforeHours.SelectedItem.Text + ":" + ddlBeforeMinutes.SelectedItem.Text + ":" + ddlBeforeTime.SelectedItem.Text;

                    currentDesiredJobEntity.AfterTime = ddlAfterHours.SelectedItem.Text + ":" + ddlAfterMinutes.SelectedItem.Text + ":" + ddlAfterTime.SelectedItem.Text + ":" + ddlISTETE.SelectedItem.Text;

                    currentDesiredJobBAL.UpdateProfessionalDetailsBAL(currentDesiredJobEntity);
                    Response.Write("<script language='javascript'>alert('Your Details Updated successfully')</script>");
                }
            }
            catch (Exception)
            {
                // throw;
            }
            finally
            {
                dtJobDetails = null;
                dtAddExperience = null;
                currentDesiredJobBAL = null;
            }
        }