private void AddNewArtical_Click(object sender, EventArgs e) { var newItemForm = new FrmNewItem(); newItemForm.ShowDialog(); RefreshDGVSource(); }
private void EditRow_Click(object sender, EventArgs e) { if (DGVArticles.SelectedRows.Count == 1) { Data.Model.Article articalForEdit = (Data.Model.Article)DGVArticles.SelectedRows[0].DataBoundItem; FrmNewItem editArticle = new FrmNewItem(articalForEdit); editArticle.ShowDialog(); DGVArticles.DataSource = new BindingList <Data.Model.Article>(_articalLogic.GetArticleByName(tbSearchItemNo.Text)); DGVArticles.ClearSelection(); } }