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")); }
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")); }
public int GetNumEvents() { return(SqliteDataAccess.LoadEvent().Count()); }