Пример #1
0
 public frmBrowse(string tabel)
 {
     InitializeComponent();
     this.tabel = tabel;
     if (tabel == "barang")
     {
         dgvBrowse.DataSource = Barang.FindAll();
     }
     else if (tabel == "customer")
     {
         dgvBrowse.DataSource = Customer.FindAll();
     }
     else if (tabel == "supplier")
     {
         dgvBrowse.DataSource = Supplier.FindAll();
     }
     else if (tabel == "penjualan")
     {
         dgvBrowse.DataSource = Penjualan.FindAll();
     }
     else if (tabel == "pembelian")
     {
         dgvBrowse.DataSource = Pembelian.FindAll();
     }
     dgvBrowse.Refresh();
     data = new Dictionary <string, string> {
     };
     dt   = (DataTable)dgvBrowse.DataSource;
 }
        private void frmLihatTransaksi_Shown(object sender, EventArgs e)
        {
            mtcDaftarTransaksi.SelectTab(0);
            dgvPembelian.DataSource = Pembelian.FindAll();
            dgvPembelian.Refresh();
            dgvPembelianDetail.DataSource = PembelianDetail.FindAll();
            dgvPembelianDetail.Refresh();
            dgvPenjualan.DataSource = Penjualan.FindAll();
            dgvPenjualan.Refresh();
            dgvPenjualanDetail.DataSource = PenjualanDetail.FindAll();
            dgvPenjualanDetail.Refresh();

            dtPembelian       = (DataTable)dgvPembelian.DataSource;
            dtPembelianDetail = (DataTable)dgvPembelianDetail.DataSource;
            dtPenjualan       = (DataTable)dgvPenjualan.DataSource;
            dtPenjualanDetail = (DataTable)dgvPenjualanDetail.DataSource;
        }