예제 #1
0
        public void fadd_User_button1_Click(FAdd_User fu, TextBox textBox1, TextBox textBox2, TextBox textBox3, RadioButton radioButton1, RadioButton radioButton2, RadioButton radioButton3, Label label4)
        {
            string login    = fadd_User_check_login(textBox1);
            string password = fadd_User_check_password(textBox1, textBox2);
            bool   confirm  = fadd_User_check_password_confirm(textBox1, textBox2, textBox3);
            string type     = null;

            if (radioButton1.Checked)
            {
                type = "admin";
            }
            if (radioButton2.Checked)
            {
                type = "doctor";
            }
            if (radioButton3.Checked)
            {
                type = "nurse";
            }

            if (login != "" & password != "" & confirm & type != "")
            {
                string command = $"INSERT INTO test_user (login, password, type) VALUES ('{login}', '{SHA256ToString(password)}', '{type}');";
                session.Execute(command);
                fu.Hide();
            }
            else
            {
                label4.Text = "Co najmniej jedna wartość jest błędna!";
            }
        }
예제 #2
0
 public void fadd_User_button2_Click(FAdd_User fu)
 {
     fu.Hide();
 }
예제 #3
0
        public void form4_button2_Click()
        {
            var fAdd_User = new FAdd_User(session);

            fAdd_User.Show();
        }