protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e) { Model.Category category3 = new Model.Category(); BLL.CategoryManager category4 = new BLL.CategoryManager(); int categoryID = Convert.ToInt32((GridView1.Rows[e.RowIndex].FindControl("LabelID") as Label).Text); bool bo = category4.Delete(categoryID); if (bo == true) { Bind(); } }
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e) { Model.Category category3 = new Model.Category(); BLL.CategoryManager category4 = new BLL.CategoryManager(); string categoryID = Convert.ToString((GridView1.Rows[e.RowIndex].FindControl("txbCategory") as TextBox).Text); bool bo = category4.Delete(categoryID); if (bo == true) { Bind(); } }
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e) { //Model.Question question3 = new Model.Question(); //BLL.QuestionManager question4 = new BLL.QuestionManager(); //int QuestionID = Convert.ToInt32((GridView1.Rows[e.RowIndex].FindControl("LabelquestionID") as Label).Text); //bool bo = question4.Delete(QuestionID); //if (bo == true) //{ // Bind(); //} Model.Category category3 = new Model.Category(); BLL.CategoryManager category4 = new BLL.CategoryManager(); string categoryID = Convert.ToString((GridView1.Rows[e.RowIndex].FindControl("txbCategory") as TextBox).Text); bool bo = category4.Delete(categoryID); if (bo == true) { Bind(); } }