예제 #1
0
        private void btnSaveClose_Click(object sender, EventArgs e)
        {
            appDB = new AppDatabase();
            string newsong = appDB.quickUpdate("books", "songs", "34", "code", "bebmb");

            //string newsong = appDB.newSong(lstBookcodes.Text, txtNumber.Text, txtSongTitle.Text, txtSongContent.Text, txtSongKey.Text, "", "");
            if (newsong == "success")
            {
                loadFeedback(txtSongTitle.Text + " has been added successfully!", true, true);
                loadBooks();
                txtNumber.box.Clear();
                txtSongKey.box.Clear();
                txtSongTitle.box.Clear();
                txtSongContent.Clear();
                Close();
            }
            else
            {
                loadFeedback("Unable to add a song: " + newsong, false);
            }
        }