Пример #1
0
        /// <summary>
        /// This method brings up the confirmation page, and sends the rental
        /// number through to its constructor.
        /// </summary>
        private void DisplayRentalConfirmationPage()
        {
            ConfirmationPage c = new ConfirmationPage(_rentalToPayFor)
            {
                MdiParent       = MdiParent,
                ClientSize      = new Size(),
                FormBorderStyle = FormBorderStyle.None,
                Dock            = DockStyle.Fill
            };

            WindowState = FormWindowState.Normal;
            c.Show();
        }
Пример #2
0
        /// <summary>
        /// Once the purchase button is pressed, the information is stored in
        /// the purchase table, and the user is notified of their purchase order
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buyButton_Click(object sender, System.EventArgs e)
        {
            _purchaseToPayFor.Location     = _vehicleToPayFor.CurrentLocation;
            _purchaseToPayFor.PurchaseDate = _purchaseToPayFor.PurchaseDate.Date;
            PurchaseControl.AddPurchase(_purchaseToPayFor);
            ConfirmationPage c = new ConfirmationPage(_purchaseToPayFor)
            {
                MdiParent       = MdiParent,
                ClientSize      = new Size(),
                FormBorderStyle = FormBorderStyle.None,
                Dock            = DockStyle.Fill
            };

            WindowState = FormWindowState.Normal;
            c.Show();
        }