public void DeleteQuestionGroup(QuestionGroup questionGroup) { QuestionGroupRepository.Delete(questionGroup); SaveQuestionGroup(); }
public void CreateQuestionGroup(QuestionGroup questionGroup) { QuestionGroupRepository.Add(questionGroup); SaveQuestionGroup(); }
public void UpdateQuestionGroup(QuestionGroup questionGroup) { QuestionGroupRepository.Update(questionGroup); SaveQuestionGroup(); }
public ActionResult Create(CreateViewModel createViewModel) { if (!ModelState.IsValid) { return View(createViewModel); } var questionGroup = new QuestionGroup() { Name = createViewModel.Name, Description = createViewModel.Description, Priority = !String.IsNullOrEmpty(createViewModel.Priority) ? Int32.Parse(createViewModel.Priority) : 0, FeedbackType = FeedbackTypeService.GetFeedbackTypes().Where(ft => ft.Name.ToLower() == "cruise").FirstOrDefault() }; QuestionGroupService.CreateQuestionGroup(questionGroup); TempData["QuestionGroupId"] = questionGroup.QuestionGroupId; TempData["QuestionGroupName"] = questionGroup.Name; TempData["Message"] = QuestionGroupsMessage.CreateSuccess; return Redirect(Url.Content("~/feedback/cruise/questiongroups/index")); }