Ejemplo n.º 1
0
        private void textBox5_TextChanged(object sender, EventArgs e)
        {
            DatabaseIslem di       = new DatabaseIslem();
            string        sorguara = $"select *from Urunler where Adi like '%{textBox5.Text}%'";
            DataTable     dt       = Sorgu.SQLSorguCalistir(sorguara);

            dataGridView1.DataSource = di.UrunListe(dt);
        }
Ejemplo n.º 2
0
        private void button3_Click(object sender, EventArgs e)
        {
            DatabaseIslem di          = new DatabaseIslem();
            string        stoksorgusu = $"select * from Urunler where Stok=0";
            DataTable     dt          = Sorgu.SQLSorguCalistir(stoksorgusu);

            dataGridView1.DataSource = di.UrunListe(dt);
            textBox3.BackColor       = Color.Black;
            textBox2.BackColor       = Color.White;
            textBox1.BackColor       = Color.White;
        }
Ejemplo n.º 3
0
        private void button2_Click(object sender, EventArgs e)
        {
            DatabaseIslem di        = new DatabaseIslem();
            string        sorgustok = $"select * from Urunler";
            DataTable     dt        = Sorgu.SQLSorguCalistir(sorgustok);

            dataGridView1.DataSource = di.UrunListe(dt);
            dataGridView1.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
            dataGridView1.Columns[2].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
            dataGridView1.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
            dataGridView1.Columns[3].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
            dataGridView1.Columns[0].DefaultCellStyle.BackColor = Color.Black;
            dataGridView1.Columns[2].DefaultCellStyle.BackColor = Color.Black;
            dataGridView1.Columns[0].DefaultCellStyle.ForeColor = Color.White;
            dataGridView1.Columns[2].DefaultCellStyle.ForeColor = Color.White;
            dataGridView1.RowsDefaultCellStyle.Font             = new Font("Comic Sans", 12, FontStyle.Bold);
            dataGridView1.DefaultCellStyle.SelectionBackColor   = Color.Red;
            dataGridView1.DefaultCellStyle.SelectionForeColor   = Color.White;
        }