private void button1_Click(object sender, EventArgs e)
        {
            string email  = textBox1.Text;
            string parola = textBox2.Text;

            UserModel user = LoghingDB.Autentificare(email);

            if (user != null)
            {
                if (user.Parola == parola)
                {
                    (Tag as MainForm).Visible = true;
                    (Tag as MainForm).EsteAunteficat();
                    MessageBox.Show("Sunteti autentificat!");
                    this.Close();
                }
                else
                {
                    MessageBox.Show("Eroare de autentificare!");
                }
            }
            else
            {
                MessageBox.Show("Eroare de autentificare!");
            }

            textBox2.Text = textBox1.Text = "";
        }
 private void button2_Click(object sender, EventArgs e)
 {
     if (textBox1.Text == textBox2.Text)
     {
         LoghingDB.SalvareParolaNoua(textBox1.Text, User.Email);
         MessageBox.Show("Parola a fost modificata!");
         (Tag as MainForm).Visible = true;
         this.Close();
     }
     else
     {
         MessageBox.Show("Confirmare parola nu corespunde!");
     }
 }
 private void label4_Click(object sender, EventArgs e)
 {
     if (!String.IsNullOrWhiteSpace(textBox1.Text))
     {
         UserModel user = LoghingDB.Autentificare(textBox1.Text);
         if (user != null)
         {
             var page = new AmUitatParolaForm(user);
             page.Tag = Tag;
             page.Show();
         }
         else
         {
             MessageBox.Show("Introduceti un email valid!");
         }
     }
     else
     {
         MessageBox.Show("Introduceti un email valid!");
     }
 }