using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace RedGlovePermission.Web.Admin.Modubles.Demo
{
    public partial class GeneralControl : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!SessionBox.CheckUserSession())
            {
                Response.Redirect("~/Admin/Login.aspx");
            }
            else
            {
                UserHandle.InitModule("Mod_Control");//初始化模块权限

                //浏览权限
                if (UserHandle.ValidationHandle(RGP_Tag.Browse))
                    Label1.Text = "开放";
                else
                    Label1.Text = "关闭";

                //新增权限
                if (UserHandle.ValidationHandle(RGP_Tag.Add))
                    Label2.Text = "开放";
                else
                    Label2.Text = "关闭";

                //编辑权限
                if (UserHandle.ValidationHandle(RGP_Tag.Edit))
                    Label3.Text = "开放";
                else
                    Label3.Text = "关闭";

                //删除权限
                if (UserHandle.ValidationHandle(RGP_Tag.Delete))
                    Label4.Text = "开放";
                else
                    Label4.Text = "关闭";

                //搜索权限
                if (UserHandle.ValidationHandle(RGP_Tag.Search))
                    Label5.Text = "开放";
                else
                    Label5.Text = "关闭";

                //审核权限
                if (UserHandle.ValidationHandle(RGP_Tag.Verify))
                    Label6.Text = "开放";
                else
                    Label6.Text = "关闭";

                //移动权限
                if (UserHandle.ValidationHandle(RGP_Tag.Move))
                    Label7.Text = "开放";
                else
                    Label7.Text = "关闭";

                //打印权限
                if (UserHandle.ValidationHandle(RGP_Tag.Print))
                    Label8.Text = "开放";
                else
                    Label8.Text = "关闭";

                //下载权限
                if (UserHandle.ValidationHandle(RGP_Tag.Download))
                    Label9.Text = "开放";
                else
                    Label9.Text = "关闭";

                //备份权限
                if (UserHandle.ValidationHandle(RGP_Tag.back))
                    Label10.Text = "开放";
                else
                    Label10.Text = "关闭";
            }
        }
    }
}
