Exemple #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        this.keywords = DTRequest.GetQueryString("keywords");

        if (!Page.IsPostBack)
        {
            //登录验证
            adminUser.GetLoginState();

            //登录信息
            HttpCookie cookie = System.Web.HttpContext.Current.Request.Cookies["admin"];

            if (cookie != null)
            {
                Application["adminname"] = (string)cookie.Values["adminname"];
            }
            else if (Session["adminname"] != null)
            {
                Application["adminname"] = (string)Session["adminname"];
            }

            Cms.BLL.wx_log bll = new Cms.BLL.wx_log();
            string where = "select * from wx_log  order by id desc";
            this.AspNetPager1.AlwaysShow  = true;
            this.AspNetPager1.PageSize    = 10;
            this.AspNetPager1.RecordCount = bll.GetRecordCount("");
            this.RepeaterDataBind(where);

            bool blDelete = adminUser.setpurview("管理日志", "Delete");
            if (!blDelete)
            {
                btnDelete.Visible = false;
            }
        }
    }
Exemple #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            //登录验证
            adminUser.GetLoginState();

            //登录信息
            HttpCookie cookie = System.Web.HttpContext.Current.Request.Cookies["admin"];

            if (cookie != null)
            {
                Application["adminname"] = (string)cookie.Values["adminname"];
            }
            else if (Session["adminname"] != null)
            {
                Application["adminname"] = (string)Session["adminname"];
            }
            string strparentId = this.Request.QueryString["parentId"] ?? ""; //上级栏目ID
            classid = strparentId;                                           //


            string where = "select * from wx_log  order by id desc";
            this.AspNetPager1.AlwaysShow  = true;
            this.AspNetPager1.PageSize    = 10;
            this.AspNetPager1.RecordCount = bllorder.GetRecordCount("");
            this.RepeaterDataBind(where);
        }
    }