private void LoginClick(object sender, EventArgs e) { LoginView kullanici = new LoginView(); kullanici.kullaniciAdi = txtKullaniciAdi.Text; kullanici.Sifre = txtSifre.Text; if (txtSifre.Text.Length < 8) { MetroFramework.MetroMessageBox.Show(this, "Şifre 8 karakterden uzun olmalıdır.", "Şifre Hatası", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else if (txtKullaniciAdi.Text.Length < 4) { MetroFramework.MetroMessageBox.Show(this, "Kullanıcı adı 4 karakterden uzun olmalıdır.", "Kullanıcı Adı Hatası", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else if (EmptyOrNullChecker.Instance.NotNullableControls(this)) { MetroFramework.MetroMessageBox.Show(this, "Kullanıcı adı veya şifre boş.", "", MessageBoxButtons.OK, MessageBoxIcon.Information); } else if (PersonelController.Instance.GirisYap(kullanici)) { MainScreen main = new MainScreen(); this.Hide(); main.Show(); } else { MetroFramework.MetroMessageBox.Show(this, "Kullanıcı adı veya şifreniz yanlış!", "Böyle Bir Kullanıcı Yok", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void LoginClick(object sender, EventArgs e) { LoginView kullanici = new LoginView(); kullanici.kullaniciAdi = txtKullaniciAdi.Text; kullanici.Sifre = txtSifre.Text; if (txtSifre.Text.Length < 8) { MetroFramework.MetroMessageBox.Show(this, "Şifre 8 karakterden uzun olmalıdır.", "Şifre Hatası", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else if (stokController.GirisYap(kullanici)) { MainScreen main = new MainScreen(); this.Hide(); main.Show(); } else { MetroFramework.MetroMessageBox.Show(this, "KullanıcıAdı veya Şifreniz yanlış!", "Böyle Bir Kullanıcı Yok", MessageBoxButtons.OK, MessageBoxIcon.Error); } }