Ejemplo n.º 1
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();
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 删除类别
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 public void btnDeleteClass_Click(object sender, EventArgs e)
 {
     if (ClassList.SelectedItem != null && ClassList.SelectedValue.Length > 0)
     {
         int CategoryId = int.Parse(ClassList.SelectedValue);
         PermissionCategories bllcate = new PermissionCategories();
         if (!bllcate.ExistsPerm(CategoryId))
         {
             bllcate.Delete(CategoryId);
             LogHelp.AddUserLog(CurrentUser.UserName, CurrentUser.UserType, string.Format("删除权限类别:【{0}】", this.ClassList.SelectedItem.Text), this);
             CategoriesDatabind();
             if (ClassList.SelectedItem != null)
             {
                 gridView.OnBind();
             }
         }
         else
         {
             YSWL.Common.MessageBox.ShowFailTip(this, Resources.Site.TooltipPermCateNoDelete);
             return;
         }
     }
 }