private void BtnBack_Click(object sender, EventArgs e) { this.Close(); dashboard dashboard = new dashboard(_enteredUser); dashboard.Show(); }
private void BtnEnter_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(txtUsername.Text) || string.IsNullOrEmpty(txtPassword.Text)) // Checking EMPTIES { MessageBox.Show("Boş xanaları doldurun!!!"); return; } User user = _userService.FindUsername(txtUsername.Text, MD5Hash(txtPassword.Text)); if (user == null || user.IsPassiv == true) // CHEKING USER is PASSIV or NOT { MessageBox.Show("İstifadəçi adı və ya Şifrə yalnışdır!!!"); return; } dashboard dashboard = new dashboard(user); dashboard.Text = user.FullName; dashboard.Show(); this.Hide(); }