public IActionResult NewItem(ToDoItem item) { ToDoItemsManager mgr = new ToDoItemsManager(_connectionString); mgr.AddToDoItem(item); return(Redirect("/home/index")); }
public IActionResult MarkAsCompleted(int id) { ToDoItemsManager mgr = new ToDoItemsManager(_connectionString); mgr.MarkAsCompleted(id); return(Redirect("/home/index")); }
public IActionResult UpdateCategory(Category category) { ToDoItemsManager mgr = new ToDoItemsManager(_connectionString); mgr.UpdateCategory(category); return(Redirect("/home/categories")); }
public IActionResult SaveNewCategory(string name) { ToDoItemsManager mgr = new ToDoItemsManager(_connectionString); mgr.AddCategory(name); return(Redirect("/home/categories")); }
public IActionResult EditCategory(int id) { ToDoItemsManager mgr = new ToDoItemsManager(_connectionString); Category category = mgr.GetCategory(id); return(View(category)); }
public ActionResult SaveNewItem(ToDoItem item) { ToDoItemsManager mgr = new ToDoItemsManager(Properties.Settings.Default.ConStr); mgr.AddToDoItem(item); return(Redirect("/home/index")); }
public ActionResult MarkAsCompleted(int id) { ToDoItemsManager mgr = new ToDoItemsManager(Properties.Settings.Default.ConStr); mgr.MarkAsCompleted(id); return(Redirect("/home/index")); }
public ActionResult UpdateCategory(Category category) { ToDoItemsManager mgr = new ToDoItemsManager(Properties.Settings.Default.ConStr); mgr.UpdateCategory(category); return(Redirect("/home/categories")); }
public ActionResult EditCategory(int id) { ToDoItemsManager mgr = new ToDoItemsManager(Properties.Settings.Default.ConStr); Category category = mgr.GetCategory(id); return(View(category)); }
public ActionResult SaveNewCategory(string name) { ToDoItemsManager mgr = new ToDoItemsManager(Properties.Settings.Default.ConStr); mgr.AddCategory(name); return(Redirect("/home/categories")); }
public IActionResult ByCategory(int id) { ToDoItemsManager mgr = new ToDoItemsManager(_connectionString); List <ToDoItem> items = mgr.GetByCategory(id); return(View(items)); }
public IActionResult Completed() { ToDoItemsManager mgr = new ToDoItemsManager(_connectionString); List <ToDoItem> items = mgr.GetCompleted(); return(View(items)); }
public ActionResult ByCategory(int id) { ToDoItemsManager mgr = new ToDoItemsManager(Properties.Settings.Default.ConStr); IEnumerable <ToDoItem> items = mgr.GetByCategory(id); return(View(items)); }
public ActionResult Completed() { ToDoItemsManager mgr = new ToDoItemsManager(Properties.Settings.Default.ConStr); IEnumerable <ToDoItem> items = mgr.GetCompleted(); return(View(items)); }
public IActionResult NewItem() { ToDoItemsManager mgr = new ToDoItemsManager(_connectionString); return(View(mgr.GetCategories())); }
public ActionResult NewItem() { ToDoItemsManager mgr = new ToDoItemsManager(Properties.Settings.Default.ConStr); return(View(mgr.GetCategories())); }