public ActionResult Create(RestorantPrice rstp)
        {
            string cookie = Request.Cookies["cookie"].Value.ToString();
            User   userrm = _context.Users.Include("Group").FirstOrDefault(u => u.token == cookie);

            ViewBag.User = userrm;
            if (ModelState.IsValid)
            {
                ViewBag.Menu = _context.Menus.OrderByDescending(r => r.Name).ToList();
                rstp.Status  = true;
                _context.RestorantPrices.Add(rstp);
                _context.SaveChanges();
                return(RedirectToAction("index"));
            }
            return(View(rstp));
        }
        public ActionResult Edit(RestorantPrice rstp)
        {
            string cookie = Request.Cookies["cookie"].Value.ToString();
            User   userrm = _context.Users.Include("Group").FirstOrDefault(u => u.token == cookie);

            ViewBag.User = userrm;
            if (ModelState.IsValid)
            {
                _context.Entry(rstp).State = System.Data.Entity.EntityState.Modified;
                rstp.Status = true;
                _context.SaveChanges();
                return(RedirectToAction("index"));
            }
            ViewBag.Room = _context.Rooms.OrderByDescending(r => r.Number).ToList();
            ViewBag.Menu = _context.Menus.OrderByDescending(r => r.Name).ToList();
            return(View(rstp));
        }
        public ActionResult Delete(int id)
        {
            string cookie = Request.Cookies["cookie"].Value.ToString();
            User   userrm = _context.Users.Include("Group").FirstOrDefault(u => u.token == cookie);

            if (userrm.Group.Name == "Reseption")

            {
                return(HttpNotFound());
            }
            RestorantPrice rstp = _context.RestorantPrices.Find(id);

            if (rstp == null)
            {
                return(HttpNotFound());
            }

            _context.RestorantPrices.Remove(rstp);
            _context.SaveChanges();
            return(RedirectToAction("index"));
        }
        public ActionResult Edit(int Id)
        {
            string cookie = Request.Cookies["cookie"].Value.ToString();
            User   userrm = _context.Users.Include("Group").FirstOrDefault(u => u.token == cookie);

            if (userrm.Group.Name == "Reseption")

            {
                return(RedirectToAction("index", "free"));
            }
            ViewBag.User = userrm;
            RestorantPrice rstp = _context.RestorantPrices.Find(Id);

            if (rstp == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Room = _context.Rooms.OrderByDescending(r => r.Number).ToList();
            ViewBag.Menu = _context.Menus.OrderByDescending(r => r.Name).ToList();

            return(View(rstp));
        }