コード例 #1
0
        public ActionResult GetEventList()
        {
            StringBuilder eventListHtml = new StringBuilder("<table id=\"pplTbl\"><tr><th>Name</th><th>Date</th><th>Gender</th></tr>");

            eventObjList = SqliteDataAccess.LoadEvent();

            foreach (var e in eventObjList)
            {
                eventListHtml.Append("<tr><td>");
                eventListHtml.Append(e.eventID);
                eventListHtml.Append("</td><td>");
                eventListHtml.Append(e.startdate);
                eventListHtml.Append("</td><td>");
                eventListHtml.Append(e.gender);
                eventListHtml.Append("</td></tr>");
            }

            eventListHtml.Append("</table>");


            ViewBag.events = eventListHtml;

            return(RedirectToAction("Scoring", "Home"));
        }
コード例 #2
0
        public ActionResult GetEvent()
        {
            StringBuilder eventListHtml = new StringBuilder("<table id=\"pplTbl\"><tr><th>Name</th><th>Date</th><th>Gender</th></tr>");

            eventObj = SqliteDataAccess.LoadEvent();

            foreach (var e in eventObj)
            {
                eventListHtml.Append("<tr><td>");
                eventListHtml.Append(e.eventID);
                eventListHtml.Append("</td><td>");
                eventListHtml.Append(e.startdate);
                eventListHtml.Append("</td><td>");
                eventListHtml.Append(e.gender);
                eventListHtml.Append("</td></tr>");
            }

            eventListHtml.Append("</table>");


            ViewBag.events = eventListHtml;

            return(View("~/Views/Home/Application.cshtml"));
        }
コード例 #3
0
 public int GetNumEvents()
 {
     return(SqliteDataAccess.LoadEvent().Count());
 }