Exemplo n.º 1
0
        private void button4_Click(object sender, EventArgs e)
        {
            this.Hide();
            adminspace f1 = new adminspace();

            f1.Show();
        }
Exemplo n.º 2
0
        private void btnsignadmin_Click(object sender, EventArgs e)
        {
            this.Hide();
            adminspace f1 = new adminspace();

            f1.Show();
            Administrateur ad = new Administrateur();

            ad.prenom     = txtfirstnameadmin.Text;
            ad.nom        = txtlastnameadmin.Text;
            ad.login_A    = int.Parse(txtloginadmin.Text);
            ad.password_A = txtpassadmin.Text;
            ad.photo_A    = "";
            adminspace.DbDataContetxt.Administrateur.InsertOnSubmit(ad);
            adminspace.DbDataContetxt.SubmitChanges();
            MessageBox.Show("Admin has been added");
        }