Ejemplo n.º 1
0
 private void btEditArticle_Click(object sender, EventArgs e)//editbuttonArt                                 //WORKS
 {
     if (listViewArticles.SelectedItems.Count > 0)
     {
         int outcome = 1;
         int.TryParse(listViewArticles.SelectedItems[0].Name, out outcome);
         Article     article     = Program.db.Articles.Find(outcome);
         Category    category    = Program.db.Categories.Find(article.CategorieID);
         Supplier    supplier    = Program.db.Suppliers.Find(article.SupplierID);
         EditArticle articleedit = new EditArticle(article, category, supplier);
         articleedit.Show();
     }
 }
Ejemplo n.º 2
0
        ////////////////////////////////////////////////////////////////////////////////////////////Buttons Articles
        private void btAddArticle_Click(object sender, EventArgs e)//addbuttonArt                               //WORKS
        {
            EditArticle articleAdd = new EditArticle();

            articleAdd.Show();
        }