public ActionResult TimeSlotsForAccount(Guid accountGuid) { List <TimeSlot> models = new List <TimeSlot>(); models = new TimeSlotManager().GetTimeSlotsByAccount(accountGuid); return(View(models)); }
public ActionResult TimeSlots() { List <TimeSlot> models = new List <TimeSlot>(); models = new TimeSlotManager().GetTimeSlots(); return(View(models)); }
public ActionResult Create(TimeSlot model) { if (ModelState.IsValid) { model = new TimeSlotManager().Create(model); if (model.TimeSlotGuid != Guid.Empty) { return(RedirectToAction("Read", new { timeSlotGuid = model.TimeSlotGuid, accountGuid = model.AccountGuid })); } } return(View(model)); }
public void SetUp() { _timeSlotObserver = new FakeTimeSlotObserver(); _timeProvider = new FakeTimeProvider(); _timer = new FakeTimer(); var timeSlotStore = new Mock <ITimeSlotStore>(); _timeSlots = new List <PowerTimeSlot>(); timeSlotStore.Setup(x => x.GetTimeSlots()).Returns(_timeSlots); _timeSlotManager = new TimeSlotManager(_timeSlotObserver, _timer, _timeProvider, timeSlotStore.Object); }
public static void Startup(StartupHandlerBase startupHandler) { _startupHandler = startupHandler; _startupHandler.Startup(); var proxy = new RenderManager(_startupHandler.CreateRenderEngine(), new DefaultLayoutBuilder()); RenderEngine = proxy; PluginHandler = new PluginManager(RenderEngine, new DefaultLayoutBuilder()); TimeSlotManager = new TimeSlotManager(RenderEngine, new WordclockTimer(1000 * 60), new TimeProvider(), new TimeSlotStoreDecorator(new XMLTimeSlotStore())); PluginHandler.ChangeActivePlugin <Clock>(); }
public ActionResult Read(Guid timeSlotGuid, Guid accountGuid) { TimeSlot model = new TimeSlotManager().Read(timeSlotGuid, accountGuid); return(View(model)); }