Exemplo n.º 1
0
 private void populateCombo()
 {
     foreach (Article a in ArticleDAO.GetAll())
     {
         comboArticles.AppendText(a.Name);
         articles.Add(a);
     }
     comboArticles.Active = 0;
 }
Exemplo n.º 2
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();
        }
Exemplo n.º 3
0
 private void fillTree()
 {
     TreeViewHelper.Fill(tvArticles, new string[] { "Id", "Name", "Category", "Price", "Stock" },
                         ArticleDAO.GetAll());
 }