示例#1
0
        private void buttonMAJ_Click(object sender, EventArgs e)
        {
            int rbSelected = 0;

            if (rbAdmin.Checked == true)
            {
                rbSelected = 2;
            }
            if (rbUtilisateur.Checked == true)
            {
                rbSelected = 1;
            }
            if (rbInvite.Checked == true)
            {
                rbSelected = 0;
            }
            MessageBox.Show(infoUser.Save("modification", tbNom.Text, tbPrenom.Text, tbChangeMdp.Text, rbSelected, infoUser.Id));
            this.DialogResult = DialogResult.OK;
        }
示例#2
0
        private void addButton_Click(object sender, EventArgs e)
        {
            int rbSelected = 0;

            if (rbAdmin.Checked == true)
            {
                rbSelected = 2;
            }
            if (rbOperateur.Checked == true)
            {
                rbSelected = 1;
            }
            if (rbInvite.Checked == true)
            {
                rbSelected = 0;
            }

            MessageBox.Show(infoUser.Save("creation", tbNom.Text, tbPrenom.Text, tbPassword.Text, rbSelected, 0, tbEmail.Text, tbDpt.Text));
            this.DialogResult = DialogResult.OK;
        }