protected void GVclass_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Del") { int index = Convert.ToInt32(e.CommandArgument); int Rid = Convert.ToInt32(((GridView)sender).DataKeys[index].Values["Rid"].ToString()); LearnSite.BLL.Room rm = new LearnSite.BLL.Room(); rm.Delete(Rid); System.Threading.Thread.Sleep(1000); ShowAllRoom(); } }
protected void GVclass_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Del") { int index = Convert.ToInt32(e.CommandArgument); int Rid = Convert.ToInt32(((GridView)sender).DataKeys[index].Values["Rid"].ToString()); LearnSite.BLL.Room rm = new LearnSite.BLL.Room(); rm.Delete(Rid); System.Threading.Thread.Sleep(500); ShowAllRoom(); } }