/// <summary> /// Handles Click event of btnAdd 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 btnAdd_Click(object sender, EventArgs e) { CurrentDesiredJobBAL currentDesiredJobBAL = new CurrentDesiredJobBAL(); CurrentDesiredJobEntity currentDesiredJobEntity = new CurrentDesiredJobEntity(); currentDesiredJobEntity.RoleSkills = txtAddSkill.Text.Trim(); currentDesiredJobBAL.AddRoleSkillsDetailsBAL(currentDesiredJobEntity); divAddMoreSkills.Visible = false; }
/// <summary> /// Method in CurrentDesiredJobDAL class to add new technical skill in table /// </summary> /// <param name="currentDesiredJobEntity">Entity of CurrentDesiredJobEntity</param> public void AddTechnicalSkillsDetailsDAL(CurrentDesiredJobEntity currentDesiredJobEntity) { try { connection.Open(); SqlParameter[] sparams = { new SqlParameter("@skillName", currentDesiredJobEntity.TechnicalSkills) }; SqlHelper.ExecuteNonQuery(connection, CommandType.StoredProcedure, Constants.sp_JS_InsertTechnicalSkills, sparams); } catch (Exception) { throw; } }
/// <summary> /// Delete current and past job details DAL /// </summary> /// <param name="expId">expId</param> public void DeleteCurrentPastJobDetailsDAL(int expId) { try { CurrentDesiredJobEntity currentDesiredJobEntity = new CurrentDesiredJobEntity(); connection.Open(); SqlParameter[] sparams = { new SqlParameter("@id", expId) }; SqlHelper.ExecuteNonQuery(connection, CommandType.StoredProcedure, Constants.sp_JS_DeleteCurrentPastJobDetails, sparams); } catch (Exception) { // throw; } finally { connection.Close(); } }
/// <summary> /// Method in CurrentDesiredJobBAL class to add Technical skill in Database /// </summary> /// <param name="currentDesiredJobEntity">Entity of CurrentDesiredJobEntity</param> public void AddTechnicalSkillsDetailsBAL(CurrentDesiredJobEntity currentDesiredJobEntity) { CurrentDesiredJobDAL currentDesiredJobDAL = new CurrentDesiredJobDAL(); currentDesiredJobDAL.AddTechnicalSkillsDetailsDAL(currentDesiredJobEntity); }
/// <summary> /// Method in CurrentDesiredJobDAL class to update Desired Details in Database /// </summary> /// <param name="currentDesiredJobEntity">Entity of CurrentDesiredJobEntity</param> public void UpdateProfessionalDetailsDAL(CurrentDesiredJobEntity currentDesiredJobEntity) { try { connection.Open(); SqlParameter[] sparams = new SqlParameter[20]; sparams[0] = new SqlParameter("@candidateid", currentDesiredJobEntity.Candidateid); sparams[1] = new SqlParameter("@currentWorkingStatus", currentDesiredJobEntity.CurrentWorkingStatus); sparams[2] = new SqlParameter("@currentanualSal", currentDesiredJobEntity.CurrentAnualSal); sparams[3] = new SqlParameter("@expectedanualSal", currentDesiredJobEntity.ExpectedAnualSal); sparams[4] = new SqlParameter("@noticeperiod", currentDesiredJobEntity.NoticePeriod); sparams[5] = new SqlParameter("@employmentstatus", currentDesiredJobEntity.EmploymentStatus); sparams[6] = new SqlParameter("@jobtype", currentDesiredJobEntity.JobType); sparams[7] = new SqlParameter("@companyType", currentDesiredJobEntity.CompanyType); sparams[8] = new SqlParameter("@availabilityForInterview", currentDesiredJobEntity.Availabilityforinterview); sparams[9] = new SqlParameter("@preferredCountry", currentDesiredJobEntity.PreferredCountry); sparams[10] = new SqlParameter("@preferredState", currentDesiredJobEntity.PreferredState); sparams[11] = new SqlParameter("@preferredcity", currentDesiredJobEntity.PreferredCity); sparams[12] = new SqlParameter("@preferredarea", currentDesiredJobEntity.PreferrefArea); sparams[13] = new SqlParameter("@beforeTime", currentDesiredJobEntity.BeforeTime); sparams[14] = new SqlParameter("@afterTime", currentDesiredJobEntity.AfterTime); sparams[15] = new SqlParameter("@resumeHeadline", currentDesiredJobEntity.ResumeHeadline); sparams[16] = new SqlParameter("@objective", currentDesiredJobEntity.Objective); sparams[17] = new SqlParameter("@profileSummary", currentDesiredJobEntity.ProfileSummary); sparams[18] = new SqlParameter("@employeedOrNot", currentDesiredJobEntity.CurrentEmployeedUnemployeed); sparams[19] = new SqlParameter("@totalExperiecnce", currentDesiredJobEntity.TotalExperience); SqlHelper.ExecuteNonQuery(connection, CommandType.StoredProcedure, Constants.sp_JS_UpdateDesiredJobDetails, sparams); } catch (Exception) { throw; } }
/// <summary> /// Update technical skills DAL /// </summary> /// <param name="currentDesiredJobEntity">CurrentDesiredJobEntity</param> public void UpdateTechnicalSkillsDAL(CurrentDesiredJobEntity currentDesiredJobEntity) { try { connection.Open(); SqlParameter[] sparams = new SqlParameter[6]; sparams[0] = new SqlParameter("@skillId", currentDesiredJobEntity.SkillId); sparams[1] = new SqlParameter("@technicalSkill", currentDesiredJobEntity.TechnicalSkills); sparams[2] = new SqlParameter("@fromDate", currentDesiredJobEntity.FromDate); sparams[3] = new SqlParameter("@tillDate", currentDesiredJobEntity.TillDate); sparams[4] = new SqlParameter("@proficiency", currentDesiredJobEntity.Proficiency); sparams[5] = new SqlParameter("@totalYear", currentDesiredJobEntity.TotalExperience); SqlHelper.ExecuteNonQuery(connection, CommandType.StoredProcedure, Constants.sp_JS_UpdateTechnicalSkills, sparams); } catch (Exception) { // throw; } finally { connection.Close(); } }
/// <summary> /// Update current and past experience details DAL /// </summary> /// <param name="currentDesiredJobEntity">CurrentDesiredJobEntity</param> public void UpdateCurrentPastExperienceDetailsDAL(CurrentDesiredJobEntity currentDesiredJobEntity) { try { connection.Open(); SqlParameter[] sparams = new SqlParameter[16]; sparams[0] = new SqlParameter("@id", currentDesiredJobEntity.ExpId); sparams[1] = new SqlParameter("@companyCurrentOrPast", currentDesiredJobEntity.CurrentCompanyOrNot); sparams[2] = new SqlParameter("@companyName", currentDesiredJobEntity.CompanyName); sparams[3] = new SqlParameter("@rolesResponsibilities", currentDesiredJobEntity.RolesResponsibility); sparams[4] = new SqlParameter("@fromMonth", currentDesiredJobEntity.FromMonth); sparams[5] = new SqlParameter("@fromYear", currentDesiredJobEntity.FromYear); sparams[6] = new SqlParameter("@tillMonth", currentDesiredJobEntity.TillMonth); sparams[7] = new SqlParameter("@tillYear", currentDesiredJobEntity.TillYear); sparams[8] = new SqlParameter("@industry", currentDesiredJobEntity.Industry); sparams[9] = new SqlParameter("@department", currentDesiredJobEntity.Department); sparams[10] = new SqlParameter("@employmentStatus", currentDesiredJobEntity.CurrentEmploymentStatus); sparams[11] = new SqlParameter("@jobType", currentDesiredJobEntity.JobType); sparams[12] = new SqlParameter("@companyType", currentDesiredJobEntity.CompanyType); sparams[13] = new SqlParameter("@reason", currentDesiredJobEntity.ReasonForJobChange); sparams[14] = new SqlParameter("@clientName", currentDesiredJobEntity.ClientName); sparams[15] = new SqlParameter("@clientSite", currentDesiredJobEntity.ClientSite); SqlHelper.ExecuteNonQuery(connection, CommandType.StoredProcedure, Constants.sp_JS_UpdateCurrentPastExpDetails, sparams); } catch (Exception) { // throw; } finally { connection.Close(); } }
/// <summary> /// Update job looking for DAL /// </summary> /// <param name="currentDesiredJobEntity">CurrentDesiredJobEntity</param> public void UpdateJobLookingForDAL(CurrentDesiredJobEntity currentDesiredJobEntity) { try { connection.Open(); SqlParameter[] sparams = new SqlParameter[6]; sparams[0] = new SqlParameter("@JobpostlookingId", currentDesiredJobEntity.JobPostLookingId); sparams[1] = new SqlParameter("@jobPostLookingFor", currentDesiredJobEntity.JobPostLookingFor); sparams[2] = new SqlParameter("@industry", currentDesiredJobEntity.Industry); sparams[3] = new SqlParameter("@department", currentDesiredJobEntity.Department); sparams[4] = new SqlParameter("@functionalRole", currentDesiredJobEntity.FunctionalRole); sparams[5] = new SqlParameter("@relevantExp", Convert.ToDouble(currentDesiredJobEntity.RelevantExp)); SqlHelper.ExecuteNonQuery(connection, CommandType.StoredProcedure, Constants.sp_JS_UpdateJobPostLookingFor, sparams); } catch (Exception) { // throw; } finally { connection.Close(); } }
/// <summary> /// Handles ItemCommand event of rptrJobPostLookinFor 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 rptrJobPostLookinFor_ItemCommand(object source, RepeaterCommandEventArgs e) { Label lblJobPostLooking = (Label)e.Item.FindControl("lblJobPostLooking"); Label lblIndustry = (Label)e.Item.FindControl("lblIndustry"); Label lblDepartment = (Label)e.Item.FindControl("lblDepartment"); Label lblFunctionalRole = (Label)e.Item.FindControl("lblFunctionalRole"); Label lblRelevantExperience = (Label)e.Item.FindControl("lblRelevantExperience"); TextBox txtJobPostLooking = (TextBox)e.Item.FindControl("txtJobPostLooking"); DropDownList ddlIndustry123 = (DropDownList)e.Item.FindControl("ddlIndustry123"); DropDownList ddlDepartment123 = (DropDownList)e.Item.FindControl("ddlDepartment123"); DropDownList ddlFunctionalRole = (DropDownList)e.Item.FindControl("ddlFunctionalRole"); TextBox txtRelevantExperience = (TextBox)e.Item.FindControl("txtRelevantExperience"); LinkButton lnkEdit = (LinkButton)e.Item.FindControl("lnkEdit"); LinkButton lnkDelete = (LinkButton)e.Item.FindControl("lnkDelete"); LinkButton lnkUpdate = (LinkButton)e.Item.FindControl("lnkUpdate"); LinkButton lnkCancel = (LinkButton)e.Item.FindControl("lnkCancel"); if (e.CommandName == "edit") { lblJobPostLooking.Visible = false; lblIndustry.Visible = false; lblDepartment.Visible = false; lblFunctionalRole.Visible = false; lblRelevantExperience.Visible = false; txtJobPostLooking.Visible = true; ddlIndustry123.Visible = true; ddlDepartment123.Visible = true; ddlFunctionalRole.Visible = true; txtRelevantExperience.Visible = true; lnkEdit.Visible = false; lnkDelete.Visible = false; lnkUpdate.Visible = true; lnkCancel.Visible = true; } if (e.CommandName == "update") { CurrentDesiredJobEntity currentDesiredJobEntity = new CurrentDesiredJobEntity(); currentDesiredJobEntity.JobPostLookingFor = txtJobPostLooking.Text; currentDesiredJobEntity.Industry = ddlIndustry123.SelectedValue; currentDesiredJobEntity.Department = ddlDepartment123.SelectedValue; currentDesiredJobEntity.FunctionalRole = ddlFunctionalRole.SelectedValue; currentDesiredJobEntity.RelevantExp = txtRelevantExperience.Text; currentDesiredJobEntity.JobPostLookingId = Convert.ToInt32(e.CommandArgument); DataSet ds = new DataSet(); CurrentDesiredJobBAL currentDesiredJobBAL = new CurrentDesiredJobBAL(); currentDesiredJobBAL.UpdateJobLookingBAL(currentDesiredJobEntity); BindRepeaterJobPostLooking(); } if (e.CommandName == "delete") { int JobpostlookingId = Convert.ToInt32(e.CommandArgument); CurrentDesiredJobBAL currentDesiredJobBAL = new CurrentDesiredJobBAL(); currentDesiredJobBAL.DeleteJobPostLookingForBAL(JobpostlookingId); BindRepeaterJobPostLooking(); } if (e.CommandName == "cancel") { BindRepeaterJobPostLooking(); } }
/// <summary> /// Handles the ItemCommand event of rptrPastCurrentJobDetails 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 rptrPastCurrentJobDetails_ItemCommand(object source, RepeaterCommandEventArgs e) { Label lblCurrentComapny = (Label)e.Item.FindControl("lblCurrentComapny"); CheckBox chkCurrentYes = (CheckBox)e.Item.FindControl("chkCurrentYes"); Label lblCompanyName = (Label)e.Item.FindControl("lblCompanyName"); TextBox txtComapnyName = (TextBox)e.Item.FindControl("txtComapnyName"); Label lblDesignation = (Label)e.Item.FindControl("lblDesignation"); TextBox txtDesignation = (TextBox)e.Item.FindControl("txtDesignation"); Label lblRolesResponsibility = (Label)e.Item.FindControl("lblRolesResponsibility"); TextBox txtRolesResponsibility = (TextBox)e.Item.FindControl("txtRolesResponsibility"); Label lblFromMonth = (Label)e.Item.FindControl("lblFromMonth"); Label lblFromYear = (Label)e.Item.FindControl("lblFromYear"); Label lblTillMonth = (Label)e.Item.FindControl("lblTillMonth"); Label lblTillYear = (Label)e.Item.FindControl("lblTillYear"); DropDownList ddlFromMonth = (DropDownList)e.Item.FindControl("ddlFromMonth"); DropDownList ddlFromYear = (DropDownList)e.Item.FindControl("ddlFromYear"); DropDownList ddlTillMonth = (DropDownList)e.Item.FindControl("ddlTillMonth"); DropDownList ddlTillYear = (DropDownList)e.Item.FindControl("ddlTillYear"); Label lbltillword = (Label)e.Item.FindControl("lbltillword"); Label lblIndustry = (Label)e.Item.FindControl("lblIndustry"); Label lblDepartment = (Label)e.Item.FindControl("lblDepartment"); DropDownList ddlIndustry = (DropDownList)e.Item.FindControl("ddlIndustry"); DropDownList ddlDepartment = (DropDownList)e.Item.FindControl("ddlDepartment"); Label lblEmploymentStatus = (Label)e.Item.FindControl("lblEmploymentStatus"); RadioButtonList rbtlEmployementStatus = (RadioButtonList)e.Item.FindControl("rbtlEmployementStatus"); Label lblJobType = (Label)e.Item.FindControl("lblJobType"); RadioButtonList rblJobType = (RadioButtonList)e.Item.FindControl("rblJobType"); Label lblCompanyType = (Label)e.Item.FindControl("lblCompanyType"); RadioButtonList rblCompanyType = (RadioButtonList)e.Item.FindControl("rblCompanyType"); Label lblReasonforjobchange = (Label)e.Item.FindControl("lblReasonforjobchange"); TextBox txtReasonforJobchange = (TextBox)e.Item.FindControl("txtReasonforJobchange"); Label lblClientName = (Label)e.Item.FindControl("lblClientName"); TextBox txtClientName = (TextBox)e.Item.FindControl("txtClientName"); Label lblClientSite = (Label)e.Item.FindControl("lblClientSite"); TextBox txtClientSite = (TextBox)e.Item.FindControl("txtClientSite"); LinkButton lnkEdit = (LinkButton)e.Item.FindControl("lnkEdit"); LinkButton lnkDelete = (LinkButton)e.Item.FindControl("lnkDelete"); LinkButton lnkUpdate = (LinkButton)e.Item.FindControl("lnkUpdate"); LinkButton lnkCancel = (LinkButton)e.Item.FindControl("lnkCancel"); if (e.CommandName == "edit") { lblCurrentComapny.Visible = false; chkCurrentYes.Visible = true; lblCompanyName.Visible = false; txtComapnyName.Visible = true; lblDesignation.Visible = false; txtDesignation.Visible = true; lblRolesResponsibility.Visible = false; txtRolesResponsibility.Visible = true; lblFromMonth.Visible = false; lblFromYear.Visible = false; lblTillMonth.Visible = false; lblTillYear.Visible = false; ddlFromMonth.Visible = true; ddlFromYear.Visible = true; ddlTillMonth.Visible = true; ddlTillYear.Visible = true; lbltillword.Visible = true; lblEmploymentStatus.Visible = false; rbtlEmployementStatus.Visible = true; lblJobType.Visible = false; rblJobType.Visible = true; lblCompanyType.Visible = false; rblCompanyType.Visible = true; lblReasonforjobchange.Visible = false; txtReasonforJobchange.Visible = true; lblIndustry.Visible = false; lblDepartment.Visible = false; ddlIndustry.Visible = true; ddlDepartment.Visible = true; lblClientName.Visible = false; lblClientSite.Visible = false; txtClientName.Visible = true; txtClientSite.Visible = true; lnkEdit.Visible = false; lnkDelete.Visible = false; lnkUpdate.Visible = true; lnkCancel.Visible = true; } if (e.CommandName == "update") { CurrentDesiredJobEntity currentDesiredJobEntity = new CurrentDesiredJobEntity(); currentDesiredJobEntity.CurrentCompanyOrNot = chkCurrentYes.Checked.ToString(); currentDesiredJobEntity.CompanyName = txtComapnyName.Text.Trim(); currentDesiredJobEntity.Designation = txtDesignation.Text.Trim(); currentDesiredJobEntity.Industry = ddlIndustry.SelectedValue; currentDesiredJobEntity.RolesResponsibility = lblRolesResponsibility.Text.Trim(); currentDesiredJobEntity.FromMonth = ddlFromMonth.SelectedItem.Value; currentDesiredJobEntity.FromYear = ddlFromYear.SelectedItem.Value; currentDesiredJobEntity.TillMonth = ddlTillMonth.SelectedItem.Value; currentDesiredJobEntity.TillYear = ddlTillYear.SelectedItem.Value; currentDesiredJobEntity.CurrentEmploymentStatus = rbtlEmployementStatus.Text; currentDesiredJobEntity.JobType = rblJobType.Text; currentDesiredJobEntity.CompanyType = rblCompanyType.Text; currentDesiredJobEntity.ReasonForJobChange = txtReasonforJobchange.Text.Trim(); currentDesiredJobEntity.ClientName = txtClientName.Text.Trim(); currentDesiredJobEntity.ClientSite = txtClientSite.Text.Trim(); currentDesiredJobEntity.Department = ddlDepartment.SelectedValue; currentDesiredJobEntity.ExpId = Convert.ToInt32(e.CommandArgument); DataSet ds = new DataSet(); CurrentDesiredJobBAL currentDesiredJobBAL = new CurrentDesiredJobBAL(); currentDesiredJobBAL.UpdateCurrentPastExperienceDetailsBAL(currentDesiredJobEntity); BindRepeaterCurrentPastExp(); } if (e.CommandName == "delete") { int expId = Convert.ToInt32(e.CommandArgument); CurrentDesiredJobBAL currentDesiredJobBAL = new CurrentDesiredJobBAL(); currentDesiredJobBAL.DeleteCurrentPastJobDetailsBAL(expId); BindRepeaterCurrentPastExp(); } if (e.CommandName == "cancel") { BindRepeaterCurrentPastExp(); } }
/// <summary> /// View technical skills details DAL /// </summary> /// <param name="candidateId">candidateId</param> /// <returns>dataset</returns> public DataSet ViewTechSkillDetailsDAL(string candidateId) { DataSet ds = new DataSet(); try { CurrentDesiredJobEntity currentDesiredJobEntity = new CurrentDesiredJobEntity(); connection.Open(); SqlParameter[] sparams = { new SqlParameter("@candidateId", candidateId) }; ds = SqlHelper.ExecuteDataset(connection, CommandType.StoredProcedure, Constants.sp_JS_SelectTechnicalSkills, sparams); } catch (Exception) { // throw; } finally { connection.Close(); } return ds; }
/// <summary> /// Handles ItemCommand event of rptrRoleSkills 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 rptrRoleSkills_ItemCommand(object source, RepeaterCommandEventArgs e) { Label lblRoleSkill = (Label)e.Item.FindControl("lblRoleSkill"); Label lblFromDate = (Label)e.Item.FindControl("lblFromDate"); Label lblTillDate = (Label)e.Item.FindControl("lblTillDate"); Label lblProficiency = (Label)e.Item.FindControl("lblProficiency"); DropDownList ddlRoleSkill = (DropDownList)e.Item.FindControl("ddlRoleSkill"); //TextBox txtAddSkill = (TextBox)e.Item.FindControl("txtAddSkill"); DropDownList ddlFromMonth = (DropDownList)e.Item.FindControl("ddlFromMonth"); DropDownList ddlFromYear = (DropDownList)e.Item.FindControl("ddlFromYear"); DropDownList ddlTillMonth = (DropDownList)e.Item.FindControl("ddlTillMonth"); DropDownList ddlTillYear = (DropDownList)e.Item.FindControl("ddlTillYear"); DropDownList ddlProficiency = (DropDownList)e.Item.FindControl("ddlProficiency"); LinkButton lnkEdit = (LinkButton)e.Item.FindControl("lnkEdit"); LinkButton lnkDelete = (LinkButton)e.Item.FindControl("lnkDelete"); LinkButton lnkUpdate = (LinkButton)e.Item.FindControl("lnkUpdate"); LinkButton lnkCancel = (LinkButton)e.Item.FindControl("lnkCancel"); // Check repeater commond for edit if (e.CommandName == "edit") { lblRoleSkill.Visible = false; lblFromDate.Visible = false; lblTillDate.Visible = false; lblProficiency.Visible = false; ddlRoleSkill.Visible = true; ddlFromMonth.Visible = true; ddlFromYear.Visible = true; ddlTillMonth.Visible = true; ddlTillYear.Visible = true; ddlProficiency.Visible = true; lnkEdit.Visible = false; lnkDelete.Visible = false; lnkUpdate.Visible = true; lnkCancel.Visible = true; } // Check repeater commond for update if (e.CommandName == "update") { CurrentDesiredJobEntity currentDesiredJobEntity = new CurrentDesiredJobEntity(); currentDesiredJobEntity.RoleSkills = ddlRoleSkill.SelectedValue.Trim(); currentDesiredJobEntity.FromDate = ddlFromMonth.SelectedItem.Text.Trim() + "/" + ddlFromYear.SelectedItem.Text.Trim(); currentDesiredJobEntity.TillDate = ddlTillMonth.SelectedItem.Text.Trim() + "/" + ddlTillYear.SelectedItem.Text.Trim(); currentDesiredJobEntity.Proficiency = ddlProficiency.SelectedItem.Text.Trim(); currentDesiredJobEntity.SkillId = Convert.ToInt32(e.CommandArgument); currentDesiredJobEntity.TotalExperience = TotalYears(); CurrentDesiredJobBAL currentDesiredJobBAL = new CurrentDesiredJobBAL(); currentDesiredJobBAL.UpdateRoleSkillsBAL(currentDesiredJobEntity); BindRepeaterRoleSkills(); } // Check repeater commond for delete if (e.CommandName == "delete") { int SkillId = Convert.ToInt32(e.CommandArgument); CurrentDesiredJobBAL currentDesiredJobBAL = new CurrentDesiredJobBAL(); currentDesiredJobBAL.DeleteRoleSkillBAL(SkillId); BindRepeaterRoleSkills(); } // Check repeater commond for cancel if (e.CommandName == "cancel") { BindRepeaterRoleSkills(); } }
/// <summary> /// Update technical skills bal /// </summary> /// <param name="currentDesiredJobEntity">CurrentDesiredJobEntity</param> public void UpdateTechnicalSkillsBAL(CurrentDesiredJobEntity currentDesiredJobEntity) { CurrentDesiredJobDAL currentDesiredJobDAL = new CurrentDesiredJobDAL(); currentDesiredJobDAL.UpdateTechnicalSkillsDAL(currentDesiredJobEntity); }
/// <summary> /// Method in CurrentDesiredJobBAL class to update Desired Details in Database /// </summary> /// <param name="currentDesiredJobEntity">Entity of CurrentDesiredJobEntity</param> public void UpdateProfessionalDetailsBAL(CurrentDesiredJobEntity currentDesiredJobEntity) { CurrentDesiredJobDAL currentDesiredJobDAL = new CurrentDesiredJobDAL(); currentDesiredJobDAL.UpdateProfessionalDetailsDAL(currentDesiredJobEntity); }
/// <summary> /// Update job looking for bal /// </summary> /// <param name="currentDesiredJobEntity">CurrentDesiredJobEntity</param> public void UpdateJobLookingBAL(CurrentDesiredJobEntity currentDesiredJobEntity) { CurrentDesiredJobDAL currentDesiredJobDAL = new CurrentDesiredJobDAL(); currentDesiredJobDAL.UpdateJobLookingForDAL(currentDesiredJobEntity); }
/// <summary> /// Update current and past experience details bal /// </summary> /// <param name="currentDesiredJobEntity">CurrentDesiredJobEntity</param> public void UpdateCurrentPastExperienceDetailsBAL(CurrentDesiredJobEntity currentDesiredJobEntity) { CurrentDesiredJobDAL currentDesiredJobDAL = new CurrentDesiredJobDAL(); currentDesiredJobDAL.UpdateCurrentPastExperienceDetailsDAL(currentDesiredJobEntity); }
/// <summary> /// Method to save Job details in CurrentDesiredJobBAL class /// </summary> /// <param name="currentDesiredJobEntity">Object of CurrentDesiredJobEntity class</param> public void SaveJobDetailsBAL(CurrentDesiredJobEntity currentDesiredJobEntity) { CurrentDesiredJobDAL currentDesiredJobDAL = new CurrentDesiredJobDAL(); currentDesiredJobDAL.SaveJobDetailsDAL(currentDesiredJobEntity); }
/// <summary> /// Delete job post looking for DAL /// </summary> /// <param name="jobPostlookingId">JobpostlookingId</param> public void DeleteJobPostLookingForDAL(int jobPostlookingId) { try { CurrentDesiredJobEntity currentDesiredJobEntity = new CurrentDesiredJobEntity(); connection.Open(); SqlParameter[] sparams = { new SqlParameter("@JobpostlookingId", jobPostlookingId) }; SqlHelper.ExecuteNonQuery(connection, CommandType.StoredProcedure, Constants.sp_JS_DeleteJobPostLookingFor, sparams); } catch (Exception) { // throw; } finally { connection.Close(); } }
/// <summary> /// Method to Save Desired Job Details in Database in CurrentDesiredJobDAL class /// </summary> /// <param name="currentDesiredJobEntity">Object of CurrentDesiredJobEntity</param> public void SaveDesiredJobDetailsDAL(CurrentDesiredJobEntity currentDesiredJobEntity) { try { connection.Open(); SqlParameter[] sparams = new SqlParameter[15]; sparams[0] = new SqlParameter("@candidateid", currentDesiredJobEntity.Candidateid); sparams[1] = new SqlParameter("@currentWorkingStatus", currentDesiredJobEntity.CurrentWorkingStatus); sparams[2] = new SqlParameter("@currentanualSal", currentDesiredJobEntity.CurrentAnualSal); sparams[3] = new SqlParameter("@expectedanualSal", currentDesiredJobEntity.ExpectedAnualSal); sparams[4] = new SqlParameter("@noticeperiod", currentDesiredJobEntity.NoticePeriod); sparams[5] = new SqlParameter("@employmentstatus", currentDesiredJobEntity.EmploymentStatus); sparams[6] = new SqlParameter("@jobtype", currentDesiredJobEntity.JobType); sparams[7] = new SqlParameter("@companyType", currentDesiredJobEntity.CompanyType); sparams[8] = new SqlParameter("@availabilityForInterview", currentDesiredJobEntity.Availabilityforinterview); sparams[9] = new SqlParameter("@preferredCountry", currentDesiredJobEntity.PreferredCountry); sparams[10] = new SqlParameter("@preferredState", currentDesiredJobEntity.PreferredState); sparams[11] = new SqlParameter("@preferredcity", currentDesiredJobEntity.PreferredCity); sparams[12] = new SqlParameter("@preferredarea", currentDesiredJobEntity.PreferrefArea); sparams[13] = new SqlParameter("@beforeTime", currentDesiredJobEntity.BeforeTime); sparams[14] = new SqlParameter("@afterTime", currentDesiredJobEntity.AfterTime); SqlHelper.ExecuteNonQuery(connection, CommandType.StoredProcedure, "sp_JS_InsertDesiredJobDetails", sparams); } catch (Exception) { // throw; } finally { connection.Close(); } }
/// <summary> /// Method to Save Job Details in Database in CurrentDesiredJobDAL class /// </summary> /// <param name="currentDesiredJobEntity">Object of CurrentDesiredJobEntity</param> public void SaveJobDetailsDAL(CurrentDesiredJobEntity currentDesiredJobEntity) { try { connection.Open(); SqlParameter[] sparams = new SqlParameter[6]; sparams[0] = new SqlParameter("@candidateId", currentDesiredJobEntity.Candidateid); sparams[1] = new SqlParameter("@resumeHeadline", currentDesiredJobEntity.ResumeHeadline); sparams[2] = new SqlParameter("@objective", currentDesiredJobEntity.Objective); sparams[3] = new SqlParameter("@profileSummary", currentDesiredJobEntity.ProfileSummary); sparams[4] = new SqlParameter("@employeedOrNot", currentDesiredJobEntity.CurrentEmployeedUnemployeed); sparams[5] = new SqlParameter("@totalExperiecnce", currentDesiredJobEntity.TotalExperience); SqlHelper.ExecuteNonQuery(connection, CommandType.StoredProcedure, Constants.sp_JS_InsertJobDetails, sparams); } catch (Exception) { // throw; } finally { connection.Close(); } }
/// <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; } }