コード例 #1
0
        public BookingWindow(RestaurantsPlaces place, MainWindow w, RestaurantPage restPage)
        {
            InitializeComponent();

            ParentWindow   = w;
            Place          = place;
            RestaurantPage = restPage;

            prepurchase.Text = (Place.PlacePrice / 2).ToString();
        }
コード例 #2
0
        public BookingControl(RestaurantsPlaces place, MainWindow w, RestaurantPage restPage)
        {
            InitializeComponent();

            ParentWindow    = w;
            RestaurantPlace = place;
            RestaurantPage  = restPage;

            places.Text    = RestaurantPlace.Places.PlaceCapacity.ToString();
            placesAll.Text = RestaurantPlace.PlaceCount.ToString();

            int currentPlaces = RestaurantPlace.CurrentPlaceCount;

            placesCurrent.Text = currentPlaces.ToString();

            if (currentPlaces == 0)
            {
                bookButton.IsEnabled = false;
            }
        }