// GET: Callboard public ActionResult Index() { if (!Globals.LOGIN_STATUS) { return(RedirectToAction("Login", "Home")); } else { CallboardHomeVM model = new CallboardHomeVM(); model.CurrentUser = Globals.LOGGED_IN_USER; GetDAL get = new GetDAL(); get.OpenConnection(); model.LstAllCallboards = new List <Callboard>(); foreach (Event e in model.CurrentUser.LstEvents) { List <Callboard> callboards = get.GetCallboardsByEvent(e); model.LstAllCallboards.AddRange(callboards); } if (model.LstAllCallboards != null) { model.LstAllCallboards.Sort(); } model.LstAdminEvents = get.GetAdminEventsByUser(model.CurrentUser.IntUserID); get.CloseConnection(); return(View("CallboardHome", model)); } }