Ejemplo n.º 1
0
 public ActionResult CreateTask(AnalyzeTaskView task)
 {
     if (ModelState.IsValid)
     {
         ToDoCreateTask toDoCreateTask = new ToDoCreateTask();
         toDoCreateTask.Record(Request, ref task);
         return(RedirectToAction("ToDo"));
     }
     else
     {
         PriorityItems priorityItems     = new PriorityItems();
         CategoryItems categoryItems     = new CategoryItems();
         SelectList    listPriorityItems = new SelectList(priorityItems.Priorities(), "Id", "Name");
         SelectList    listCategoryItems = new SelectList(categoryItems.Categories(), "Id", "Name");
         return(View(new AccountTask
         {
             Name = task.Name,
             Objective = task.Objective,
             EndDate = task.EndDate,
             StartDate = task.StartDate,
             selectCategoryItems = listCategoryItems,
             selectPriorityItems = listPriorityItems
         }));
     }
 }
Ejemplo n.º 2
0
        public ActionResult TaskPriority()
        {
            PriorityItems priorityItems = new PriorityItems();
            SelectList    listItems     = new SelectList(priorityItems.Priorities(), "Id", "Name");

            return(PartialView("_TasksPriority", new AccountTask {
                selectPriorityItems = listItems
            }));
        }