private void saveGroups(BsItemForm item) { 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 + "")); } } item.Group.AddGroupsByItemForm(gps, item); RegisterClientScriptBlock("ok1", "<script>top.closeLayerAlpha()</script>"); }
private void setComboGroups() { Business.BsGroup g = new Business.BsGroup(); Business.BsGroups gps = g.GetObjects(); for (int i = 0; i < gps.Count; i++) { lstIGroups.Items.Add(new ListItem(gps[i].Description, gps[i].Id + "")); } }
public BsFields GetObjectsByGroups() { DataTable dt = Database.DaFields.GetFieldsByGroups( _id, BsGroup.ConvertToArrayGroups(Groups) ); return(addObjectsList(dt)); }
public BsUsers GetObjectsByGroups() { Database.DaUsers ass = new Database.DaUsers(); DataTable dt = ass.GetUsersByGroups( _id, BsGroup.ConvertToArrayGroups(Groups) ); return(addObjectsList(dt)); }
public void Clear() { _id = 0; _name = ""; _idParent = -1; _group = null; _groups = null; _form = null; _forms = null; _user = null; }
public BsFolders GetObjectsByGroups() { DataTable dt = Database.DaFolders.GetFoldersByGroups( _id, _idParent, _name, BsGroup.ConvertToArrayGroups(Groups) ); return(addObjectsList(dt)); }
public BsItensForm GetObjectsByGroups(string order, string where) { DataTable dt = Database.DaItensForms.GetItensFormByGroups( _id, Form.Id, Folder.Id, order, where, BsGroup.ConvertToArrayGroups(Groups) ); return(addObjectsList(dt)); }
public void AddFoldersByGroup(BsFolders f_, BsGroup group_) { if (group_.Id <= 0) { throw new Exception("id group not found"); } Database.DaFolders.DelFoldersByGroupId(group_.Id); for (int i = 0; i < f_.Count; i++) { Database.DaGroups.AddGroupFolder(group_.Id, f_[i].Id); } }
public void AddFieldsByGroup(BsFields fds_, BsGroup g_) { if (g_.Id <= 0) { throw new Exception("id group not found"); } Database.DaFields.DelFieldsByGroupId(g_.Id); for (int i = 0; i < fds_.Count; i++) { Database.DaGroups.AddGroupField(fds_[i].Id, g_.Id); } }
public void AddUsersByGroup(BsUsers u_, BsGroup g_) { if (g_.Id <= 0) { throw new Exception("id group not found"); } Database.DaUsers u = new Database.DaUsers(); u.DelUsersByGroupId(g_.Id); for (int i = 0; i < u_.Count; i++) { Database.DaGroups.AddGroupUser(u_[i].Id, g_.Id); } }
public void AddItenFormByGroup(BsItensForm f_, BsGroup g_) { if (g_.Id == 0) { throw new Exception("id group not found"); } if (f_.Count > 0) { Database.DaItensForms.DelItensFormByGroupId(g_.Id, f_[0].Form.Id); } for (int i = 0; i < f_.Count; i++) { Database.DaGroups.AddGroupItemForm(g_.Id, f_[i].Id, f_[i].Form.Id); } }
private void getConfig(BsItemForm item) { item.GetObject(); setComboGroups(); Business.BsGroup gp = new Business.BsGroup(); gp.ItensForm.Add(item.Id, item); Business.BsGroups gps = gp.GetObjectsByItensForm(); lstIAddGroups.Items.Clear(); for (int i = 0; i < gps.Count; i++) { ListItem l = new ListItem(gps[i].Description, gps[i].Id + ""); lstIAddGroups.Items.Add(l); lstIGroups.Items.Remove(l); } }
public BsFolder(int id_, string name_, int idParent_, BsGroup group_, BsGroups groups_, BsForm form_, BsForms forms_, BsUser user_) { this._id = id_; this._name = name_; this._idParent = idParent_; this._group = group_; this._groups = groups_; this._form = form_; this._forms = forms_; this._user = user_; }
public static int CountChild(BsFolder f, BsGroups g) { return(Database.DaFolders.CountChild(f.Id, BsGroup.ConvertToArrayGroups(g))); }
private BsGroup setObject(BsGroup g_, DataRow dr_) { g_._id = Convert.ToInt32(dr_["groupId"]); g_._description = dr_["description"].ToString(); return(g_); }