Example #1
0
        private void butonInserareAngajat_Click(object sender, EventArgs e)
        {
            Angajati angj = new Angajati();

            angj.Email   = emailBox.Text;
            angj.Parola  = Vam.Encode(parolaBox.Text);
            angj.Nume    = numeBox.Text;
            angj.Prenume = prenumeBox.Text;
            angj.Acces   = comboBoxGradAcces.GetItemText(comboBoxGradAcces.SelectedItem);
            MagazinDAO.insertAngajati(angj);
            emailBox.Text   = "";
            parolaBox.Text  = "";
            numeBox.Text    = "";
            prenumeBox.Text = "";
            angj.Email      = "";
            arataAngajati();
        }
Example #2
0
        private void butonLogin_Click(object sender, EventArgs e)
        {
            Angajati angj = new Angajati();

            angj.Email  = usernameBox.Text;
            angj.Parola = Vam.Encode(parolaLogare.Text);

            MagazinDAO.logare(angj);
            if (Vam.loginAdmin == true || Vam.loginAngajat == true)
            {
                HomeCenter.Instance.PnlContainer.Controls.Clear();
                HomeCenter.Instance.afisareMeniu();
            }


            usernameBox.Text  = "";
            parolaLogare.Text = "";
        }