public virtual IActionResult List() { ShopHoursModel model = new ShopHoursModel(); model.ListOfHours = _hoursOfOperationService.GetShophoursList(); model.ShopHoursObjects = _hoursOfOperationService.GetAllShopHours(); return(View(model)); }
public virtual IActionResult List(ShopHoursModel shm) { if (ModelState.IsValid) { foreach (var item in shm.ShopHoursObjects) { _hoursOfOperationService.UpdateShopHours(item); } } shm.ListOfHours = _hoursOfOperationService.GetShophoursList(); return(View(shm)); }