private void addToolStripMenuItem_Click(object sender, EventArgs e) { using (AddEditCategory frm = new AddEditCategory(null)) { if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK) { LoadCategories(); categoryBindingSource.MoveLast(); } } }
private void metroGrid1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { Category obj = categoryBindingSource.Current as Category; using (AddEditCategory frm = new AddEditCategory(obj)) { if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK) { LoadCategories(); } } }