コード例 #1
0
 private void DeleteUserGroupInf_Click(object sender, EventArgs e)
 {
     if (base.CheckCookie())
     {
         Int32     groupid = WebHelper.RequestInt("groupid");
         UserGroup ug      = UserGroup.FindByID(groupid);
         if (ug != null)
         {
             try
             {
                 ug.DeleteWithCredits();
                 AdminVisitLog.InsertLog(this.userid, this.username, this.usergroupid, this.grouptitle, this.ip, "后台删除特殊用户组", "组ID:" + DNTRequest.GetInt("groupid", -1));
                 base.RegisterStartupScript("PAGE", "window.location.href='usergroupspecialgrid.aspx';");
                 return;
             }
             catch (Exception ex)
             {
                 base.RegisterStartupScript("", "<script>alert('操作失败,原因:" + ex.Message + "');window.location.href='usergroupspecialgrid.aspx';</script>");
                 return;
             }
         }
         base.RegisterStartupScript("", "<script>alert('操作失败');window.location.href='usergroupspecialgrid.aspx';</script>");
     }
 }