public ActionResult OneDistributionGroup(string id)
 {
     Data.AndroidDistributionGroup model = AndroidDistributionGroup.CreateManager().Load(int.Parse(id));
     if (model == null)
     {
         return(this.Content("AndroidDistributionGroup is null"));
     }
     return(View("~/Views/Live/OneDistributionGroup.cshtml", model));
 }
        public ActionResult AllDistribution(string id)
        {
            LiveDistributionModel model = new LiveDistributionModel();

            Data.AndroidDistributionGroup   adg         = Data.AndroidDistributionGroup.CreateManager().Load(int.Parse(id));
            List <Data.AndroidDistribution> androidDist = Data.AndroidDistribution.CreateManager().Load(adg);

            model.AndroidDistributions = androidDist;
            model.AndroidGroup         = adg;
            return(View(model));
        }
        public ActionResult ApiDeleteDistributionGroup(string id)
        {
            Data.AndroidDistributionGroup   distributionGroup = AndroidDistributionGroup.CreateManager().Load(int.Parse(id));
            List <Data.AndroidDistribution> distributions     = Data.AndroidDistribution.CreateManager().Load(distributionGroup);

            foreach (Data.AndroidDistribution dist in distributions)
            {
                dist.Delete();
            }

            distributionGroup.Delete();
            return(RedirectToAction("DistributionGroup", "Live"));
        }