Beispiel #1
0
        private void getConfig(int id, int paran)
        {
            config(id, paran);
            if (paran == 0)
            {
                Business.BsFolder f = new Business.BsFolder();
                f.Groups.Add(id, new Business.BsGroup(id));
                Business.BsFolders fs = f.GetObjectsByGroups();

                lstIAdd.Items.Clear();
                for (int i = 0; i < fs.Count; i++)
                {
                    ListItem l = new ListItem(fs[i].Name, fs[i].Id + "");
                    lstIAdd.Items.Add(l);
                    lstIFolders.Items.Remove(l);
                }
            }
            else
            {
                Business.BsUser u = new Business.BsUser();
                u.Groups.Add(id, new Business.BsGroup(id));
                Business.BsUsers us = u.GetObjectsByGroups();

                lstIAddUsers.Items.Clear();
                for (int i = 0; i < us.Count; i++)
                {
                    ListItem l = new ListItem(us[i].Name, us[i].Id + "");
                    lstIAddUsers.Items.Add(l);
                    lstIUsers.Items.Remove(l);
                }
            }
        }
Beispiel #2
0
        private void saveConfig(int id)
        {
            Business.BsFolders fs = new Business.BsFolders();
            int    x    = lstIFolders.Items.Count;
            string retn = "";

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

            for (int i = 0; i < list.Length; i++)
            {
                if (list[i] != "")
                {
                    Business.BsFolder ps = new Business.BsFolder();
                    ps.Id = Convert.ToInt32(list[i]);
                    ps.GetObject();
                    fs.Add(ps.Id, ps);
                    lstIAdd.Items.Add(new ListItem(ps.Name, ps.Id + ""));
                }
            }

            Business.BsGroup g = new Business.BsGroup();
            g.Id = id;
            g.Folder.AddFoldersByGroup(fs, g);
            searchMemory();
        }
Beispiel #3
0
 private void setComboFolders()
 {
     Business.BsFolder  f  = new Business.BsFolder();
     Business.BsFolders fs = f.GetObjects();
     for (int i = 0; i < fs.Count; i++)
     {
         lstIFolders.Items.Add(new ListItem(fs[i].Name, fs[i].Id + ""));
     }
 }
Beispiel #4
0
        private void GetFolders()
        {
            Business.BsFolder f = new Business.BsFolder();
            f.IdParent = 0;
            Business.BsFolders fs = f.GetObjects();

            for (int i = 0; i < fs.Count; i++)
            {
                int    count  = Business.BsFolder.CountChild(fs[i], usr.Groups);
                string events = "";
                string hand   = "";
                string dir    = "dirFechadoSemMais.gif";
                if (count > 0)
                {
                    events = "onclick=\"OpenDir(1)\"";
                    hand   = "style=\"cursor:hand\"";
                    dir    = "dirFechado.gif";
                }

                HtmlTableRow  r = new HtmlTableRow();
                HtmlTableCell c = new HtmlTableCell();

                c.InnerHtml  = "<TABLE WIDTH=\"100%\" BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\">";
                c.InnerHtml += "	<TR id="+ fs[i].Id + " >";
                c.InnerHtml += "		<Td NoWrap >";
                c.InnerHtml += "			<TABLE BORDER=\"0\" CELLSPACING=\"2\" CELLPADDING=\"0\">";
                c.InnerHtml += "				<TR >";
                c.InnerHtml += "					<TD width=10 "+ hand + events + " ><img border=0 onmousedown=\"startDrag('" + fs[i].Id + "', 'Pasta')\" src=\"imagens/" + dir + "\"></TD>";
                c.InnerHtml += "					<TD onmouseout=\"outCassFolder()\" onmouseover=\"overClassFolder()\" isFolder=\"true\" idParent="+ fs[i].IdParent + " idFolder=" + fs[i].Id + " style=\"cursor:hand\" onmousedown=\"FolderSelect()\" ondblclick=\"FolderAlter()\" >" + fs[i].Name + "</TD>";
                c.InnerHtml += "				</TR>";
                c.InnerHtml += "			</TABLE>";
                c.InnerHtml += "		</Td >";
                c.InnerHtml += "	</TR>";
                c.InnerHtml += "</TABLE>";

                r.Controls.Add(c);

                tbFolders.Controls.Add(r);
            }
        }