public Entry(MySqlDataReader dr, CatList catList) { Setup(); _catList = catList; this.Load(dr); }
public Entries(Entry ent, CatList cl) { _parEnt = ent; _catList = cl; }
public Entry(string key, CatList catList) { Setup(); _key = key; _catList = catList; base.MarkNew(); }
public Entries(CatList cl) { _catList = cl; }
public bool Contains(CatList cl) { foreach(CatList obj in List) { if (cl.Equals(obj)){ return true; } } return false; }
public CatList AddNew(string listName) { CatList cl= new CatList(listName, true, _conn); List.Add(cl); return cl; }
private void cboCatLists_SelectedIndexChanged(object sender, System.EventArgs e) { _pubList = (CatList)cboCatLists.SelectedItem; this.UpdateList(); }
private void Load_tvwHier() { CatLists cls = new CatLists(Connections.Inst.item("QED_DB").MySqlConnection); CatList pubList; if (!cls.Contains("Public") ) pubList = cls.AddNew("Public"); else pubList = cls.item("Public"); if (Thread.CurrentPrincipal.IsInRole("admin")) { if (!cls.Contains("System") ) cls.AddNew("System"); } _pubList = pubList; _systemList = cls.item("System"); this.cboCatLists.Items.Clear(); foreach(CatList cl in cls){ this.cboCatLists.Items.Add(cl); } if (!Thread.CurrentPrincipal.IsInRole("admin")){ this.cboCatLists.Items.Remove(cls.item("System")); } this.cboCatLists.SelectedItem = pubList; this.UpdateList(); }