private void button1_Click(object sender, EventArgs e) { if (RB_EDII.Checked == true) { if (RB_SSP.Checked == true) { string query = $"Select * From SSP Where TanggalBayar between '{dateFrom.Value}' and '{dateTo.Value}'"; DataTable da = GetData(query); for (int q = 0; q < da.Rows.Count; q++) { var pdfnew = new SSP(); pdfnew.pdfBPNSSP(da.Rows[q]); pdfnew.pdfSSP(da.Rows[q]); } } else { string query = $"Select * From SSCP Where StartContract between '{dateFrom.Value}' and '{dateTo.Value}'"; DataTable da = GetData(query); for (int q = 0; q < da.Rows.Count; q++) { var pdfnew = new SSCP(); pdfnew.pdfBPN(da.Rows[q]); pdfnew.pdfSSCP(da.Rows[q]); } } } else { } }
private void btnPrintSSP_Click(object sender, EventArgs e) { string query = "Select * From SSP Where Id = 1"; DataTable da = GetData(query); for (int q = 0; q < da.Rows.Count; q++) { var pdfnew = new SSP(); pdfnew.pdfSSP(da.Rows[q]); } }