Пример #1
0
        private bool email_valid_si_existent()
        {
            if (VTB.Email_In_Format_Corespunzator(textBox1) == false)
            {
                MessageBox.Show("Email in format necorespunzator!");
                textBox1.Clear();
                textBox1.BackColor = Color.PaleGoldenrod;
                return(false);
            }

            else if (VTB.NuContineCaractereSpeciale(textBox1) == false)
            {
                MessageBox.Show("Nu este permisa utilizarea caracterelor speciale!");
                textBox1.Clear();
                textBox1.BackColor = Color.PaleGoldenrod;
                return(false);
            }

            else if (!VTB.Exista_In_DB(textBox1))
            {
                DialogResult YesOrNo = MessageBox.Show("Email-ul introdus nu corespunde niciunui utilizator. Doriti sa va creati un cont nout?", "Eroare autentificare", MessageBoxButtons.YesNo);

                switch (YesOrNo)
                {
                case DialogResult.Yes:
                    this.Close();
                    FormCreareCont FCC = new FormCreareCont();
                    FCC.ShowDialog();
                    break;

                default:
                    textBox1.Clear();
                    textBox1.BackColor = Color.PaleGoldenrod;
                    break;
                }
                return(false);
            }

            return(true);
        }
Пример #2
0
        private void Button3_Click(object sender, EventArgs e)
        {
            FormCreareCont FCC = new FormCreareCont();

            FCC.ShowDialog();
        }