/// <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(); } }