コード例 #1
0
        public ActionResult Home(int id)
        {
            if (id == 1)
            {
                Session["Choice"] = "Concrete";
            }
            if (id == 2)
            {
                Session["Choice"] = "Block";
            }

            var userId = Convert.ToInt32(Session["UserId"].ToString());

            VisitDetailsModel model = new VisitDetailsModel();

            VisitService visitService = new VisitService();

            model.TodayVisits = visitService.getTodayVisits(userId);

            model.TotalVisits = visitService.getTotalVisits();

            return(View(model));
        }