public IActionResult Event(mainVM m)
        {
            Facility_Reservation FR = new Facility_Reservation();
            Hospital_Facility    H  = new Hospital_Facility();
            var ID = _asu.Hospital_Facilities.Where(f => f.Type == m.Room_Id).Select(s => s.Id).Single();
            var h  = _asu.Facility_Reservations.Include(p => p.Patient).Where(f => f.Hospital_Facility_Id == ID)
                     .OrderByDescending(s => s.End_Hour).ToList();

            ViewBag.Roomnumber = m.Room_Id;
            ViewBag.D1         = h;



            return(View());
        }
        public IActionResult Stateview(mainVM m)
        {
            var    ID   = _auc.Follow_Ups_Types.Where(f => f.Name == m.Room_Id).Select(s => s.Id).Single();
            String from = HttpContext.Session.GetString("FIRST");
            String to   = HttpContext.Session.GetString("LAST");

            if (from != null && to != null)
            {
                var h = _auc.Payments.Include(o => o.Patient).Include(p => p.Follow_Up_Type)
                        .Where(f => (f.Follow_Up_Type_Id == ID && f.Payed == true))
                        .ToList();
                DateTime       start   = DateTime.Parse(from);
                DateTime       end     = DateTime.Parse(to);
                List <Payment> payment = new List <Payment>();

                var total = 0;
                foreach (var V in h)
                {
                    DateTime date = DateTime.Parse(V.Date);

                    if (date >= start && date <= end)
                    {
                        total = total + V.Money;
                        payment.Add(V);
                    }
                }


                ViewBag.R = m.Room_Id;
                ViewBag.t = total;
                // ViewBag.D = h;
                ViewBag.list = payment;
                return(View());
            }
            else
            {
                return(Redirect("/Manager/Error"));
            }
        }