public ViewResult GetChannels() { var service = ServicesFactory.GetChannelsService(); var model = service.GetChannelsModel(); return(View(model)); }
public JsonResult DeleteChannel(int id) { string status = string.Empty; var service = ServicesFactory.GetChannelsService();; if (service.DeleteChannel(id)) { status = "ok"; } else { status = "fail"; } return(Json(new { status = status })); }
public JsonResult AddChannel(string channel) { string status = "ok"; int id = 0; try { var service = ServicesFactory.GetChannelsService(); id = service.AddChannel(channel); } catch (Exception exception) { status = "false"; } return(Json(new { id = id, status = status })); }