Beispiel #1
0
        public ActionResult deleteRule(lavalampRuleInfo toDel)
        {
            var client = MvcApplication.Kernal.Get<IRuleRepository>();

            client.deleteRule(toDel);
            return View("Index");
        }
Beispiel #2
0
        public ActionResult changeRuleState(lavalampRuleInfo item)
        {
            var client = MvcApplication.Kernal.Get<IRuleRepository>();
            item.state = item.state.Value == ruleState.stopped ? ruleState.running : ruleState.stopped;
            client.saveRule(item);
            ruleOverviewModel overview = new ruleOverviewModel(new List<IRule>());

               return View("Index", overview);
        }