private void btnPrintSelected_Click(object sender, EventArgs e) { RPT.FORM_RPT FRM = new RPT.FORM_RPT(); RPT.Print_SelectedInvoice SELECTEDINVOICE = new RPT.Print_SelectedInvoice(); SELECTEDINVOICE.SetParameterValue("@I_ID", dgvFacture.SelectedRows[0].Cells[0].Value); FRM.crystalReportViewer1.ReportSource = SELECTEDINVOICE; FRM.ShowDialog(); }
private void PrintPurchase_Click(object sender, EventArgs e) { int I = CLASS_INVOICE.SP_MAXIDINVOICE(); RPT.FORM_RPT FRM = new RPT.FORM_RPT(); RPT.Print_SelectedInvoice SELECTEDINVOICE = new RPT.Print_SelectedInvoice(); SELECTEDINVOICE.SetParameterValue("@I_ID", I); FRM.crystalReportViewer1.ReportSource = SELECTEDINVOICE; FRM.ShowDialog(); }