private void populateCombo() { foreach (Article a in ArticleDAO.GetAll()) { comboArticles.AppendText(a.Name); articles.Add(a); } comboArticles.Active = 0; }
public MainWindow() : base(Gtk.WindowType.Toplevel) { Build(); ICollection <Article> articles = ArticleDAO.GetAll(); TreeViewHelper.Fill(treeView, new string[] { "Id", "Name", "Category", "Price" }, articles); treeView.Selection.Changed += (sender, e) => refreshActions(); addAction.Activated += (sender, e) => new WArticle(); createCategory.Activated += (sender, e) => { WCategoria wCategoria = new WCategoria(new Categoria()); }; refreshActions(); }
private void fillTree() { TreeViewHelper.Fill(tvArticles, new string[] { "Id", "Name", "Category", "Price", "Stock" }, ArticleDAO.GetAll()); }