示例#1
0
        public void DisplayRentedBike()
        {
            App._bikebookingdatastorage = StorageClass.ReadXML <List <ManageBooking> >("BikeBookingManager.xml");
            if (App._bikebookingdatastorage == null)
            {
                App._bikebookingdatastorage = new List <ManageBooking>();
            }

            datgridBikeRented.ItemsSource = App._bikebookingdatastorage;
        }
示例#2
0
        public void DisplayRentedBike()
        {
            if (_curretnselections == null)
            {
                _curretnselections = new List <CurrentOrder>();
            }
            datgridBikeOrder.ItemsSource = _curretnselections;

            App._bikebookingdatastorage = StorageClass.ReadXML <List <ManageBooking> >("BikeBookingManager.xml");
            if (App._bikebookingdatastorage == null)
            {
                App._bikebookingdatastorage = new List <ManageBooking>();
            }
            txtboxTotalAmount.Text = (from bik in App._bikebookingdatastorage where bik.CustomerId == CustomerId select bik.TotalAmount).LastOrDefault().ToString();
            //datgridBikeOrder.ItemsSource = App._bikebookingdatastorage;
        }
示例#3
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            _bikedatastorage = StorageClass.ReadXML <List <ManageBike> >("BikeManager.xml");
            if (_bikedatastorage == null)
            {
                _bikedatastorage = new List <ManageBike>();
            }

            _bikebookingdatastorage = StorageClass.ReadXML <List <ManageBooking> >("BikeBookingManager.xml");
            if (_bikebookingdatastorage == null)
            {
                _bikebookingdatastorage = new List <ManageBooking>();
            }

            _biketypesdatastorage = StorageClass.ReadXML <List <ManageBikeTypes> >("BikeTypeManager.xml");
            if (_biketypesdatastorage == null)
            {
                _biketypesdatastorage = new List <ManageBikeTypes>();
            }
        }
示例#4
0
        public void DisplayAvailableBike()
        {
            App._bikedatastorage = StorageClass.ReadXML <List <ManageBike> >("BikeManager.xml");
            if (App._bikedatastorage == null)
            {
                App._bikedatastorage = new List <ManageBike>();
            }

            datgridBikeRented.ItemsSource = App._bikebookingdatastorage;

            int availableBike = (from bike in App._bikedatastorage
                                 select bike.AvailableBike).FirstOrDefault();
            string availableBiketoDisplay = "Available Bike " + Convert.ToString(availableBike);

            availableBikes.Content = availableBiketoDisplay;

            int rentedBike = (from bike in App._bikedatastorage
                              select bike.RentedBike).FirstOrDefault();
            string rentedBiketoDisplay = "Rented Bike " + Convert.ToString(rentedBike);

            rentedBikes.Content = rentedBiketoDisplay;
        }