Ejemplo n.º 1
0
        protected void lb_save_Click(object sender, EventArgs e)
        {
            IGroupManage gmobj = GetInterface.GetIGroupManage();
            string       gname = this.tb_GroupName.Text.Trim();

            if (string.IsNullOrEmpty(gname))
            {
                this.Alert(AdminCollect.ERR_GROUPNAME_NULL);
                return;
            }
            gmobj.AddUpdate(gname, 0);
            DvBind();
            SiteRuleCheck.FlushPageAndRightCache();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 保存修改
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void gvList_RowUpdating(object sender, GridViewUpdateEventArgs e)
        {
            TextBox tb      = (TextBox)this.gvList.Rows[e.RowIndex].FindControl("tb_Gname_Editor");
            string  newName = tb.Text.Trim();
            int     gid     = this.gvList.DataKeys[e.RowIndex].Value.GetInt(0);

            if (string.IsNullOrEmpty(newName))
            {
                this.Alert(AdminCollect.ERR_GROUPNAME_NULL);
                return;
            }
            IGroupManage igmobj = GetInterface.GetIGroupManage();

            igmobj.AddUpdate(newName, gid);
            this.gvList.EditIndex = -1;
            DvBind();
            SiteRuleCheck.FlushPageAndRightCache();
        }