예제 #1
0
        public GroupWindow(Group grp_)
            : base(Gtk.WindowType.Toplevel)
        {
            this.Build ();

            PopulateTaskTypes();

            if (grp_ != null )
            {
                _grp = grp_;
                _update = true;
                FillDetails();
            }
            else
            {
                _grp = new Group();
            }
        }
예제 #2
0
        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();
        }
예제 #3
0
 public GroupTreeNode(Group g)
 {
     grp = g;
 }