public void LockUser(int userId)
        {
            var user = GetUserById(userId);

            user.Active = 0;
            _db.SaveChanges();
        }
Exemplo n.º 2
0
        public ActionResult Create(HotSpotBasic hotspotbasic)
        {
            if (ModelState.IsValid)
            {
                db.HotSpotBasics.Add(hotspotbasic);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(hotspotbasic));
        }
        public ActionResult Create(MustHaveSkusBasic musthaveskusbasic)
        {
            if (ModelState.IsValid)
            {
                db.MustHaveSkusBasics.Add(musthaveskusbasic);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(musthaveskusbasic));
        }
        public ActionResult Create(WaveDisplayBasic wavedisplaybasic)
        {
            if (ModelState.IsValid)
            {
                db.WaveDisplayBasics.Add(wavedisplaybasic);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(wavedisplaybasic));
        }
Exemplo n.º 5
0
        public ActionResult Create(Shop shop)
        {
            if (ModelState.IsValid)
            {
                db.Shops.Add(shop);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(shop));
        }
Exemplo n.º 6
0
        public ActionResult Create(AdditionalSkuBasic additionalskubasic)
        {
            if (ModelState.IsValid)
            {
                db.AdditionalSkuBasics.Add(additionalskubasic);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(additionalskubasic));
        }
Exemplo n.º 7
0
        public ActionResult Create(POPBasic popbasic)
        {
            if (ModelState.IsValid)
            {
                db.POPBasics.Add(popbasic);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(popbasic));
        }
Exemplo n.º 8
0
 public void Save()
 {
     entities.SaveChanges();
 }