/* * Prepare your opening times here using the provided HelperServiceRepository class. */ public ActionResult Index() { HelperServiceRepository helperServiceRepository = new HelperServiceRepository(); var model = helperServiceRepository.Get(); return(View(model)); }
} // end of constructor public ActionResult Index() { ViewBag.Message = ""; FileLogger fileLogger = new FileLogger(); var listHSM = oHSR.Get(); if (((List <HelperServiceModel>)listHSM).Count == 0) { ViewBag.Message = "Sorry, they are no Helper Services available."; fileLogger.ErrorLog("Home: No Helper Services"); } else { foreach (var item in listHSM) { OpenClosedStatus(item); // add hours } fileLogger.StateLog("Home: Index"); } return(View(listHSM)); }
/* * Prepare your opening times here using the provided HelperServiceRepository class. */ public ActionResult Index() { try { FileLogger.Log("Loading Marie Curie Service", "Info"); IEnumerable <HelperServiceModel> serviceModelList = helperServiceRepository.Get(); foreach (var item in serviceModelList) { helperServiceRepository.GetOpeningClosedStatus(item); } return(View(serviceModelList)); } catch (Exception ex) { throw ex; } }
/* * Prepare your opening times here using the provided HelperServiceRepository class. */ public ActionResult Index() { try { HelperServiceRepository helperServiceCenter1 = new HelperServiceRepository(); IEnumerable <HelperServiceModel> helperServiceCenterInfoWithOpeningtimes = helperServiceCenter1.Get(); foreach (var helpcenter in helperServiceCenterInfoWithOpeningtimes) { PrepareOpeningTimes(helpcenter); } return(View(helperServiceCenterInfoWithOpeningtimes)); } catch (Exception ex) { Util.Logger("excpetion raised: " + ex.InnerException); return(View("Error")); } finally { Util.Logger("Time of Access: " + DateTime.Now + "IP address: " + GetIpValue()); } }