/// <summary> /// The CreateTaskButton_Click /// </summary> /// <param name="sender">The sender<see cref="object"/></param> /// <param name="e">The e<see cref="EventArgs"/></param> private void CreateTaskButton_Click(object sender, EventArgs e) { AddTaskDialog taskInformation = new AddTaskDialog(); DialogResult result = taskInformation.ShowDialog(); if (result == DialogResult.OK) { AllTasks.CreateTask(taskInformation.Title, taskInformation.Description, taskInformation.DueDate, taskInformation.Done); RefreshTaskView(); } }
public void CreateTask() { TaskList listOfTasks = new TaskList(); Assert.IsTrue(listOfTasks.CreateTask("Title", "Some text ddfjdfjdfjdfjdjfdfj", DateTime.UtcNow)); Assert.AreEqual(listOfTasks.GetTaskListLenght(), 1); }
public void ReadTaskData() { TaskList listOfTasks = new TaskList(); Assert.IsTrue(listOfTasks.CreateTask("Title", "Some text ddfjdfjdfjdfjdjfdfj", DateTime.UtcNow)); Assert.AreEqual(listOfTasks.GetTaskData(0).Title, "Title"); }
public ActionResult Create([Bind(Include = "TaskName, DueDate, TaskText, TaskComplete")] TaskList tasklist) { if (ModelState.IsValid) { TaskList.CreateTask(tasklist, User.Identity.Name, db); return(RedirectToAction("GetTaskList")); } return(View(tasklist)); }