protected void BtnAddSkills_Click(object sender, EventArgs e) { if (this.IsValid == true) { bool CheckSelectedSkills = CheckCheckboxeList(ChkLstSkills); if (CheckSelectedSkills == false) { LblSelectCheckBoxError.Visible = true; return; } DataTable ObjSkillTable = (DataTable)ViewState["SkillTable"]; foreach (ListItem ObjChkLstSkill in ChkLstSkills.Items) { if (ObjChkLstSkill.Selected == true) { DataRow ObjSkillTableRow = ObjSkillTable.NewRow(); ObjSkillTableRow["SkillId"] = ObjChkLstSkill.Value; ObjSkillTable.Rows.Add(ObjSkillTableRow); } } ShowSkills(); AddSkillToJobPostModal.Visible = false; this.Form.DefaultButton = BtnAdJobPost.UniqueID; DdlAptitude.Focus(); } }
protected void LnkBtnDeleteSkill_Click(object sender, EventArgs e) { DataTable ObjSkillTable = (DataTable)ViewState["SkillTable"]; GridViewRow ObjCurrentRow = (GridViewRow)((LinkButton)sender).Parent.Parent; int Id = (int)GridViewSkills.DataKeys[ObjCurrentRow.RowIndex]["Id"]; DataView ObjSkillView = ObjSkillTable.DefaultView; ObjSkillView.RowFilter = "Id<>" + Id; ViewState["SkillTable"] = ObjSkillView.ToTable(); ShowSkills(); DdlAptitude.Focus(); this.Form.DefaultButton = BtnAdJobPost.UniqueID; }
protected void lnkBtnCloseAddSkillModal_Click(object sender, EventArgs e) { AddSkillToJobPostModal.Visible = false; DdlAptitude.Focus(); this.Form.DefaultButton = BtnAdJobPost.UniqueID; }