// //Работа с Worker // private void btnAddWorker_Click(object sender, EventArgs e) { int selectedDivisionId = Convert.ToInt32(tvDivisions.SelectedNode.Tag); Form frm = new AddOrEditWorker(selectedDivisionId); frm.ShowDialog(); FullDGVWokers(); lb.Text = "Добавлен"; }
private void btnEditWorker_Click(object sender, EventArgs e) { if (dgvWorkers.CurrentCell != null) { Worker editWorker = GetSelectedWorker(); Form frm = new AddOrEditWorker(editWorker); frm.ShowDialog(); FullDGVWokers(); lb.Text = "Изменён"; } }