コード例 #1
0
        // GET: Admin/Feedback
        public ActionResult Index(string searchString, int page = 1, int pageSize = 10)
        {
            var dao   = new FeedbackD();
            var model = dao.ListAllPaging(searchString, page, pageSize);

            ViewBag.SearchString = searchString;
            return(View(model));
        }
コード例 #2
0
        /// <summary>
        /// <c>Post</c> is a method in the <c>GuestController</c>.
        /// It post feedback on the page and add it to the DB.
        /// </summary>
        public ViewResult Post(FeedbackD feedback)
        {
            FeedbackR feedbackR = new FeedbackR();

            feedback.Date = DateTime.Now;
            feedbackR.Create(feedback);
            ViewBag.Feedbacks = feedbackR.GetAll();
            return(View("GuestIndex"));
        }