public TaskTypeWindow(TaskType tt_) : base(Gtk.WindowType.Toplevel) { this.Build (); if (tt_ != null ) { _tt = tt_; _update = true; FillDetails(); } else { _tt = new TaskType(); } }
public void LoadTaskTypes() { view.NodeStore = Store; view.AppendColumn("Név", new CellRendererText(), "text", 0); MySqlConnection conn = new MySqlConnection(Globals.ConnectionString); MySqlCommand cmd = new MySqlCommand("select * from tasktypes", conn); conn.Open(); MySqlDataReader rdr = cmd.ExecuteReader(); while (rdr.Read()) { TaskType tt = new TaskType(); tt.Id = rdr.GetInt32(rdr.GetOrdinal("tt_id")); tt.Name = rdr.GetString(rdr.GetOrdinal("tt_name")); Store.AddNode( new TaskTypeTreeNode(tt) ); } conn.Close(); }
public TaskTypeTreeNode(TaskType t) { tt = t; }