private void btn_add_Click(object sender, EventArgs e) { FormResourcesAdd form = new FormResourcesAdd(); form.ShowDialog(); updateResourceTable(); }
private void btn_change_Click(object sender, EventArgs e) { int PK_Resource = Convert.ToInt32(dgv_resources.SelectedRows[0].Cells[0].Value); Resource updatingResource = Program.db.Resources.Find(PK_Resource); if (updatingResource != null) { FormResourcesAdd form = new FormResourcesAdd(updatingResource); form.ShowDialog(); updateResourceTable(); } }