// GET: /Quizzes/Create
        public virtual ActionResult Create(int? projectId)
        {
            if (projectId == null)
            {
                return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
            }

            var quizEdit = new QuizEdit();
            quizEdit.ProjectId = projectId.Value;

            return this.CreateEditView(quizEdit);
        }
 public virtual ActionResult Edit(QuizEdit model)
 {
     return Handle(
         model, QuizService.Save,
         () => RedirectToAction(MVC.Quizzes.View(model.QuizId)),
         () => model.QuizId == 0 ?
             RedirectToAction(MVC.Quizzes.Create(model.ProjectId)) :
             RedirectToAction(MVC.Quizzes.Edit(model.QuizId)));
 }
 private ActionResult CreateEditView(QuizEdit model)
 {
     ViewBag.Project = ProjectService.GetByIdEx(model.ProjectId, new ProjectInclude().Customer());
     return View(model);
 }