public ActionResult EditAktivCardpack(int id)
        {
            CardPack dbCardPack = ShopManager.GetCardPackById(id);

            CardPackViewModel viewCardPack = new CardPackViewModel();

            viewCardPack.IDCardPack   = dbCardPack.ID;
            viewCardPack.PacketName   = dbCardPack.PackName;
            viewCardPack.Anzahlkarten = dbCardPack.NumCards;
            viewCardPack.Preis        = dbCardPack.PackPrice;
            viewCardPack.Aktiv        = (bool)dbCardPack.Aktiv;

            return(View(viewCardPack));
        }
        public ActionResult DatenPflege()
        {
            List <CardPack> dbCardpacks = ShopManager.getAllCardPacks();

            CardPackViewModel        viewCardPack;
            List <CardPackViewModel> listeCardPackViewModel = new List <CardPackViewModel>();

            foreach (CardPack dbCardPack in dbCardpacks)
            {
                viewCardPack = new CardPackViewModel();

                viewCardPack.PacketName   = dbCardPack.PackName;
                viewCardPack.Anzahlkarten = dbCardPack.NumCards;
                viewCardPack.Preis        = dbCardPack.PackPrice;
                viewCardPack.Aktiv        = (bool)dbCardPack.Aktiv;
                viewCardPack.IDCardPack   = dbCardPack.ID;

                listeCardPackViewModel.Add(viewCardPack);
            }

            return(View(listeCardPackViewModel));
        }
        public ActionResult EditAktivCardpack(CardPackViewModel viewCardPack)
        {
            ShopManager.UpdateCardPackAktiv(viewCardPack.IDCardPack, viewCardPack.Aktiv);

            return(RedirectToAction("Datenpflege"));
        }