Ejemplo n.º 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     baglan();
     using (OleDbCommand cmd = new OleDbCommand("select * from kullaniciveri where ad = @adi and sifre = @sifre", blnt))
     {
         cmd.Parameters.Add("@adi", OleDbType.VarChar).Value   = textBox1.Text;
         cmd.Parameters.Add("@sifre", OleDbType.VarChar).Value = textBox2.Text;
         OleDbDataReader dr = cmd.ExecuteReader();
         if (dr.Read())
         {
             ANASAYFA rsm = new ANASAYFA();
             rsm.Show();
             this.Hide();
             rsm.label3.Text = textBox1.Text;
             rsm.pictureBox1.ImageLocation = "kullaniciresimleri/" + textBox1.Text + ".jpg";
         }
         else
         {
             MessageBox.Show("Kullanıcı girişi başarısız bilgilerinizi kontrol ediniz."); textBox2.Clear();
             if (textBox1.Text == null)
             {
                 textBox1.Focus();
             }
             else
             {
                 textBox1.Focus();
             }
         }
     }
 }
Ejemplo n.º 2
0
        private void pictureBox2_Click(object sender, EventArgs e)
        {
            ANASAYFA frm = new ANASAYFA();

            frm.Show();
            frm.label3.Text = label2.Text;
            frm.pictureBox1.ImageLocation = "kullaniciresimleri/" + label2.Text + ".jpg";
            this.Hide();
        }
Ejemplo n.º 3
0
        private void pictureBox2_Click(object sender, EventArgs e)
        {
            DialogResult drg = MessageBox.Show("Anasayfaya dönmek istediğinize eminmisiniz?", "ÇIKIŞ", MessageBoxButtons.YesNo);

            if (drg == DialogResult.Yes)
            {
                ANASAYFA frm = new ANASAYFA();
                frm.Show();
                frm.label3.Text = label2.Text;
                frm.pictureBox1.ImageLocation = "kullaniciresimleri/" + label2.Text + ".jpg";
                this.Hide();
            }
        }