示例#1
0
文件: List.cs 项目: jhogan/qed
 public Entry(MySqlDataReader dr, CatList catList)
 {
     Setup();
     _catList = catList;
     this.Load(dr);
 }
示例#2
0
文件: List.cs 项目: jhogan/qed
 public Entries(Entry ent, CatList cl)
 {
     _parEnt = ent;
     _catList = cl;
 }
示例#3
0
文件: List.cs 项目: jhogan/qed
 public Entry(string key, CatList catList)
 {
     Setup();
     _key = key;
     _catList = catList;
     base.MarkNew();
 }
示例#4
0
文件: List.cs 项目: jhogan/qed
 public Entries(CatList cl)
 {
     _catList = cl;
 }
示例#5
0
文件: List.cs 项目: jhogan/qed
 public bool Contains(CatList cl)
 {
     foreach(CatList obj in List) {
         if (cl.Equals(obj)){
             return true;
         }
     }
     return false;
 }
示例#6
0
文件: List.cs 项目: jhogan/qed
 public CatList AddNew(string listName)
 {
     CatList cl= new CatList(listName, true, _conn);
     List.Add(cl); return cl;
 }
示例#7
0
文件: Main.cs 项目: jhogan/qed
		private void cboCatLists_SelectedIndexChanged(object sender, System.EventArgs e) {
			_pubList = (CatList)cboCatLists.SelectedItem;
			this.UpdateList();
		}	
示例#8
0
文件: Main.cs 项目: jhogan/qed
		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();
		}