示例#1
0
        /*calls default constructor, passes it into the form with mode
         * type of new*/
        private void btnNew_Click(object sender, EventArgs e)
        {
            Book    myBook = new Book();
            frmEdit myForm = new frmEdit(myBook, "new", cwid);

            if (myForm.ShowDialog() == DialogResult.OK)
            {
            }
            else
            {
                LoadList();
            }
        }
示例#2
0
        //passes book the user chose to edit into the edit form
        private void btnEdit_Click(object sender, EventArgs e)
        {
            Book    myBook = (Book)lstBooks.SelectedItem;
            frmEdit myForm = new frmEdit(myBook, "edit", cwid);

            if (myForm.ShowDialog() == DialogResult.OK)
            {
            }
            else
            {
                LoadList();
            }
        }