예제 #1
0
        private void LoadUserRestrictions(string UserName)
        {
            try
            {
                //Load allowed navigation into tree
                DataTable NavigatorTree = new DataTable();
                NavigatorTree = VSWebBL.SecurityBL.AdminTabBL.Ins.NavigatorVisibleUpdateTree();
                NavigatorVisibleTreeList.ClearNodes();
                if (NavigatorTree.Rows.Count > 0)
                {
                    NavigatorVisibleTreeList.DataSource = NavigatorTree;
                    NavigatorVisibleTreeList.DataBind();
                }

                DataTable RestrictedNavigatorTree = VSWebBL.SecurityBL.AdminTabBL.Ins.GetRestrictedNavigatorByUserID(UserName, "<=2");
                NavigatorNotVisibleTreeList.ClearNodes();
                if (RestrictedNavigatorTree.Rows.Count >= 0)
                {
                    NavigatorNotVisibleTreeList.DataSource   = RestrictedNavigatorTree;
                    NavigatorNotVisibleTreeList.KeyFieldName = "ID";
                    //NavigatorNotVisibleTreeList.ParentFieldName = "ParentID";
                    NavigatorNotVisibleTreeList.DataBind();
                    Session["DataNotVisible"] = RestrictedNavigatorTree;
                }
            }
            catch (Exception ex)
            {
                Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex);
                throw ex;
            }
            finally { }
        }
예제 #2
0
        protected void ResetServerAccessButton_Click(object sender, EventArgs e)
        {
            try
            {
                if (IsPostBack)
                {
                    FillUserNameComboBox();
                    UserNameComboBox.Text = "";

                    NavigatorNotVisibleTreeList.ClearNodes();
                    NavigatorVisibleTreeList.UnselectAll();
                }
            }
            catch (Exception ex)
            {
                Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex);
                throw ex;
            }
            finally { }
        }