Example #1
0
        private void BtnAdd_Click(object sender, EventArgs e)
        {
            string select = cmbSelect.Text.ToLower();

            if (select == "elever")
            {
                int         txtbox1int = Int32.Parse(txtBox1.Text);
                int         txtbox5int = Int32.Parse(txtBox5.Text);
                EleverModel elev       = new EleverModel(txtbox1int, txtBox2.Text, txtBox3.Text, txtBox4.Text, txtbox5int, txtBox6.Text);
                SqliteDataAccess.AddElev(elev);
            }
            else if (select == "vÄrdnadshavare")
            {
                int txtbox1int = Int32.Parse(txtBox1.Text);
                int txtbox5int = Int32.Parse(txtBox5.Text);
                int txtbox6int = Int32.Parse(txtBox6.Text);
                SqliteDataAccess.NewVĂ„rdnadshavare(txtbox1int, txtBox2.Text, txtBox3.Text, txtBox4.Text, txtbox5int, txtbox6int);
            }
            Back();
        }