Exemplo n.º 1
0
 private void Formcd_Load(object sender, EventArgs e)
 {
     ds   = new DataSet();
     conn = new connection();
     try
     {
         string query = "Select * from cd where 1=1";
         da = new MySqlDataAdapter(query, conn.myconnection());
         da.Fill(ds, "cd");
         dataGridView1.DataSource = ds.Tables["cd"];
         dataGridView1.Refresh();
     }
     catch (Exception ex)
     {
     }
 }
Exemplo n.º 2
0
 private void Formbuku_Load(object sender, EventArgs e)
 {
     ds   = new DataSet();
     conn = new connection();
     try
     {
         string query = "Select * from buku where 1=1";
         da = new MySqlDataAdapter(query, conn.myconnection());
         da.Fill(ds, "buku");
         dataGridView1.DataSource = ds.Tables["buku"];
         dataGridView1.Refresh();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message.ToString());
     }
 }
Exemplo n.º 3
0
        private void formpengembalian_Load(object sender, EventArgs e)
        {
            conn = new connection();
            ds   = new DataSet();
            da   = new MySqlDataAdapter();

            try
            {
                string query = "SELECT m.nama_mhs ,b.judul,( CASE WHEN p.STATUS = 1 THEN 'sedang pinjam' ELSE 'sudah dikembalikan' END ) AS 'status peminjaman',p.tgl_peminjaman FROM peminjaman p JOIN buku b ON b.kode = p.kode_buku LEFT JOIN mahasiswa m ON m.nrp = p.kode_peminjam WHERE 1 = 1 and p.status=1";
                da = new MySqlDataAdapter(query, conn.myconnection());
                da.Fill(ds, "peminjaman");
                dataGridView1.DataSource = ds.Tables["peminjaman"];
                dataGridView1.Refresh();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
        }
Exemplo n.º 4
0
        private void btnsearch_Click(object sender, EventArgs e)
        {
            ds   = new DataSet();
            conn = new connection();
            string query = "Select * from cd where 1=1";

            try
            {
                query += " and judul='" + tbpencarian.Text + "'";
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
            da = new MySqlDataAdapter(query, conn.myconnection());
            //ds.Tables["buku"].Clear();
            da.Fill(ds, "cd");
            dataGridView1.DataSource = ds.Tables["cd"];
            dataGridView1.Refresh();
        }
Exemplo n.º 5
0
 private void databuku_Load(object sender, EventArgs e)
 {
     conn = new connection();
     ds   = new DataSet();
     loadbuku();
 }
Exemplo n.º 6
0
 private void databukuta_Load(object sender, EventArgs e)
 {
     conn = new connection();
     loadbukuta();
 }
Exemplo n.º 7
0
 private void peminjamanTA_Load(object sender, EventArgs e)
 {
     connection conn = new connection();
 }
Exemplo n.º 8
0
 private void login_Load(object sender, EventArgs e)
 {
     conn = new connection();
 }
Exemplo n.º 9
0
        private void datacd_Load(object sender, EventArgs e)
        {
            conn = new connection();

            loadcd();
        }
Exemplo n.º 10
0
 private void formhistory_Load(object sender, EventArgs e)
 {
     conn = new connection();
 }