コード例 #1
0
        public ActionResult LeaveFeedback(Int64? id)
        {
            var feedback = new Feedback();
            if (id.HasValue)
            {
                feedback.eventBriteId = id.Value.ToString();
            }

            return View(feedback);
        }
コード例 #2
0
 public ActionResult LeaveFeedback(Feedback feedback)
 {
     if (ModelState.IsValid)
     {
         _service.saveFeedback(feedback);
         return RedirectToAction("Thanks", "Feedback");
     }
     else
     {
         return View(feedback);
     }
 }
コード例 #3
0
        public ActionResult LeaveFeedback(Int64? id)
        {
            var feedback = new Feedback();
            if (id.HasValue)
            {
                feedback.eventBriteId = id.Value.ToString();
                feedback.FeedbackLeft = DateTime.Today;
                feedback.Approved = false;
            }

            return View(feedback);
        }
コード例 #4
0
        public ActionResult LeaveFeedback(Feedback feedback, string eventBriteId)
        {
            feedback.FeedbackLeft = DateTime.Today;
            feedback.Approved = false;
            feedback.eventBriteId = eventBriteId;

            if (ModelState.IsValid)
            {

                _service.saveFeedback(feedback);
                return RedirectToAction("Thanks", "Feedback");
            }
            else
            {
                return View(feedback);
            }
        }
コード例 #5
0
 public void saveFeedback(Feedback feedback)
 {
     _context.Feedback.Add(feedback);
     _context.SaveChanges();
     _context.Dispose();
 }