Ejemplo n.º 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 = "名称不能为空!";
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 保存权限类别
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void btnSaveCategories_Click(object sender, EventArgs e)
        {
            string Category = this.CategoriesName.Text.Trim();

            if (Category != "")
            {
                PermissionCategories bllcate = new PermissionCategories();
                bllcate.Create(Category);
                LogHelp.AddUserLog(CurrentUser.UserName, CurrentUser.UserType, string.Format("新增权限类别:【{0}】", this.CategoriesName.Text.Trim()), this);
                CategoriesDatabind();
                if (this.ClassList.SelectedItem != null)
                {
                    gridView.OnBind();
                }
                this.CategoriesName.Text = "";
            }
            else
            {
                YSWL.Common.MessageBox.ShowFailTip(this, Resources.Site.TooltipNoNull);
                return;
            }
        }