Esempio n. 1
0
        // accept a renturn
        public void AcceptReturns(object sender, RoutedEventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(RentalId.Text))
            {
                int         id          = Convert.ToInt16(RentalId.Text);
                RentalOrder rentalOrder = rentalOrderService.Get(id);

                if (rentalOrder != null)
                {
                    Window window = new RentalOderDetailsView(rentalOrder);
                    window.Title = "Details of rental order: " + rentalOrder.Id;
                    window.ShowDialog();
                }
                else
                {
                    string mesg = "Rental id: " + id + " is invalid!";
                    MessageBox.Show(mesg);
                }
            }
            else
            {
                Window window = new RentalOrdersView();
                window.ShowDialog();
            }
        }
Esempio n. 2
0
        // shows rental orders page
        public void ShowRentalOrders(object sender, RoutedEventArgs e)
        {
            Window window = new RentalOrdersView();

            window.ShowDialog();
        }