Exemple #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     user = SessionUser.GetSession();
     user.ValidateAuthority("Auth_News_Examine");
     if (!user.hasAuthority("Auth_News_Retrieve"))
     {
         href1.Visible = false;
     }
     if (!user.hasAuthority("Auth_News_Add"))
     {
         A1.Visible = false;
     }
     if (!IsPostBack)
     {
         ReadValue();
     }
 }
Exemple #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                _user = SessionUser.GetSession();
                RadPanelItem radPanelItem3 = new RadPanelItem("终端用户管理");

                if (_user.hasAuthority("Auth_EndUser_Retrieve"))
                {
                    radPanelItem3.Items.Add(new RadPanelItem("检索终端用户", "EndUserList.aspx"));
                }
                if (_user.hasAuthority("Auth_EndUser_Add"))
                {
                    radPanelItem3.Items.Add(new RadPanelItem("添加终端用户", "AddEndUser.aspx"));
                }
                RadPanelBar1.Items.Add(radPanelItem3);
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     user = SessionUser.GetSession();
     if (!user.hasAuthority("Auth_SysUser_Add"))
     {
         href1.Visible = false;
     }
     if (!IsPostBack)
         RGrid_SysUserList.Visible = false;
 }
Exemple #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _user = SessionUser.GetSession();
            if (!IsPostBack)
            {
                RadPanelItem radPanelItem3 = new RadPanelItem("系统代码管理");
                radPanelItem3.Items.Add(new RadPanelItem("查看系统代码", "SysCodeList.aspx"));
                radPanelItem3.Items.Add(new RadPanelItem("新建系统代码", "AddSysCode.aspx"));
                if (_user.hasAuthority("Auth_Code_CRUD"))
                {
                    RadPanelBar1.Items.Add(radPanelItem3);
                }

                RadPanelItem radPanelItem2 = new RadPanelItem("管理操作员");
                radPanelItem2.Items.Add(new RadPanelItem("查询操作员", "SysUserList.aspx"));
                if (_user.hasAuthority("Auth_SysUser_Add"))
                {
                    radPanelItem2.Items.Add(new RadPanelItem("添加操作员", "AddSysUser.aspx"));
                }
                RadPanelBar1.Items.Add(radPanelItem2);
            }
        }
Exemple #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                _user = SessionUser.GetSession();
                RadPanelItem radPanelItem3 = new RadPanelItem("条目管理");

                if (_user.hasAuthority("Auth_News_Retrieve"))
                {
                    radPanelItem3.Items.Add(new RadPanelItem("检索条目", "NewsList.aspx"));
                }
                if (_user.hasAuthority("Auth_News_Add"))
                {
                    radPanelItem3.Items.Add(new RadPanelItem("添加条目", "NewsEdit.aspx"));
                }
                if (_user.hasAuthority("Auth_News_Examine"))
                {
                    radPanelItem3.Items.Add(new RadPanelItem("条目审核", "NewsCheck.aspx"));
                }
                RadPanelBar1.Items.Add(radPanelItem3);
            }
        }
Exemple #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Model.SysCodeDetail widthModel = scd.GetModel("img_width");
     if (widthModel != null)
     {
         img_width = int.Parse(widthModel.SYSCodeDetialContext);
     }
     Model.SysCodeDetail heightModel = scd.GetModel("img_height");
     if (heightModel != null)
     {
         img_height = int.Parse(heightModel.SYSCodeDetialContext);
     }
     user = SessionUser.GetSession();
     user.ValidateAuthority("Auth_News_Add");
     if (!user.hasAuthority("Auth_News_Retrieve"))
     {
         href1.Visible = false;
     }
     if (!user.hasAuthority("Auth_News_Examine"))
     {
         A1.Visible = false;
     }
     contentEditor.EditModes = EditModes.All;
     contentEditor.EditModes = contentEditor.EditModes ^ EditModes.Preview;
     contentEditor.ImageManager.ContentProviderTypeName = typeof(ChangeImageSizeProvider).AssemblyQualifiedName;
     if (!user.hasAuthority("Auth_Image_Upload"))
     {
         string[] a = { "" };
         contentEditor.ImageManager.UploadPaths = a;
         contentEditor.ImageManager.DeletePaths = a;
         contentEditor.ImageManager.ViewPaths = a;
     }
     if (!IsPostBack)
     {
         List<Category> cgList = cg.DataTableToList(cg.GetList(5, "1", -1, 0, false).Tables[0]);
         cgList.RemoveAll(CT => !CT.Memo.Contains("RW"));
         DataTable table = new DataTable();
         table.Columns.Add("AutoID");
         table.Columns.Add("ParentCategoryID");
         table.Columns.Add("CategoryName");
         foreach (Category cgm in cgList)
         {
             if (cgm.ParentCategoryID==-1)
             {
                 table.Rows.Add(new String[] { cgm.AutoID.ToString(), null, cgm.CategoryName });
             }
             else
             {
                 table.Rows.Add(new String[] { cgm.AutoID.ToString(), cgm.ParentCategoryID.ToString(), cgm.CategoryName });
             }
         }
         RadDropDownTree2.DataFieldID = "AutoID";
         RadDropDownTree2.DataFieldParentID = "ParentCategoryID";
         RadDropDownTree2.DataValueField = "AutoID";
         RadDropDownTree2.DataTextField = "CategoryName";
         RadDropDownTree2.DataSource = table;
         RadDropDownTree2.DataBind();
         RadTreeView categoryTreeView = RadDropDownTree2.Controls[0] as RadTreeView;
         categoryTreeView.Nodes[0].Expanded = true;
         categoryTreeView.ShowLineImages = false;
     }
 }
Exemple #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            user = SessionUser.GetSession();
            if (!IsPostBack)
            {

                RadMenuItem radMenuItem1 = new RadMenuItem("功能(F)");
                radMenuItem1.AccessKey = "F";
                radMenuItem1.Items.Add(new RadMenuItem("注销(E)"));
                radMenuItem1.Items.Add(new RadMenuItem("关闭(X)"));
                radMenuItem1.PostBack = false;

                RadMenuItem radMenuItem4 = new RadMenuItem("系统代码管理(M)");
                radMenuItem4.AccessKey = "M";
                if (user.hasAuthority("Auth_Code_CRUD"))
                {
                    radMenuItem4.Items.Add(new RadMenuItem("查看系统代码(V)", "SystemManage/SysCodeList.aspx") { AccessKey = "V" });
                    radMenuItem4.Items.Add(new RadMenuItem("新建系统代码(N)", "SystemManage/AddSysCode.aspx") { AccessKey = "N" });
                    radMenuItem4.Items.Add(new RadMenuItem() { IsSeparator = true });
                }
                radMenuItem4.Items.Add(new RadMenuItem("查看操作员(V)", "SystemManage/SysUserList.aspx") { AccessKey = "V" });
                if (user.hasAuthority("Auth_SysUser_Add"))
                {
                    radMenuItem4.Items.Add(new RadMenuItem("新建操作员(N)", "SystemManage/AddSysUser.aspx") { AccessKey = "N" });
                }
                radMenuItem4.PostBack = false;

                RadMenuItem radMenuItem3 = new RadMenuItem("条目管理(P)");
                radMenuItem3.AccessKey = "P";
                bool newsTag = false;

                if (user.hasAuthority("Auth_News_Retrieve"))
                {
                    newsTag = true;
                    radMenuItem3.Items.Add(new RadMenuItem("检索条目(B)", "NewsManage/NewsList.aspx") { AccessKey = "B" });
                }
                if (user.hasAuthority("Auth_News_Add"))
                {
                    newsTag = true;
                    radMenuItem3.Items.Add(new RadMenuItem("添加条目(J)", "NewsManage/NewsEdit.aspx") { AccessKey = "J" });
                }

                if (user.hasAuthority("Auth_News_Examine"))
                {
                    newsTag = true;
                    radMenuItem3.Items.Add(new RadMenuItem("条目审核(E)", "NewsManage/NewsCheck.aspx") { AccessKey = "E" });

                }
                RadMenuItem radMenuItem8 = new RadMenuItem("公告管理(P)");
                radMenuItem8.AccessKey = "N";
                radMenuItem8.Items.Add(new RadMenuItem("公告添加(K)", "NoticeManage/NoticeEdit.aspx") { AccessKey = "K" });
                radMenuItem8.Items.Add(new RadMenuItem("公告列表(H)", "NoticeManage/NoticeList.aspx") { AccessKey = "H" });

                RadMenuItem radMenuItem9 = new RadMenuItem("积分管理(I)");
                radMenuItem9.AccessKey = "I";
                radMenuItem9.Items.Add(new RadMenuItem("积分历史(K)", "IntegralManage/IntegralList.aspx") { AccessKey = "K" });
                radMenuItem9.Items.Add(new RadMenuItem("积分配置(C)", "IntegralManage/IntegralConfiguration.aspx") { AccessKey = "C" });
                radMenuItem9.Items.Add(new RadMenuItem("礼品查询(L)", "IntegralManage/GiftList.aspx") { AccessKey = "L" });
                radMenuItem9.Items.Add(new RadMenuItem("礼品定义(D)", "IntegralManage/GiftEdit.aspx") { AccessKey = "D" });
                radMenuItem9.Items.Add(new RadMenuItem("积分兑换记录(H)", "IntegralManage/IntegralExchangeRecords.aspx") { AccessKey = "H" });

                RadMenuItem radMenuItem10 = new RadMenuItem("问卷管理(Q)");
                radMenuItem10.AccessKey = "Q";
                radMenuItem10.Items.Add(new RadMenuItem("检索问卷(C)", "QuestionnaireManage/QuestionnaireList.aspx") { AccessKey = "C" });
                radMenuItem10.Items.Add(new RadMenuItem("添加问卷(A)", "QuestionnaireManage/QuestionnaireEdit.aspx") { AccessKey = "A" });

                RadMenuItem radMenuItem6 = new RadMenuItem("分类管理(C)");
                radMenuItem6.AccessKey = "C";
                radMenuItem6.Items.Add(new RadMenuItem("分类查询(S)", "CategoryManage/CategoryView.aspx") { AccessKey = "S" });

                RadMenuItem radMenuItem7 = new RadMenuItem("终端用户管理(C)");
                radMenuItem7.AccessKey = "U";

                bool userTag = false;

                if (user.hasAuthority("Auth_EndUser_Retrieve"))
                {
                    userTag = true;
                    radMenuItem7.Items.Add(new RadMenuItem("查询终端用户(R)", "EndUserManage/EndUserList.aspx") { AccessKey = "R" });
                }
                if (user.hasAuthority("Auth_News_Add"))
                {
                    userTag = true;
                    radMenuItem7.Items.Add(new RadMenuItem("添加终端用户(A)", "EndUserManage/AddEndUser.aspx") { AccessKey = "A" });

                }

                RadMenuItem radMenuItem11 = new RadMenuItem("用户行为分析(C)");
                radMenuItem11.AccessKey = "C";
                radMenuItem11.Items.Add(new RadMenuItem("用户行为统计(A)", "UserBehaviorManage/UserBehaviorStatistics.aspx") { AccessKey = "A" });

                RadMenuItem radMenuItem5 = new RadMenuItem("日志管理(L)");
                radMenuItem5.AccessKey = "L";
                radMenuItem5.Items.Add(new RadMenuItem("日志查询(R)", "LogManage/LogList.aspx") { AccessKey = "R" });

                RadMenuItem skinMenu = new RadMenuItem("皮肤(T)");
                skinMenu.AccessKey = "T";
                skinMenu.Items.Add(new RadMenuItem("Windows7") { AccessKey = "W" });
                skinMenu.Items.Add(new RadMenuItem("Black") { AccessKey = "B" });
                skinMenu.Items.Add(new RadMenuItem("Metro") { AccessKey = "M" });
                skinMenu.PostBack = false;

                AddRadMenuItem(radMenuItem1);

                if (newsTag)
                {
                    AddRadMenuItem(radMenuItem3);
                }
                AddRadMenuItem(radMenuItem8);
                if (userTag)
                {
                    AddRadMenuItem(radMenuItem7);
                }
                AddRadMenuItem(radMenuItem10);
                AddRadMenuItem(radMenuItem9);
                AddRadMenuItem(radMenuItem11);
                AddRadMenuItem(radMenuItem6);
                AddRadMenuItem(radMenuItem4);
                if (user.hasAuthority("Auth_Log"))
                {
                    AddRadMenuItem(radMenuItem5);
                }

                AddRadMenuItem(skinMenu);
            }
        }
Exemple #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            user = SessionUser.GetSession();
            //user.ValidateAuthority("Auth_News_Retrieve");
            if (!user.hasAuthority("Auth_News_Add"))
            {
                href1.Visible = false;
            }
            if (!user.hasAuthority("Auth_News_Examine"))
            {
                A1.Visible = false;
            }
            if (!IsPostBack)
            {
                RGrid_NewsList.Visible = false;
                //初始化分类选择下拉树
                List<Model.Category> cgList = cg.DataTableToList(cg.GetList(5, "1", -1, 0, false).Tables[0]);
                cgList.RemoveAll(CT => !CT.Memo.Contains("R"));
                DataTable table = new DataTable();
                table.Columns.Add("AutoID");
                table.Columns.Add("ParentCategoryID");
                table.Columns.Add("CategoryName");
                foreach (Model.Category cgm in cgList)
                {
                    if (cgm.ParentCategoryID == -1)
                    {
                        table.Rows.Add(new String[] { cgm.AutoID.ToString(), null, cgm.CategoryName });
                    }
                    else
                    {
                        table.Rows.Add(new String[] { cgm.AutoID.ToString(), cgm.ParentCategoryID.ToString(), cgm.CategoryName });
                    }
                }
                RadDropDownTree2.DataFieldID = "AutoID";
                RadDropDownTree2.DataFieldParentID = "ParentCategoryID";
                RadDropDownTree2.DataValueField = "AutoID";
                RadDropDownTree2.DataTextField = "CategoryName";
                RadDropDownTree2.DataSource = table;
                RadDropDownTree2.DataBind();
                RadTreeView categoryTreeView = RadDropDownTree2.Controls[0] as RadTreeView;
                //categoryTreeView.Nodes[0].Expanded = true;
                categoryTreeView.ShowLineImages = false;

                List<Model.SysCodeDetail> dataSoucerList = scd.GetModelList(0, "DataSource", -1, -1, false);
                dataSoucerList.RemoveAll(rt => rt.IsValid == false);
                Model.SysCodeDetail dsModel = new Model.SysCodeDetail();
                dsModel.SYSCodeDetialID = "0";
                dsModel.SYSCodeDetialContext = "不限";
                dataSoucerList.Insert(0, dsModel);
                RCB_DataSource.DataValueField = "SYSCodeDetialID";
                RCB_DataSource.DataTextField = "SYSCodeDetialContext";
                RCB_DataSource.DataSource = dataSoucerList;
                RCB_DataSource.DataBind();

                List<Model.SysUser> suList = su.GetModelList(-1, "", -1, 4, true);
                Model.SysUser sm = new Model.SysUser();
                sm.UserID = "0";
                sm.UserName = "******";
                suList.Insert(0, sm);
                suList.ForEach(st => st.UserName = st.UserName + " [" + st.UserID + "]");
                RCB_Publisher.DataValueField = "UserID";
                RCB_Publisher.DataTextField = "USerName";
                RCB_Publisher.DataSource = suList;
                RCB_Publisher.DataBind();
                RCB_Publisher.SelectedValue = user.UserInfo.UserID;
            }
        }