private void button1_Click(object sender, EventArgs e)
 {
     test = "basıldı";
     //kitaplar tablosunu çek.
     dataGridView1.DataSource = Slave.BringData("SELECT * FROM kitaplar ORDER BY ID ASC");
     kitapları_listele_ayar();
 }
        private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            DataTable dt = Slave.BringData("SELECT KITAP_ADI,BARKOD_NO FROM KITAPLAR WHERE ID=" + dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells[0].Value + "");

            label2.Text = dt.Rows[0]["BARKOD_NO"].ToString();
            label3.Text = dt.Rows[0]["KITAP_ADI"].ToString();
        }
Example #3
0
        void ComboDoldur2()
        {
            string    sql = "SELECT lib_id,lib_name_surname FROM okuyucu_ekle";
            DataTable dt  = Slave.BringData(sql);

            comboBox2.DataSource    = dt;
            comboBox2.DisplayMember = "lib_name_surname";
            comboBox2.ValueMember   = "lib_id";
        }
Example #4
0
        void ComboDoldur()
        {
            string    sql = "SELECT ID,Kitap_Adi FROM kitaplar WHERE Stok > 0";
            DataTable dt  = Slave.BringData(sql);

            comboBox1.DataSource    = dt;
            comboBox1.DisplayMember = "Kitap_Adi";
            comboBox1.ValueMember   = "ID";
        }
Example #5
0
        private void kitap_guncelle_Load(object sender, EventArgs e)
        {
            //Kitap_guncelle ye veri çektik.
            string    sql = "SELECT * FROM kitaplar WHERE ID = " + Form1.secim + "";
            DataTable dt  = Slave.BringData(sql);

            textBox1.Text = dt.Rows[0]["Barkod_No"].ToString();
            textBox2.Text = dt.Rows[0]["Kitap_Adi"].ToString();
            textBox3.Text = dt.Rows[0]["Yazar_Adi"].ToString();
            textBox4.Text = dt.Rows[0]["Yayin_Evi"].ToString();
            textBox5.Text = dt.Rows[0]["Kitap_Turu"].ToString();
            textBox6.Text = dt.Rows[0]["Stok"].ToString();
        }
Example #6
0
        private void button1_Click(object sender, EventArgs e)
        {
            string    query = "SELECT * FROM yetkililer WHERE yet_isim ='" + textBox1.Text.Trim() + "' AND yet_sifre = '" + textBox2.Text.Trim() + "'";
            DataTable dt    = Slave.BringData(query);

            if (dt.Rows.Count == 1)
            {
                kitap_guncelle güncelle = new kitap_guncelle();
                güncelle.Hide();
                güncelle.ShowDialog();
            }
            else
            {
                MessageBox.Show("Bilgilerinizi kontrol edip tekrar deneyiniz !", "Giriş Bilgisi", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void button4_Click(object sender, EventArgs e)
        {
            try
            {
                /* dataGridView1.DataSource = Slave.BringData(@"SELECT lib_name_surname,Kitap_Adi,date FROM okuyucu_ekle,kitaplar,emanet_kitaplar
                 *                                         WHERE lib_id = em_oku_id AND em_kitp_id = ID");*/
                dataGridView1.DataSource = Slave.BringData(@"SELECT lib_name_surname,Kitap_Adi,DATEDIFF(CURRENT_DATE(),e_date) FROM emanet_kitap, okuyucu_ekle,kitaplar
                                                        WHERE lib_id = e_oku_id AND e_kit_id = ID");

                //Sütun ayarları........
                dataGridView1.Columns[0].HeaderText = "Adı Soyadı";
                dataGridView1.Columns[1].HeaderText = "Kitap İsmi";
                dataGridView1.Columns[2].HeaderText = "Geçen Gün Sayısı";

                dataGridView1.Columns[0].Width = 170;
                dataGridView1.Columns[1].Width = 150;
                dataGridView1.Columns[2].Width = 150;
            }
            catch
            {
                MessageBox.Show("Bir Hata Oluştu.", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
 private void button2_Click(object sender, EventArgs e)
 {   // okuyucular tablosunu çek.
     dataGridView1.DataSource = Slave.BringData("SELECT * FROM okuyucu_ekle ORDER BY lib_id ASC");
     okuyucu_listesi_ayar();
 }