private void BtnDegistir_Click(object sender, EventArgs e) { if (txtEskiSifre.Text == user.sifre) { if (txtSifreTekrar.Text == txtYeniSifre.Text) { var newPassword = txtYeniSifre.Text; var t = HelperKullanici.ChangePass(user, newPassword); if (t.Item2) { MessageBox.Show("Sifre basari ile degistirildi."); } else { MessageBox.Show("Sifre degistirilirken bir sorunla karşılaşıldı!"); } } else { MessageBox.Show("Yeni olusturulan sifreler ayni degil!!!"); } } else { MessageBox.Show("Girilen sifre dogru degil!!!"); } }
private void btnGiris_Click(object sender, EventArgs e) { var isim = textBox1.Text; var sifre = textBox2.Text; var t = HelperKullanici.SignIn(isim, sifre); if (t.Item2) { Hide(); MessageBox.Show("Hosgeldiniz"); Form2 form2 = new Form2(t.Item1); form2.Show(); } else { MessageBox.Show("Böyle bir kullanici bulunamadi!"); } }
private void Button1_Click(object sender, EventArgs e) { if (textBox1.Text != "" && textBox2.Text != "") { var result = HelperKullanici.GetKullanici(textBox1.Text, textBox2.Text); HelperForm.Admin = result.KullaniciAd; HelperForm.AdminID = result.KullaniciId; if (result != null) { if (result.Type == 2) { Islem f = new Islem(); f.Show(); f.tabControl1.TabPages.Remove(f.tabPage4); f.tabControl1.TabPages.Remove(f.tabPage5); this.Hide(); } else { Islem f = new Islem(); f.Show(); this.Hide(); } } else { label4.Text = "Giriş Başarısız..."; label4.ForeColor = Color.Red; } label4.Visible = true; } else { label4.Text = "Boş alanları doldurun!"; label4.Visible = true; label4.ForeColor = Color.Red; } }
private void Button12_Click(object sender, EventArgs e) { int userID = HelperForm.AdminID; var u = HelperKullanici.GetKullanici(userID); bool result = false; if (u.KullaniciSifre == textBox17.Text) { if ((textBox16.Text != "" && textBox15.Text != "") && (textBox16.Text == textBox15.Text)) { u.KullaniciSifre = textBox15.Text; result = HelperKullanici.CUD(System.Data.Entity.EntityState.Modified, u); } MessageBox.Show(result == true ? "Şifre güncellendi." : "Şifre güncellenemedi."); label26.Visible = false; } else { label26.ForeColor = Color.Red; label26.Visible = true; label26.Text = "Girdiğiniz şifre yanlış ya da eksik."; } }
private void button1_Click(object sender, EventArgs e) { var isim = textBox1.Text; var sifre = textBox2.Text; var f = HelperKullanici.SignIn(isim, sifre); if (f.Item2) { if (f.Item1.kullaniciTip == false) { this.Hide(); MessageBox.Show("Admin Kullanıcı! Hoşgeldiniz!"); AdminForm a = new AdminForm(); a.Show(); } else { Kullanici kullanici = new Kullanici(); kullanici.adi = f.Item1.adi; kullanici.soyadi = f.Item1.soyadi; kullanici.tckimlikno = f.Item1.tckimlikno; kullanici.kullaniciTip = f.Item1.kullaniciTip; kullanici.telefon = f.Item1.telefon; kullanici.adres = f.Item1.adres; kullanici.cinsiyet = f.Item1.cinsiyet; kullanici.KullaniciID = f.Item1.KullaniciID; kullanici.kullaniciAdi = f.Item1.kullaniciAdi; MessageBox.Show($"Hoşgeldiniz Sayın {f.Item1.adi}"); KullaniciForm k = new KullaniciForm(kullanici); k.Show(); } } else { MessageBox.Show("Böyle bir kullanici bulunamadı!"); } }
private void button1_Click(object sender, EventArgs e) { string str = textBox1.Text; char[] arr = str.ToCharArray(); //if (arr.Contains()) //{ //} List <Kullanici> kullanicilar = HelperKullanici.GetListKullanici(); foreach (var item in kullanicilar) { if (item.kullaniciAdi.ToLower().Contains(textBox1.Text.ToLower())) { if (item.kullaniciAdi == textBox1.Text) { MessageBox.Show("Böyle bir kullanıcı adı bulunmaktadır!"); break; } } } if (textBox1.Text == "" || textBox2.Text == "" || textBox3.Text == "" || textBox4.Text == "" || textBox5.Text == "" || textBox6.Text == "" || textBox7.Text == "") { MessageBox.Show("Boş alan bırakılamaz!"); } else { Kullanici k = new Kullanici(); k.kullaniciTip = true; k.kullaniciAdi = textBox1.Text; k.kullaniciSifre = textBox2.Text; k.adi = textBox3.Text; k.soyadi = textBox4.Text; k.adres = textBox5.Text; k.telefon = textBox6.Text; k.tckimlikno = textBox7.Text; if (comboBox1.SelectedIndex == 0) { k.cinsiyet = false; } else { k.cinsiyet = true; } var f = HelperKullanici.KayitOl(k); if (f.Item2) { MessageBox.Show("Kayıt Başarı İle Gerçekleşti!"); this.Hide(); Form1 f1 = new Form1(); f1.Show(); } else { MessageBox.Show("Lütfen Bilgilerinizi Gözden Geçiriniz!"); } } }