예제 #1
0
        private void Accueil_Load(object sender, EventArgs e)
        {
            compte te = rech();

            if (te != null)
            {
                byte[] i = te.img.ToArray();
                pictureBox2.Image = Image.FromStream(new MemoryStream(i));
            }
        }
예제 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            compte c = rech();

            if (c.qr == textBox1.Text)
            {
                groupBox1.Visible = true;
            }
            else
            {
                MessageBox.Show("Votre reponse est incorrecte");
            }
        }
예제 #3
0
        private void bcon_Click(object sender, EventArgs e)
        {
            if (chemin != "")
            {
                byte[] i = File.ReadAllBytes(chemin);
                compte c = new compte();
                c.nom    = tnom.Text;
                c.prenom = tprenom.Text;
                c.daten  = daten.Value;
                c.email  = temail.Text;
                c.mdps   = tmdp1.Text;
                c.sexe   = csexe.Text;
                c.qs     = cmbqs.Text;
                c.qr     = trep.Text;
                c.img    = i;
                if (reche() != null)
                {
                    MessageBox.Show("Email est deja existe");
                    temail.ForeColor = Color.Red;
                }
                else
                if (tmdp1.ForeColor != Color.Black || temail.ForeColor != Color.Black)
                {
                    MessageBox.Show("données invalide");
                }
                else if (tmdp1.Text != tmdp2.Text)
                {
                    tmdp2.ForeColor = Color.Red;
                    MessageBox.Show("Mot de pass de confirmation  est incorrecte");
                    tmdp2.Clear();
                }
                else if (string.IsNullOrWhiteSpace(tnom.Text) || string.IsNullOrWhiteSpace(tprenom.Text) ||
                         string.IsNullOrWhiteSpace(csexe.Text) || string.IsNullOrWhiteSpace(cmbqs.Text) ||
                         string.IsNullOrWhiteSpace(trep.Text) || string.IsNullOrWhiteSpace(daten.Text) ||
                         chemin == "")
                {
                    MessageBox.Show("Les informations ne sont pas complets");
                }

                else
                {
                    d.compte.InsertOnSubmit(c);
                    d.SubmitChanges();
                    tmdp2.ForeColor  = Color.Black;
                    temail.ForeColor = Color.Black;
                    Sign s = new Sign(this);

                    s.ShowDialog();
                }
            }
        }
예제 #4
0
        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            compte c = rech();

            if (c != null)
            {
                mdpoublie s = new mdpoublie(this);
                s.ShowDialog();
            }
            else
            {
                MessageBox.Show("Ce compte n'existe pas");
            }
        }
예제 #5
0
        private void button1_Click(object sender, EventArgs e)
        {
            compte t = rech();

            if (t != null)
            {
                groupBox1.Visible = true;
                if (tmpd1.Text == t.mdps)
                {
                    t.mdps = tmdp2.Text;
                }
                a.dtc.SubmitChanges();
                MessageBox.Show("Votre MDP est modifier");
            }
        }
예제 #6
0
        private void Profil_Load(object sender, EventArgs e)
        {
            compte t = rech();

            if (t != null)
            {
                byte[]       i = t.img.ToArray();
                MemoryStream m = new MemoryStream(i);
                pictureBox1.Image = Image.FromStream(m);
                lemail.Text       = a.t;
                lnom.Text         = t.nom;
                lprenom.Text      = t.prenom;
                ldn.Text          = t.daten.Value.ToShortDateString();
                //  pictureBox1.Image = Image.FromStream(new MemoryStream(t.img));
            }
        }
예제 #7
0
        private void button3_Click(object sender, EventArgs e)
        {
            compte c = rech();

            if (tmdp.Text == tmdp1.Text)
            {
                c.mdps = tmdp.Text;
                s.d.SubmitChanges();
                MessageBox.Show("Vote MDP est modifier");
            }

            else
            {
                MessageBox.Show("Mot de pass de confirmation  est incorrecte");
            }
        }
예제 #8
0
        private void bcon_Click(object sender, EventArgs e)
        {
            compte a = reche();

            if (a != null && tmdp.Text == a.mdps)
            {
                m = temail.Text;
                // MessageBox.Show("Bienvenue");
                temail.Clear();
                tmdp.Clear();
                Accueil at = new Accueil(m);
                at.ShowDialog();
            }
            else if (a != null && a.mdps != tmdp.Text)
            {
                MessageBox.Show("mot de pass incorrect");
            }
            else
            {
                MessageBox.Show("Ce compte n'existe pas");
            }
        }
예제 #9
0
        private void mdpoublie_Load(object sender, EventArgs e)
        {
            compte c = rech();

            qs.Text = c.qs;
        }
 partial void Deletecompte(compte instance);
 partial void Updatecompte(compte instance);
 partial void Insertcompte(compte instance);