Beispiel #1
0
        private void saveGroups(int folderId)
        {
            Business.BsGroups gps = new Business.BsGroups();
            int    x    = lstIGroups.Items.Count;
            string retn = "";

            if (Request["lstIAddGroups"] != null)
            {
                retn = Request["lstIAddGroups"].ToString();
            }
            string [] list = retn.Split(new char[] { ',' });
            lstIAddGroups.Items.Clear();

            for (int i = 0; i < list.Length; i++)
            {
                if (list[i] != "")
                {
                    Business.BsGroup ps = new Business.BsGroup();
                    ps.Id = Convert.ToInt32(list[i]);
                    ps.GetObject();
                    gps.Add(ps.Id, ps);
                    lstIAddGroups.Items.Add(new ListItem(ps.Description, ps.Id + ""));
                }
            }

            Business.BsFolder f = new Business.BsFolder();
            f.Id = folderId;
            f.Group.AddGroupsByFolder(gps, f);
            RegisterClientScriptBlock("ok1", "<script>top.closeLayerAlpha()</script>");
        }
Beispiel #2
0
        private void saveConfigGroups(int id)
        {
            Business.BsGroups gps = new Business.BsGroups();
            int    x    = lstIGroups.Items.Count;
            string retn = "";

            if (Request["lstIAddGroups"] != null)
            {
                retn = Request["lstIAddGroups"].ToString();
            }
            string [] list = retn.Split(new char[] { ',' });
            lstIAddGroups.Items.Clear();

            for (int i = 0; i < list.Length; i++)
            {
                if (list[i] != "")
                {
                    Business.BsGroup ps = new Business.BsGroup();
                    ps.Id = Convert.ToInt32(list[i]);
                    ps.GetObject();
                    gps.Add(ps.Id, ps);
                    lstIAddGroups.Items.Add(new ListItem(ps.Description, ps.Id + ""));
                }
            }

            Business.BsUser u = new Business.BsUser();
            u.Id = id;
            u.Group.AddGroupsByUser(gps, u);
            searchMemory();
        }