示例#1
0
        private void btnCetak_Click(object sender, EventArgs e)
        {
            if (param_cetak != "")
            {
                if (cboJENIS.SelectedIndex == 0)
                {
                    Laporan.Kwitansi_perpanjangan cr = new Laporan.Kwitansi_perpanjangan();
                    cr.RecordSelectionFormula = "{Perpanjangan.NoUrut} ='" + param_cetak + "'";

                    Laporan.CETAK frm = new Laporan.CETAK();
                    frm.crystalReportViewer1.ReportSource  = cr;
                    frm.crystalReportViewer1.ToolPanelView = CrystalDecisions.Windows.Forms.ToolPanelViewType.None;
                    frm.crystalReportViewer1.RefreshReport();
                    frm.Show();
                }
                if (cboJENIS.SelectedIndex == 1)
                {
                    Laporan.Kwitansi_pembayaran cr = new Laporan.Kwitansi_pembayaran();
                    cr.RecordSelectionFormula = "{PEMBAYARAN_D.ID_PEMBAYARAN} ='" + param_cetak + "'";

                    Laporan.CETAK frm = new Laporan.CETAK();
                    frm.crystalReportViewer1.ReportSource  = cr;
                    frm.crystalReportViewer1.ToolPanelView = CrystalDecisions.Windows.Forms.ToolPanelViewType.None;
                    frm.crystalReportViewer1.RefreshReport();
                    frm.Show();
                }
            }
        }
示例#2
0
 private void button5_Click(object sender, EventArgs e)
 {
     if (TRANS.Text != "")
     {
         string q = "SELECT COUNT(*) FROM PEMBAYARAN_H WHERE ID_PEMINJAMAN =@PARAM0";
         global.val = new ArrayList();
         global.val.Add(TRANS.Text);
         global.query(q, global.val, true);
         if (global.rdr.Read())
         {
             if (Convert.ToByte(global.rdr[0]) > 0)
             {
                 Laporan.Lap_Pembayaran_C cr = new Laporan.Lap_Pembayaran_C();
                 cr.RecordSelectionFormula = "{Peminjaman.ID_TRANS} ='" + TRANS.Text + "'";
                 Laporan.CETAK frm = new Laporan.CETAK();
                 frm.crystalReportViewer1.ReportSource  = cr;
                 frm.crystalReportViewer1.ToolPanelView = CrystalDecisions.Windows.Forms.ToolPanelViewType.None;
                 frm.crystalReportViewer1.RefreshReport();
                 frm.Show();
             }
             else
             {
                 MessageBox.Show("Customer dengan nomor transaksi " + TRANS.Text + "\n Belum pernah melakukan pembayaran");
             }
         }
         global.rdr.Close();
     }
 }
        private void CETAK_Click(object sender, EventArgs e)
        {
            if (global.lap_name == "C")
            {
                Laporan.Lap_Nasabah cr = new Laporan.Lap_Nasabah();
                cr.RecordSelectionFormula = "{Peminjaman.TGL_PINJAM} >=#" + dtpTGL1.Value.ToString("MM/dd/yyy") + "# and {Peminjaman.TGL_PINJAM} <=#" + dtpTGL2.Value.ToString("MM/dd/yyy") + "#";

                cr.DataDefinition.FormulaFields["tgl"].Text = "'Dari tanggal " + dtpTGL1.Value.ToString("dd-MMM-yyyy") + " Sampai tanggal " + dtpTGL2.Value.ToString("dd-MMM-yyyy") + "'";
                Laporan.CETAK frm = new Laporan.CETAK();
                frm.crystalReportViewer1.ReportSource  = cr;
                frm.crystalReportViewer1.ToolPanelView = CrystalDecisions.Windows.Forms.ToolPanelViewType.None;
                frm.crystalReportViewer1.RefreshReport();
                frm.Show();
            }
            else if (global.lap_name == "P")
            {
                Laporan.Lap_Pembayaran_P cr = new Laporan.Lap_Pembayaran_P();
                cr.RecordSelectionFormula = "{PEMBAYARAN_D.TGL_PEMBAYARAN} >=#" + dtpTGL1.Value.ToString("MM/dd/yyy") + "# and {PEMBAYARAN_D.TGL_PEMBAYARAN} <=#" + dtpTGL2.Value.ToString("MM/dd/yyy") + "#";

                cr.DataDefinition.FormulaFields["tgl"].Text = "'Dari tanggal " + dtpTGL1.Value.ToString("dd-MMM-yyyy") + " Sampai tanggal " + dtpTGL2.Value.ToString("dd-MMM-yyyy") + "'";
                Laporan.CETAK frm = new Laporan.CETAK();
                frm.crystalReportViewer1.ReportSource  = cr;
                frm.crystalReportViewer1.ToolPanelView = CrystalDecisions.Windows.Forms.ToolPanelViewType.None;
                frm.crystalReportViewer1.RefreshReport();
                frm.Show();
            }
            else if (global.lap_name == "PM")
            {
                Laporan.Lap_Peminjaman cr = new Laporan.Lap_Peminjaman();
                cr.RecordSelectionFormula = "{Peminjaman.TGL_PINJAM} >=#" + dtpTGL1.Value.ToString("MM/dd/yyy") + "# and {Peminjaman.TGL_PINJAM} <=#" + dtpTGL2.Value.ToString("MM/dd/yyy") + "#";

                cr.DataDefinition.FormulaFields["tgl"].Text = "'Dari tanggal " + dtpTGL1.Value.ToString("dd-MMM-yyyy") + " Sampai tanggal " + dtpTGL2.Value.ToString("dd-MMM-yyyy") + "'";
                Laporan.CETAK frm = new Laporan.CETAK();
                frm.crystalReportViewer1.ReportSource  = cr;
                frm.crystalReportViewer1.ToolPanelView = CrystalDecisions.Windows.Forms.ToolPanelViewType.None;
                frm.crystalReportViewer1.RefreshReport();
                frm.Show();
            }
            else if (global.lap_name == "PP")
            {
                Laporan.Lap_Perpanjangan cr = new Laporan.Lap_Perpanjangan();
                cr.RecordSelectionFormula = "{Perpanjangan.JatuhTempoBaru} >=#" + dtpTGL1.Value.ToString("MM/dd/yyy") + "# and {Perpanjangan.JatuhTempoBaru} <=#" + dtpTGL2.Value.ToString("MM/dd/yyy") + "#";

                cr.DataDefinition.FormulaFields["tgl"].Text = "'Dari tanggal " + dtpTGL1.Value.ToString("dd-MMM-yyyy") + " Sampai tanggal " + dtpTGL2.Value.ToString("dd-MMM-yyyy") + "'";
                Laporan.CETAK frm = new Laporan.CETAK();
                frm.crystalReportViewer1.ReportSource  = cr;
                frm.crystalReportViewer1.ToolPanelView = CrystalDecisions.Windows.Forms.ToolPanelViewType.None;
                frm.crystalReportViewer1.RefreshReport();
                frm.Show();
            }
        }
        private void Simpan_data(object sender, EventArgs e)
        {
            validasi_txt();
            if (validasi == true)
            {
                validasi = false;
                if (save == true)
                {
                    save_pembayaran();
                    UPDATE_STATUS();
                    if (cetak == true)
                    {
                        if (MessageBox.Show("Cetak bukti Pembayaran", "PRINT", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
                        {
                            if (tipe == 1)
                            {
                                Laporan.Kwitansi_pembayaran cr = new Laporan.Kwitansi_pembayaran();
                                cr.RecordSelectionFormula = "{PEMBAYARAN_D.ID_PEMBAYARAN} ='" + sn + "'";

                                Laporan.CETAK frm = new Laporan.CETAK();
                                frm.crystalReportViewer1.ReportSource  = cr;
                                frm.crystalReportViewer1.ToolPanelView = CrystalDecisions.Windows.Forms.ToolPanelViewType.None;
                                frm.crystalReportViewer1.RefreshReport();
                                frm.Show();
                            }
                            else
                            {
                                Laporan.kWITANSI_PEMBAYARAN_TRANS cr = new Laporan.kWITANSI_PEMBAYARAN_TRANS();
                                cr.RecordSelectionFormula = "{PEMBAYARAN_D.ID_PEMBAYARAN} ='" + sn + "'";

                                Laporan.CETAK frm = new Laporan.CETAK();
                                frm.crystalReportViewer1.ReportSource  = cr;
                                frm.crystalReportViewer1.ToolPanelView = CrystalDecisions.Windows.Forms.ToolPanelViewType.None;
                                frm.crystalReportViewer1.RefreshReport();
                                frm.Show();
                            }
                        }
                    }
                }
            }
            else
            {
                MessageBox.Show("Data harus dilengkapis");
            }
        }
示例#5
0
        private void btnSimpan_Click(object sender, EventArgs e)
        {
            if (cboTRANS.SelectedIndex != -1 && cboHARI.SelectedIndex != -1 && txtALASAN.Text != "" && save != false)
            {
                proses();
                if (cetak == true)
                {
                    if (MessageBox.Show("Cetak bukti Perpanjangan", "PRINT", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
                    {
                        Laporan.Kwitansi_perpanjangan cr = new Laporan.Kwitansi_perpanjangan();
                        cr.RecordSelectionFormula = "{Perpanjangan.NoUrut} ='" + serial_number + "'";

                        Laporan.CETAK frm = new Laporan.CETAK();
                        frm.crystalReportViewer1.ReportSource  = cr;
                        frm.crystalReportViewer1.ToolPanelView = CrystalDecisions.Windows.Forms.ToolPanelViewType.None;
                        frm.crystalReportViewer1.RefreshReport();
                        frm.Show();
                    }
                }
            }
        }