public ActionResult Index(UserFeedback userFeedback) { if(ModelState.IsValid) { _feedbackManager.SubmitFeedback(userFeedback); return RedirectToAction("Thanks"); } return View(userFeedback); }
public void SubmitFeedback(UserFeedback userFeedback) { _loggingService.LogInformation(string.Format("Inserting feedback from {0}",userFeedback.Name)); Feedback feedback = new Feedback { Name = userFeedback.Name, InterpretationComments = userFeedback.InterpretationComments, WasItClear = userFeedback.WasItClear, NotClearComments = userFeedback.NotClearComments, PricingModelComments = userFeedback.PricingModelComments, AgreesWithPricingModels = userFeedback.AgreesWithPricingModels, WantsToSeeReservedGifts = userFeedback.WantsToSeeReservedGifts, SeeReservedGiftsComments = userFeedback.SeeReservedGiftsComments, FinalComments = userFeedback.FinalComments, CreateDate = DateTime.Now, CreatedBy = _currentUser.AccountId, LastUpdatedBy = _currentUser.AccountId, LastUpdatedDate = DateTime.Now, }; _feedbackRepository.InsertFeeback(feedback); }