public NewPaymentForm(receipts_credentialeds rc) { InitializeComponent(); if (rc == null) rc = new receipts_credentialeds(); bdgReceipts.DataSource = rc; }
private void btnReceivePayment_Click(object sender, EventArgs e) { DateTime now = receipts_credentialeds.Now(); credentialed cre = (credentialed)bdgCredentialed.Current; receipts_credentialeds rc = new receipts_credentialeds() { credentialed_id = cre.id, credentialed_name = cre.company_name, date = now, month = now.Month, year = now.Year }; NewPaymentForm npf = new NewPaymentForm(rc); npf.ShowDialog(); }