private void OnTaskEdit(object sender, EventArgs e)
        {
            var task = GetSelectedTask();

            if (task == null)
            {
                return;
            }

            var child = new AddTaskForm
            {
                ToDoTask = task
            };

            do
            {
                if (child.ShowDialog(this) != DialogResult.OK)
                {
                    return;
                }

                // Save the movie
                var error = _toDo.Update(task.Id, child.ToDoTask);
                if (String.IsNullOrEmpty(error))
                {
                    UpdateUI(_done);
                    return;
                }
                ;

                DisplayError(error);
            } while (true);
        }
        private void OnAddTask(object sender, EventArgs e)
        {
            var task = new AddTaskForm();

            do
            {
                if (task.ShowDialog(this) != DialogResult.OK)
                {
                    return;
                }

                var toDo = _toDo.Add(task.ToDoTask);
                UpdateUI(_done);
                return;
            }while (true);
        }