Example #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         ChkAdminLevel("category", OSEnums.ActionEnum.View.ToString()); //检查权限
         if (channel_id != 0 && _action == "del")
         {
             ChkAdminLevel("category", OSEnums.ActionEnum.Delete.ToString()); //检查权限
             bll.Delete(channel_id);
         }
         this.ColumnListBind();
     }
 }
Example #2
0
        //删除导航
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            ChkAdminLevel("app_navigation_list", OSEnums.ActionEnum.Delete.ToString()); //检查权限
            BLL.contents.article_category bll = new BLL.contents.article_category();
            for (int i = 0; i < rptList.Items.Count; i++)
            {
                int      id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
                CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
                if (cb.Checked)
                {
                    bll.Delete(id);
                }
            }
            AddAdminLog(OSEnums.ActionEnum.Delete.ToString(), "删除导航信息"); //记录日志

            Response.Redirect("nav_list.aspx");
        }
Example #3
0
        private void delete_category(HttpContext context)
        {
            //取得管理员登录信息
            Model.managers.manager adminInfo = new Web.UI.ManagePage().GetAdminInfo();
            if (adminInfo == null)
            {
                context.Response.Write("{\"status\": 0, \"msg\": \"未登录或已超时,请重新登录!\"}");
                return;
            }
            int category_id = OSRequest.GetQueryInt("category_id");

            if (category_id == 0)
            {
                context.Response.Write("{\"status\": 0, \"msg\": \"参数错误!\"}");
                return;
            }
            BLL.contents.article_category bll = new BLL.contents.article_category();
            new BLL.managers.manager_log().Add(adminInfo.id, adminInfo.user_name, OSEnums.ActionEnum.Edit.ToString(), "删除栏目:" + bll.GetTitle(category_id)); //记录日志
            bll.Delete(category_id);
            context.Response.Write("{\"status\": 1, \"msg\": \"栏目删除成功!\"}");
        }
Example #4
0
 private void delete_category(HttpContext context)
 {
     //取得管理员登录信息
     Model.managers.manager adminInfo = new Web.UI.ManagePage().GetAdminInfo();
     if (adminInfo == null)
     {
         context.Response.Write("{\"status\": 0, \"msg\": \"未登录或已超时,请重新登录!\"}");
         return;
     }
     int category_id = OSRequest.GetQueryInt("category_id");
     if (category_id == 0)
     {
         context.Response.Write("{\"status\": 0, \"msg\": \"参数错误!\"}");
         return;
     }
     BLL.contents.article_category bll = new BLL.contents.article_category();
     new BLL.managers.manager_log().Add(adminInfo.id, adminInfo.user_name, OSEnums.ActionEnum.Edit.ToString(), "删除栏目:" + bll.GetTitle(category_id)); //记录日志
     bll.Delete(category_id);
     context.Response.Write("{\"status\": 1, \"msg\": \"栏目删除成功!\"}");
 }