public ServiceAll(AngajatDbRepository angajatDbRepository, CursaDbRepository cursaDbRepository, InscriereDbRepository inscriereDbRepository, ParticipantDbRepository participantDbRepository) { AngajatDbRepository = angajatDbRepository; CursaDbRepository = cursaDbRepository; InscriereDbRepository = inscriereDbRepository; ParticipantDbRepository = participantDbRepository; }
private void loginButton_Click(object sender, EventArgs e) { string username = UserTextBox.Text; Console.WriteLine(username); string password = PassTextBox.Text; Console.WriteLine(password); AngajatDbRepository angajatDbRepository = new AngajatDbRepository(); if (angajatDbRepository.findOne(username, password) != null) { MainForm mainForm = new MainForm(); mainForm.Text = username; mainForm.Show(); } else { MessageBox.Show("Username sau parola incorecta!"); } }
public ServiceLogin(AngajatDbRepository angajatDBRepository) { AngajatDBRepository = angajatDBRepository; }