private void button1_Click(object sender, EventArgs e) { AddEditSkillCategory aesc = new AddEditSkillCategory(); aesc.User = User; aesc.ShowDialog(); if(aesc.DialogResult==DialogResult.OK) { Rebind(); } }
private void button2_Click(object sender, EventArgs e) { if(dataGridView1.SelectedRows.Count>0) { AddEditSkillCategory aesc = new AddEditSkillCategory(); aesc.User = User; aesc.currentSkillCategoryId = Categories[dataGridView1.SelectedRows[0].Index].Id; aesc.ShowDialog(); if (aesc.DialogResult == DialogResult.OK) { Rebind(); } } }