示例#1
0
        public ActionResult AddTask(AddTaskViewModel model, int id)
        {
            var task = new Task()
            {
                Team         = _db.GetTeam(id),
                Name         = model.Name,
                ExpectedTime = model.ExpectedTime,
                Time         = 0,
                Status       = TaskStatus.waiting
            };

            _db.AddTask(task);
            return(RedirectToAction("TeamDetails", new { id = id }));
        }