Esempio n. 1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            ManageTaskForm addTaskForm = new ManageTaskForm();

            addTaskForm.ShowDialog();
            PrepareTasksData();
        }
Esempio n. 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");
     }
 }