Пример #1
0
        private void button4_Click(object sender, EventArgs e)
        {
            string    przelew1 = "UPDATE Konto SET SALDO = Saldo - " + textBox7.Text + " WHERE Numer_Konta = '" + textBox5.Text + "';";
            bazaClass baza     = new bazaClass();

            baza.Insert(przelew1);
            string przelew2 = "UPDATE Konto SET SALDO = Saldo + " + textBox7.Text + " WHERE Numer_Konta = '" + textBox6.Text + "';";

            baza.Insert(przelew2);
            baza.Konto(dataGridView3, textBox5.Text);
            textBox6.Text  = "";
            textBox7.Text  = "";
            panel1.Enabled = false;
        }
Пример #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            bazaClass baza     = new bazaClass();
            string    upKlient = "UPDATE Klient SET id_Klienta ='" + numer + "', Pesel = '" + textBox1.Text + "' , Imie = '" + textBox3.Text + "', Nazwisko = '" + textBox2.Text + "' WHERE id_Klienta= '" + numer + "';";

            baza.Insert(upKlient);
            baza.wyswietl_tabele_klientow(dataGridView1);
        }
Пример #3
0
        private void button13_Click(object sender, EventArgs e)
        {
            bazaClass baza    = new bazaClass();
            String    KontoIn = "INSERT INTO Karta VALUES('','" + numer2 + "','2020-01-01');";

            baza.Insert(KontoIn);
            baza.wyswietl_tabele_klientow(dataGridView1);
        }
Пример #4
0
        private void button12_Click(object sender, EventArgs e)
        {
            string    uKlient = "DELETE FROM Klient WHERE id_Klienta = '" + numer + "';";
            bazaClass baza    = new bazaClass();

            baza.Insert(uKlient);
            baza.wyswietl_tabele_klientow(dataGridView1);
        }
Пример #5
0
        private void button7_Click(object sender, EventArgs e)
        {
            string    przelew1 = "UPDATE Konto SET SALDO = Saldo + " + textBox12.Text + " WHERE Numer_Konta = '" + numer3 + "';";
            bazaClass baza     = new bazaClass();

            baza.Insert(przelew1);
            textBox12.Text = "";
            baza.Karta(dataGridView4, textBox8.Text);
        }
Пример #6
0
        private void button9_Click(object sender, EventArgs e)
        {
            string transakcja = "INSERT INTO Transakcja SET id_transakcji = '', id_karty = '" + textBox14.Text + "' , Kwota = '" + textBox15.Text + "' , Data = '2015-06-25' , Opis = '" + textBox16.Text + "';";

            bazaClass baza = new bazaClass();

            baza.Insert(transakcja);
            textBox15.Text = "";
            textBox16.Text = "";
        }
Пример #7
0
        private void button1_Click(object sender, EventArgs e)
        {
            int test = (String.Compare(textBox3.Text, ""));

            test = test + (String.Compare(textBox2.Text, ""));
            test = test + (String.Compare(textBox1.Text, ""));
            if (test != 0)
            {
                string    KlientIn = "INSERT INTO Klient Values('','";
                bazaClass baza     = new bazaClass();
                KlientIn = KlientIn + textBox1.Text + "','" + textBox2.Text + "','" + textBox3.Text + "');";

                baza.Insert(KlientIn);
                baza.wyswietl_tabele_klientow(dataGridView1);
            }
            textBox1.Text = "";
            textBox2.Text = "";
            textBox3.Text = "";
        }