示例#1
0
        // New Method - allows user to click 'new' button and sends user to frmEdit, given the "new" parameter
        private void btnNew_Click(object sender, EventArgs e)
        {
            Books   myBook = new Books();
            frmEdit myForm = new frmEdit(myBook, "new", cwid);

            if (myForm.ShowDialog() == DialogResult.OK)
            {
            }
            else
            {
                LoadList();
            }
        }
示例#2
0
        // Edit Method - allows user to click 'edit' button and sends user to frmEdit, given the "edit" parameter
        private void btnEdit_Click(object sender, EventArgs e)
        {
            Books   myBook = (Books)lstBooks.SelectedItem;
            frmEdit myForm = new frmEdit(myBook, "edit", cwid);

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