Exemple #1
0
        private void CreateQuoteButton_Click(object sender, EventArgs e)
        {
            try
            {
                int       depth     = int.Parse(depthBox.Text);
                int       width     = int.Parse(widthBox.Text);
                int       drawers   = int.Parse(drawersBox.Text);
                int       rushDays  = int.Parse(rushOrderBox.Text);
                string    material  = surfaceMaterialBox.Text;
                string    firstName = firstNameBox.Text;
                string    lastName  = lastNameBox.Text;
                Desk      newDesk   = new Desk(depth, width, drawers, material);
                DeskQuote newQuote  = new DeskQuote(firstName, lastName, newDesk, rushDays);

                DisplayQuote display = new DisplayQuote(newQuote);
                display.Show();
            } catch
            {
                MessageBox.Show("An error occurred. Check inputs and try again.");
            }
        }
Exemple #2
0
 public DisplayQuote(DeskQuote quote)
 {
     InitializeComponent();
     this.quote = quote;
     buildQuote();
 }