public SingleQuote createSingleQuote() { SingleQuote quote = new SingleQuote(estiamteID); quotes.Add(quote); return(quote); }
private void quoteButton_Click(object sender, EventArgs e) { try { Company company = new Company(); company.name = companyNameInput.Text; //initialize job Job job = company.createNewJob(); job.description = description.Text; job.name = jobName.Text; job.memo = memo.Text; job.jobDate = jobDatePicker.Value; foreach (string count in bookCountList.Items) { SingleQuote quote = job.createSingleQuote(); quote.bookCount = Convert.ToDouble(count); quote.sig4Count = Convert.ToDouble(sig4Count.Text); quote.sig8Count = Convert.ToDouble(sig8Count.Text); quote.sig12Count = Convert.ToDouble(sig12Count.Text); quote.sig16Count = Convert.ToDouble(sig16Count.Text); quote.calculate_Costs(); } //databind table to the list of quotes quoteTable.Visible = true; quoteTable.AutoGenerateColumns = false; quoteTable.DataSource = job.quotes; } catch (Exception err) { System.Windows.Forms.MessageBox.Show(err.Message, "Error"); } }
public void addSingleQuote(SingleQuote quote) { quotes.Add(quote); }