示例#1
0
 private void BtnAddCategory_Click(object sender, System.Web.UI.ImageClickEventArgs e)
 {
     string Category=this.CategoriesName.Text.Trim();
     if(Category!="")
     {
     PermissionCategories c=new PermissionCategories();
     c.Create(Category);
     CategoriesDatabind();
     if(this.ClassList.SelectedItem!=null)
     {
     PermissionsDatabind();
     }
     this.CategoriesName.Text="";
     }
     else
     {
     this.lbltip1.Text="���Ʋ���Ϊ�գ�";
     }
 }
示例#2
0
 private void BtnDelCategory_Click(object sender, System.Web.UI.ImageClickEventArgs e)
 {
     int CategoryId=int.Parse(this.ClassList.SelectedValue);
     PermissionCategories c=new PermissionCategories();
     c.Delete(CategoryId);
     CategoriesDatabind();
     if(this.ClassList.SelectedItem!=null)
     {
         PermissionsDatabind();
     }
 }