public void AddTaskToComplete(string description) { if (this.TaskToCompleteList != null) { TaskToCompleteViewModel taskToComplete = new TaskToCompleteViewModel(description); TaskToCompleteList.Add(taskToComplete); } }
public void AddTaskToComplete() { if (this.TaskToCompleteList != null && !string.IsNullOrWhiteSpace(this.newTaskDescription)) { TaskToCompleteViewModel taskToComplete = new TaskToCompleteViewModel(this.newTaskDescription); TaskToCompleteList.Add(taskToComplete); this.NewTaskDescription = Constants.DefaultTaskDescription; } }