public IActionResult SubmitFeedback(SubmitFeedbackViewModel submitFeedbackViewModel) { int userId = HttpContext.Session.GetInt32("UserId") ?? 0; submitFeedbackViewModel.userId = userId; using (var unitOfWork = new UnitOfWork(new CuriousDriveContext())) { Feedback feedback = new Feedback(); feedback.FeedbackText = submitFeedbackViewModel.feedback; feedback.CreatedBy = feedback.ModifiedBy = feedback.UserId = userId; unitOfWork.Feedback.Add(feedback); unitOfWork.Complete(); } return(RedirectToAction("SubmitFeedback", "Admin")); }
public SubmitFeedbackPage(PlaySession playsession, RequestCreator requestCreator) : base(requestCreator) { InitializeComponent(); //Sets BindingContext ViewModel SubmitFeedbackViewModel vm = new SubmitFeedbackViewModel(playsession, requestCreator, Navigation); BindingContext = vm; Slider1.Value = 0f; Slider2.Value = 0f; Slider3.Value = 0f; Slider4.Value = 0f; Quest1.Completed += (s, a) => Quest2.Focus(); Quest2.Completed += (s, a) => Quest3.Focus(); Quest3.Completed += (s, a) => Quest4.Focus(); if (playsession is PracticeSession) { Label1.Text = "How ready did you feel to train today?"; Label2.Text = "How was your effort today taking into account how ready you felt?"; Label3.Text = "How were you challenged today in relation to the exercises?"; Label4.Text = "To what extent were you absorbed by the training today?"; Label5.Text = "What helped make the training good today?"; Label6.Text = "Were there any issues with the training today?"; Label7.Text = "What were the main focus points for you today?"; Label8.Text = "How has your day been today?"; } if (playsession is TeamMatch) { Label1.Text = "How ready did you feel play a match today?"; Label2.Text = "How was your effort today taking into account how ready you felt?"; Label3.Text = "How were you challenged today?"; Label4.Text = "To what extent were you absorbed by the match today?"; Label5.Text = "What helped make the match good today?"; Label6.Text = "Were there any issues with the match today?"; Label7.Text = "What were the main focus points for you today?"; Label8.Text = "How has your day been today?"; } }
public IActionResult SubmitFeedback() { SubmitFeedbackViewModel submitFeedbackViewModel = new SubmitFeedbackViewModel();//AdminService().loadVerifiedFeedbacks(); return(View(submitFeedbackViewModel)); }