Пример #1
0
        public void fadd_Shot_button1_Click(FAdd_Shot fs, TextBox textBox1, TextBox textBox2, RadioButton radioButton1, RadioButton radioButton3, Label label5)
        {
            string name       = fadd_Shot_check_name(textBox1);
            string illness    = fadd_Shot_check_illness(textBox1, textBox2);
            bool   obligatory = false;
            bool   available  = false;

            if (radioButton1.Checked)
            {
                available = true;
            }
            if (radioButton3.Checked)
            {
                obligatory = true;
            }

            if (name != "" & illness != "")
            {
                string command = $"INSERT INTO test_shot (name, illness, available, obligatory) VALUES ('{name}', '{illness}', {available}, {obligatory});";
                session.Execute(command);
                fs.Hide();
            }
            else
            {
                label5.Text = "Co najmniej jedna wartość jest błędna!";
            }
        }
Пример #2
0
 public void fadd_Shot_button2_Click(FAdd_Shot fs)
 {
     fs.Close();
 }
Пример #3
0
        public void form4_button3_Click()
        {
            var fadd_Shot = new FAdd_Shot(session);

            fadd_Shot.Show();
        }