Beispiel #1
0
 public void SaveLaundery(LaunderyRoom launderyRoom)
 {
     db.Entry(launderyRoom).State = EntityState.Modified;
     db.SaveChanges();
 }
        public ActionResult EditLaundery(LaunderyRoom launderyRoom)
        {
            if (IsAdmin() != true)
            {
                return RedirectToAction("Index", "Dashboard");
            }

            try
            {
                if (ModelState.IsValid)
                {
                    _ldryService.SaveLaundery(launderyRoom);
                    return RedirectToAction("LaunderyList");
                }

                return RedirectToAction("LaunderyList");
            }
            catch
            {
                return View();
            }
        }
Beispiel #3
0
 public void CreateLaundery(LaunderyRoom launderyRoom)
 {
     db.LaunderyRoom.Add(launderyRoom);
     db.SaveChanges();
 }