public ActionResult ChannelMethod(int id, string action, string channelTV) { IList <string> list; IDictionary <int, Applience> applienceDictionary = (SortedDictionary <int, Applience>)Session["Apps"]; IChannel app = applienceDictionary[id] as IChannel; switch (action) { case "DeleteChannel": app.DeleteCurrentCh(); break; case "AddChannel": app.AddChannel(channelTV); break; case "Prev": app.PrevChannel(); break; case "Next": app.NextChannel(); break; case "show": list = app.ShowChannels(); TempData["List"] = list; break; } return(RedirectToAction("Index")); }
public JsonResult CreateChannel(string channelName, int sectorId) { if (_channelSvc.AddChannel(channelName, sectorId) == true) { return(Json("Success", JsonRequestBehavior.AllowGet)); } return(Json("Failure", JsonRequestBehavior.AllowGet)); }