Exemple #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            String sql = String.Empty;
            MySqlCommand command = new MySqlCommand();
            command.CommandText = "select parola from ogrenci where numara = " + textBox1.Text;
            command.Connection = bag;
            bag.Open();
            try
            {
                sql = (string)command.ExecuteScalar();

                if (textBox2.Text == sql)
                {
                    Sil2 sil2 = new Sil2();
                    // sil2.label1.Text = textBox1.Text;

                    sil2.ShowDialog();
                }

                else
                {
                    MessageBox.Show("giris basarisiz!!!");
                }

            }
            catch
            {
                MessageBox.Show("giris basarisiz!!!");
            }
        }
Exemple #2
0
 private void button2_Click(object sender, EventArgs e)
 {
     Sil2 sil2 = new Sil2();
     sil2.label1.Text = label6.Text;
     sil2.ShowDialog();
 }