Пример #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            this.Hide();
            citizenspace f1 = new citizenspace();

            f1.Show();
        }
        private void btnsign_Click(object sender, EventArgs e)
        {
            this.Hide();
            citizenspace f1 = new citizenspace();

            f1.Show();
            Citoyen c = new Citoyen();

            c.login_C           = int.Parse(txtlog.Text);
            c.password_C        = txtpass.Text;
            c.code              = int.Parse(txtcode.Text);
            c.nom               = txtlastname.Text;
            c.prenom            = txtfisrtname.Text;
            c.date_de_naissance = DateTime.Parse(txtbirthdate.Text);
            c.adresse_email     = txtemail.Text;
            c.fonction          = txtfunction.Text;
            c.photo_C           = "";
            adminspace.DbDataContetxt.Citoyen.InsertOnSubmit(c);
            adminspace.DbDataContetxt.SubmitChanges();

            MessageBox.Show("Citizen has been added");
        }