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)); } }
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"); } }
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(); } } }
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"); } }
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"); } }
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)); } }
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"); } }
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"); } }
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);