Ejemplo n.º 1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            frmTaskDetails frm = new frmTaskDetails(new Task("", 0, 0, "", 0), true);

            Utils.ShowForm(this, frm, dgvTasks, () =>
            {
                tasks               = Task.Select();
                dataSource          = new AggregatedPropertyBindingList <Task>(tasks);
                dgvTasks.DataSource = dataSource;
            });
        }
Ejemplo n.º 2
0
 private void dgvTasks_SelectionChanged(object sender, EventArgs e)
 {
     if (dgvTasks.SelectedRows.Count == 1)
     {
         Task           selectedTask = (Task)dgvTasks.SelectedRows[0].DataBoundItem;
         frmTaskDetails frm          = new frmTaskDetails((Task)dgvTasks.SelectedRows[0].DataBoundItem);
         Utils.ShowForm(this, frm, dgvTasks, () =>
         {
             tasks               = Task.Select();
             dataSource          = new AggregatedPropertyBindingList <Task>(tasks);
             dgvTasks.DataSource = dataSource;
         });
     }
 }
Ejemplo n.º 3
0
 private void searchTasks(string searchterm)
 {
     tasks = Task.Select(t => t.FK_ClientId == searchterm);
     dgvTasks.DataSource = new AggregatedPropertyBindingList <Task>(tasks);
 }