Exemplo n.º 1
0
Arquivo: Main.cs Projeto: etmoye/PA6
        //edit selected book
        private void btnEdit_Click(object sender, EventArgs e)
        {
            Book myBook = (Book)lstBooks.SelectedItem;            //casting
            //calls the edit form
            formEdit myForm = new formEdit(myBook, "edit", cwid); //mode determines if fields prepopulate

            if (myForm.ShowDialog() == DialogResult.OK)
            {
            }
            else
            {
                LoadList();
            }
        }
Exemplo n.º 2
0
Arquivo: Main.cs Projeto: etmoye/PA6
        //create new book
        private void btnNew_Click(object sender, EventArgs e)
        {
            Book myBook = new Book();
            //calls new form
            formEdit myForm = new formEdit(myBook, "new", cwid);

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