示例#1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            ManageTaskForm addTaskForm = new ManageTaskForm();

            addTaskForm.ShowDialog();
            PrepareTasksData();
        }
示例#2
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     try
     {
         var            id             = (int)dgvTasks.CurrentRow.Cells[0].Value;
         ManageTaskForm manageTaskForm = new ManageTaskForm(db.GetTaskModel(id));
         manageTaskForm.ShowDialog();
         PrepareTasksData();
     }
     catch (Exception err)
     {
         MessageBox.Show($"Błąd podczas edycji.\n" +
                         $"{err.Message}", "Błąd");
     }
 }