Exemple #1
0
        private void bLogin_Click(object sender, EventArgs e)
        {
            // traitement
            FBoite fb = new FBoite();

            fb.Show();
        }
Exemple #2
0
        private void bLogin_Click(object sender, EventArgs e)
        {
            log_in l = dc.log_in.ToList().SingleOrDefault(lo => lo.email == tEmail.Text);

            if (l != null)
            {
                if (l.mdpss == tPass.Text)
                {
                    db = DateTime.Now;

                    connexion c = new connexion();
                    c.etat         = "Connecté";
                    c.email        = tEmail.Text;
                    c.DebutSession = db;
                    dc.connexion.InsertOnSubmit(c);
                    dc.SubmitChanges();

                    l.derniereCon = db;

                    // hide
                    this.Visible = false;

                    FBoite b = new FBoite(this);
                    b.Show();
                }
                else
                {
                    tPass.LineIdleColor = Color.FromArgb(228, 103, 103);
                    lPass.Visible       = true;
                }
            }
            else
            {
                tEmail.LineIdleColor = Color.FromArgb(228, 103, 103);
                tPass.LineIdleColor  = Color.FromArgb(228, 103, 103);
                lEmail.Visible       = true;
                lPass.Visible        = true;
            }
        }