コード例 #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>");
        }
コード例 #2
0
ファイル: Adm.aspx.cs プロジェクト: helkias2/estudos
        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();
        }
コード例 #3
0
ファイル: Groups.aspx.cs プロジェクト: whatanaka/estudos
        private void getData(int id)
        {
            fields();
            Business.BsGroup p = new Business.BsGroup();
            p.Id       = id;
            txtId.Text = id + "";
            p.GetObject();

            txtIDescription.Text = p.Description;
        }
コード例 #4
0
ファイル: Groups.aspx.cs プロジェクト: whatanaka/estudos
        private void Page_Load(object sender, System.EventArgs e)
        {
            if (!Business.BsUser.UserOn())
            {
                Response.Write("<script>alert( 'Sua sessão expirou!' );top.login();</script>");
                Response.End();
            }
            else
            {
                usr = Business.BsUser.GetUserOn();
            }

            if (!Page.IsPostBack)
            {
                if (Request["CommandName"] != null && Request["CommandName"] == "Alter")
                {
                    getData(Convert.ToInt32(Request["id"]));
                }
                else if (Request["CommandName"] == "Config")
                {
                    getConfig(Convert.ToInt32(Request["id"]), Convert.ToInt32("0" + Request["paran"]));
                }
                else if (Request["CommandName"] != null && Request["CommandName"] == "Exclude")
                {
                    Business.BsGroup g = new Business.BsGroup();
                    g.Id = Convert.ToInt32(Request["id"]);
                    g.GetObject();
                    g.ExcludeObject();
                    searchMemory();
                }
                else
                {
                    searchMemory();
                }
            }
        }