private void ajouterUnArticleToolStripMenuItem_Click_1(object sender, EventArgs e) { Console.WriteLine("Ajout d'un article"); AddOrModifyArticle addArticle = new AddOrModifyArticle(); if (addArticle.ShowDialog() == DialogResult.OK) { listView.Refresh(); } }
private void modificationArticle() { int i = listView.SelectedIndices[0]; Console.WriteLine("Modification de l'article " + listView.Items[i].Text); Articles article = new Articles(listView.Items[i].Text); article.loadFromDB(); AddOrModifyArticle addArticle = new AddOrModifyArticle(article); addArticle.ShowDialog(); }