/* Passes the current object selection from ledgerclassBindingSource of type ledger_class to the print_form which will use Microsoft's Report Viewer tool * to create a preview of the printable registration */ private void btnPrint_Click(object sender, EventArgs e) { print_class objct = ledgerclassBindingSource.Current as print_class; if (objct != null) { using (print_form form = new print_form(objct)) { form.ShowDialog(); }; } }
public print_form(print_class param) { InitializeComponent(); _param = param; }