Beispiel #1
0
        public ActionResult ViewUnfinishedTasks()//toma las tareas incompletas de la base de datos, las guarda en una lista de objetos tipo TaskModel y muestra la lista en la vista
        {
            ViewBag.Message = "Completed Tasks List";

            var data = TaskProcessor.LoadUnfinishedTask();
            List <TaskModel> tasks = new List <TaskModel>();

            foreach (var row in data)
            {
                tasks.Add(new TaskModel
                {
                    TaskName      = row.TaskName,
                    TaskCompleted = row.TaskCompleted
                });
            }

            return(View(tasks));
        }