Esempio n. 1
0
        public bool login(string user, string pass)
        {
            Angajat result = AngajatDBRepository.findOne(user, pass);

            if (result == null)
            {
                return(false);
            }
            return(true);
        }
Esempio n. 2
0
        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!");
            }
        }