private void BindGroups()
        {
            using (IDataReader reader = SecureGroup.GetListGroupsAsTree())
            {
                while (reader.Read())
                {
                    string GroupName = CommonHelper.GetResFileString(reader["GroupName"].ToString());
                    string GroupId   = reader["GroupId"].ToString();
                    int    Level     = (int)reader["Level"];
                    for (int i = 1; i < Level; i++)
                    {
                        GroupName = "  " + GroupName;
                    }
                    ListItem item = new ListItem(GroupName, GroupId);

                    ddGroups.Items.Add(item);
                }
            }

            ListItem li = ddGroups.SelectedItem;

            if (li != null)
            {
                BindGroupUsers(int.Parse(li.Value));
            }
        }
示例#2
0
        private void BindGroups()
        {
            ddGroups.Items.Add(new ListItem(GetGlobalResourceObject("IbnFramework.Common", "FavoritesGroup").ToString(), "0"));

            using (IDataReader reader = SecureGroup.GetListGroupsAsTree())
            {
                while (reader.Read())
                {
                    int groupid = (int)reader["GroupId"];
                    if (groupid != (int)InternalSecureGroups.Roles &&
                        groupid != (int)InternalSecureGroups.Partner &&
                        !SecureGroup.IsPartner(groupid))
                    {
                        string GroupName = CommonHelper.GetResFileString(reader["GroupName"].ToString());
                        string GroupId   = groupid.ToString();
                        int    Level     = (int)reader["Level"];
                        for (int i = 1; i < Level; i++)
                        {
                            GroupName = "  " + GroupName;
                        }
                        ListItem item = new ListItem(GroupName, GroupId);

                        ddGroups.Items.Add(item);
                    }
                }
            }

            ListItem li = ddGroups.SelectedItem;

            if (li != null)
            {
                BindGroupUsers(int.Parse(li.Value));
            }
        }
示例#3
0
        private void BindGroups()
        {
            //Groups Binding
            ddGroups.Items.Clear();

            // Any
            ddGroups.Items.Add(new ListItem(LocRM.GetString("AllFem"), "1"));

            using (IDataReader reader = SecureGroup.GetListGroupsAsTree())
            {
                while (reader.Read())
                {
                    string groupName = CommonHelper.GetResFileString(reader["GroupName"].ToString());
                    string GroupId   = reader["GroupId"].ToString();
                    int    Level     = (int)reader["Level"];
                    for (int i = 1; i < Level; i++)
                    {
                        groupName = "  " + groupName;
                    }
                    ListItem item = new ListItem(groupName, GroupId);
                    ddGroups.Items.Add(item);
                }
            }

            //Saved Value
            if (_pc["MV_Group"] == null)
            {
                _pc["MV_Group"] = ((int)InternalSecureGroups.Intranet).ToString();
            }
            ddGroups.ClearSelection();
            try
            {
                ddGroups.SelectedValue = _pc["MV_Group"];
            }
            catch
            {
                ddGroups.SelectedIndex = 0;
                _pc["MV_Group"]        = ddGroups.SelectedValue;
            }

            //Users Binding
            BindUsers(int.Parse(ddGroups.SelectedValue));
        }
示例#4
0
        private void BindGroups()
        {
            //Groups Binding
            GroupsList.Items.Clear();

            // Everyone
            GroupsList.Items.Add(new ListItem(GetGlobalResourceObject("IbnFramework.Global", "GroupEveryone").ToString(), "1"));

            using (IDataReader reader = SecureGroup.GetListGroupsAsTree())
            {
                while (reader.Read())
                {
                    string GroupName = CommonHelper.GetResFileString(reader["GroupName"].ToString());
                    string Id        = reader["GroupId"].ToString();
                    int    Level     = (int)reader["Level"];
                    for (int i = 0; i < Level; i++)
                    {
                        GroupName = "  " + GroupName;
                    }
                    ListItem item = new ListItem(GroupName, Id);
                    GroupsList.Items.Add(item);
                }
            }

            //Saved Value
            ListItem li = GroupsList.Items.FindByValue(GroupId);

            if (li != null)
            {
                li.Selected = true;
            }
            else
            {
                GroupsList.SelectedIndex = 0;
                GroupId = GroupsList.SelectedValue;
            }

            //Users Binding
            BindUsers();
        }