public ActionResult CheckOut(Bill model)
        {
            //if (!ModelState.IsValid)
            //{
            //    return View("~/Views/ErrorPage/Oops.cshtml");
            //}
            Bill bill = (Bill)Session["FinalBill"];

            model.Rooms = bill.Rooms;
            if (ModelState.IsValid)
            {
                OrderModel om = new OrderModel();
                string     id = "";
                do
                {
                    Random        rand  = new Random();
                    string        input = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
                    StringBuilder res   = new StringBuilder();
                    for (int i = 0; i < 10; i++)
                    {
                        res.Append(input[rand.Next(input.Length)]);
                    }
                    id = res.ToString();
                } while (om.CheckOrderID(id));
                bill.OrdedrID         = id;
                bill.Date             = DateTime.Now;
                bill.FullName         = model.FullName;
                bill.Phone            = model.Phone;
                bill.IdentityDocument = model.IdentityDocument;
                int check = 1;
                check = om.AddOrder(bill.OrdedrID, bill.FullName, bill.Date, bill.Phone, bill.IdentityDocument);
                if (check <= 0)
                {
                    return(View("AddError"));
                }
                ViewBag.ID = bill.OrdedrID;
                OrderDetailModel odm = new OrderDetailModel();
                foreach (var item in bill.Rooms)
                {
                    check = odm.AddOrderDetail(bill.OrdedrID, item.RoomID, item.FromDate, item.ToDate);
                    if (check <= 0)
                    {
                        return(View("AddError"));
                    }
                }
                return(View("Success"));
            }
            return(View("Information", model));
        }