private void button1_Click(object sender, EventArgs e) { var addEquip = new AddEquipment(); addEquip.ShowDialog(); ini(); isactive(); }
private void button2_Click(object sender, EventArgs e) { try { var addEquip = new AddEquipment(bgEquipment.SelectedRows[0].Cells["id"].Value.ToString(), bgEquipment.SelectedRows[0].Cells["cname"].Value.ToString(), bgEquipment.SelectedRows[0].Cells["abbreviation"].Value.ToString(), true); addEquip.ShowDialog(); } catch (Exception r) { MessageBox.Show("Нет записей для редактирования." + "\n" + r.ToString(), "Ошибка"); } ini(); isactive(); }