コード例 #1
0
        //
        //Работа с 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 = "Добавлен";
        }
コード例 #2
0
 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 = "Изменён";
     }
 }