public GroupWindow(Group grp_) : base(Gtk.WindowType.Toplevel) { this.Build (); PopulateTaskTypes(); if (grp_ != null ) { _grp = grp_; _update = true; FillDetails(); } else { _grp = new Group(); } }
private void LoadGroupes() { view.NodeStore = Store; view.AppendColumn("Név", new CellRendererText(), "text", 0); MySqlConnection conn = new MySqlConnection(Globals.ConnectionString); MySqlCommand cmd = new MySqlCommand("select * from groups", conn); conn.Open(); MySqlDataReader rdr = cmd.ExecuteReader(); while (rdr.Read()) { Group g = new Group(); g.Id = rdr.GetInt32(rdr.GetOrdinal("g_id")); g.Name = rdr.GetString(rdr.GetOrdinal("g_name")); g.TaskType = rdr.GetInt32(rdr.GetOrdinal("tt_id")); Store.AddNode( new GroupTreeNode(g) ); } conn.Close(); }
public GroupTreeNode(Group g) { grp = g; }