public IActionResult Index(Task task) { ViewBag.Checked = "Toggle button checked"; return(View(task)); }
public IActionResult Create([Bind] Task task) { if (ModelState.IsValid) { objtask.AddTask(task); return(RedirectToAction("Index")); } return(View(task)); }
public IActionResult Edit(int id, [Bind] Task task) { if (id != task.ID) { return(NotFound()); } if (ModelState.IsValid) { objtask.UpdateTask(task); return(RedirectToAction("Index")); } return(View(task)); }
public IActionResult Details(int?id) { if (id == null) { return(NotFound()); } Task task = objtask.GetTaskData(id); if (task == null) { return(NotFound()); } return(View(task)); }