Пример #1
0
        public IActionResult Index(Task task)
        {
            ViewBag.Checked = "Toggle button checked";


            return(View(task));
        }
Пример #2
0
 public IActionResult Create([Bind] Task task)
 {
     if (ModelState.IsValid)
     {
         objtask.AddTask(task);
         return(RedirectToAction("Index"));
     }
     return(View(task));
 }
Пример #3
0
 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));
 }
Пример #4
0
        public IActionResult Details(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }
            Task task = objtask.GetTaskData(id);

            if (task == null)
            {
                return(NotFound());
            }
            return(View(task));
        }