public FrmInvoice(string idInvoice, DetailExternalModel detailExternalSellinvoiceModel, MetroGrid metroGrid) { InitializeComponent(); WireUpForm(metroGrid); metroLabel3.Text = idInvoice; this.DetailExternalSellinvoiceModel = detailExternalSellinvoiceModel; }
private void previewInvoiceButton_Click(object sender, EventArgs e) { try { DetailExternalModel detailExternalSellinvoiceModel = new DetailExternalModel() { IdClient = int.Parse(txtClient.Text), IdEmployee = int.Parse(txtEmployee.Text), CurrencyType = cmbTypeCoin.SelectedItem.ToString(), }; FrmInvoice frmInvoice = new FrmInvoice(invoiceIdLabel.Text, detailExternalSellinvoiceModel, productsGridView); frmInvoice.Show(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }