Esempio n. 1
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();
     }
 }
Esempio n. 2
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();
                }
            }
        }
Esempio n. 3
0
        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");
            }
        }
        private void btnCETAK_Click(object sender, EventArgs e)
        {
            if (param == "")
            {
                MessageBox.Show("Pilih data yang ingin di cetak ...");
            }
            else
            {
                Laporan.kontrak cr = new Laporan.kontrak();
                cr.RecordSelectionFormula = "{Peminjaman.ID_TRANS}='" + param + "'";

                Laporan.CETAK frm = new Laporan.CETAK();
                frm.crystalReportViewer1.ReportSource  = cr;
                frm.crystalReportViewer1.ToolPanelView = CrystalDecisions.Windows.Forms.ToolPanelViewType.None;
                frm.crystalReportViewer1.RefreshReport();
                frm.ShowDialog();
            }
        }
Esempio n. 6
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();
                    }
                }
            }
        }
        private void btnCETAK_Click(object sender, EventArgs e)
        {
            if (lengkap() == true && txtKTP.MaskCompleted)
            {
                if (bntPerbarui.Enabled == false)
                {
                    if (cetak == true)
                    {
                        if (cboBARANG.SelectedIndex == 0)
                        {
                            kode_gudang = global.serial_number("PC");
                        }
                        else
                        {
                            kode_gudang = global.serial_number("HP");
                        }
                        no_barang     = global.no;
                        kode_pinjaman = global.serial_number("TRANS");
                        no_trans      = global.no;
                    }
                    proses_peminjaman();
                }
                else
                {
                    bntPerbarui_Click(null, null);
                }
                if (cetak == true)
                {
                    if (MessageBox.Show("Silahkan cetak kontrak peminjaman ... ", "Cetak", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
                    {
                        Laporan.kontrak cr = new Laporan.kontrak();
                        if (bntPerbarui.Enabled == false)
                        {
                            cr.RecordSelectionFormula = "{Peminjaman.ID_TRANS}='" + kode_pinjaman + "'";
                        }
                        else
                        {
                            cr.RecordSelectionFormula = "{Peminjaman.ID_TRANS}='" + txtNO_TRANS.Text + "'";
                        }

                        Laporan.CETAK frm = new Laporan.CETAK();
                        frm.crystalReportViewer1.ReportSource  = cr;
                        frm.crystalReportViewer1.ToolPanelView = CrystalDecisions.Windows.Forms.ToolPanelViewType.None;
                        frm.crystalReportViewer1.RefreshReport();
                        frm.ShowDialog();
                    }
                }
            }
            else
            {
                if (msg != "")
                {
                    MessageBox.Show(msg);
                    msg = "";
                }
                else
                {
                    MessageBox.Show("Data harus lengkap");
                }
            }
        }