コード例 #1
0
 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();
     }
 }
コード例 #2
0
ファイル: createroom.aspx.cs プロジェクト: pyteach/Learnsite
 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();
     }
 }