Ejemplo n.º 1
0
 private void btnEditSelectedTask_Click(object sender, EventArgs e)
 {
     DBIntegrationTask tmp = (DBIntegrationTask)lbTasks.SelectedItem;
     FormDBIntegrationTask form = new FormDBIntegrationTask(tmp);
     if (form.ShowDialog() == DialogResult.OK)
     {
         integData.Tasks[integData.Tasks.IndexOf(tmp)] = form.Task;
         showCategories(form.Task.Category);
         save();
     }
 }
Ejemplo n.º 2
0
        private void btnAddNewTask_Click(object sender, EventArgs e)
        {
            DBIntegrationTask tmp = new DBIntegrationTask();
            tmp.Name = "New Task";
            tmp.Code = "Code...";

            FormDBIntegrationTask form = new FormDBIntegrationTask(tmp);
            if (form.ShowDialog() == DialogResult.OK)
            {
                integData.Tasks.Add(form.Task);
                showCategories(form.Task.Category);
                save();
            }
        }