//variables public DisplayQuote(DeskQuote quote) { InitializeComponent(); Desk desk = quote.getDesk(); labelCustomerName.Text = quote.getCustomerName(); labelDeskWidth.Text = desk.getDeskWidth().ToString(); labelDeskDepth.Text = desk.getDeskDepth().ToString(); labelDrawerNumber.Text = desk.getDrawerNumber().ToString(); labelMaterial.Text = desk.getMaterial().ToString(); labelRushOrder.Text = quote.getRushDays().ToString(); labelAmount.Text = quote.getQuoteAmount().ToString(); labelQuoteDate.Text = quote.getQuoteDate().ToString("d MMMM yyyy"); }
private void btnSubmitOrder_Click(object sender, EventArgs e) { //check all fields are filled out (use try catch?) if (checkForm()) { //create desk and desk quote objects Desk desk = new Desk(deskWidth, deskDepth, drawerNumber, material); quote = new DeskQuote(desk, customerName, rushDays); //send to and open Display Quote Form, close Add Quote Form DisplayQuote displayQuote = new DisplayQuote(quote); displayQuote.Tag = this; displayQuote.Show(this); Hide(); } }