示例#1
0
 private void btnGiris_Click(object sender, EventArgs e)
 {
     if (txtKulAdi.Text == "" || txtSifre.Text == "")
     {
         MessageBox.Show("Lütfen kullanıcı adını veya şifreyi boş bırakmayınız");
     }
     else
     {
         kulKontrol(txtKulAdi.Text, DbProcess.md5Encrypt(txtSifre.Text));
     }
 }
示例#2
0
        public void sifreDegistir()
        {
            SqlCommand com = new SqlCommand("sifreDegistirme", db.dbConnect());

            com.CommandType = CommandType.StoredProcedure;
            com.Parameters.Add("@sifre", SqlDbType.Int).Value          = DbProcess.md5Encrypt(textBox1.Text.ToString());
            com.Parameters.Add("@kulAdi", SqlDbType.VarChar, 50).Value = comboBox1.Text.ToString();

            if (comboBox1.Text == "")
            {
                MessageBox.Show("Lütfen Şifresini Değiştirmek İstediğiniz Kullanıcı Adını Seçiniz !!!");
            }
            else
            {
                db.dbConnect();
                dr = com.ExecuteReader();

                MessageBox.Show("Şifre Değiştirme İşlemi Başarılı !!!");
            }
        }
示例#3
0
        private void button1_Click(object sender, EventArgs e)
        {
            int asciId = -1;

            SqlDataAdapter da = new SqlDataAdapter("select sifre from kullanicilar where sifre ='" + DbProcess.md5Encrypt(textBox2.Text.Trim()) + "' and id = '" + asciId + "'", db.dbConnect());
            DataTable      dt = new DataTable();

            da.Fill(dt);

            if (dt.Rows.Count.ToString() == "1")
            {
                if (textBox3.Text == textBox4.Text)
                {
                    db.dbConnect();
                    SqlCommand cm = new SqlCommand("Update kullanicilar set sifre = '" + DbProcess.md5Encrypt(textBox4.Text.Trim()) + "' where id = '" + asciId + "'", db.dbConnect());
                    cm.ExecuteNonQuery();

                    db.dbClose();
                    MessageBox.Show("Şifre Güncellendi !");
                }
                else
                {
                    MessageBox.Show("Yeni Şifre İle Yeni Şifre Tekrar Aynı Olmalı !");
                }
            }
            else
            {
                MessageBox.Show("Lütfen Eski Şifrenizi Kontrol Ediniz !");
            }
        }