コード例 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            // dopisujemy do zmiennych wartosci z pol i dodadjemy swoje, stale zmienne
            // bo dla plyt = 1
            int    id_kind = 1;
            string title   = textBox1.Text;
            string name    = textBox2.Text;
            string av      = "Y";
            string res     = "N";

            if (title == "" && name == "")
            {
                MessageBox.Show("Prosze podac dane");
            }
            else if (title == "")
            {
                MessageBox.Show("Prosze podac tutul");
            }
            else if (name == "")
            {
                MessageBox.Show("Prosze podac autora");
            }
            else
            {
                dbConnect.Insert(id_kind, title, name, av, res);

                this.Close();

                MessageBox.Show("Dodano poprawnie");
            }
        }
コード例 #2
0
 //Insert button clicked
 private void bInsert_Click(object sender, EventArgs e)
 {
     dbConnect.Insert();
 }