Exemplo n.º 1
0
        private void saveBook_Click(object sender, EventArgs e)
        {
            Books bk = new Books();

            bk.Title       = bookName.Text.ToString();
            bk.description = bookDescription.Text.ToString();
            BookAdapter.AddBook(bk);
            currentForm.updateList();
            this.Hide();
        }
Exemplo n.º 2
0
        public Form1()
        {
            InitializeComponent();
            Books bk = new Books("hello");
            Pages pg = new Pages("test");

            bk.addPage(pg);
            BookAdapter.AddBook(bk);
            updateList();
            this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
        }
Exemplo n.º 3
0
 public void updateList()
 {
     booksList.DataSource = null;
     booksList.Items.Clear();
     booksList.DataSource = BookAdapter.GetAllBooks();
 }