Пример #1
0
        private void updateButton_Click(object sender, EventArgs e)
        {
            addBook addBookOBj = new addBook();

            addBookOBj.bID       = int.Parse(bIDTextBox.Text);
            addBookOBj.titel     = titelTextBox.Text;
            addBookOBj.cID       = int.Parse(cIDTextBox.Text);
            addBookOBj.isbn      = isbnTextBox.Text;
            addBookOBj.publisher = publisherTextBox.Text;
            addBookOBj.edition   = editionTextBox.Text;
            addBookOBj.arthor    = arthorTextBox.Text;
            addBookOBj.copies    = int.Parse(copiesTextBox.Text);

            addBookBL bookBLOBj = new addBookBL();
            bool      result    = bookBLOBj.UpdateBookAndSendToBL(addBookOBj);

            if (result)
            {
                MessageBox.Show("Succesfuly Update!!!!");
                this.PopulateGridView();
                IntitialButtonMood();
                CleanTextBar();
            }

            else
            {
                MessageBox.Show("ERROR!!");
            }
        }
Пример #2
0
        private void PopulateGridView()
        {
            DataTable dt           = new DataTable();
            addBookBL studentBLOBj = new addBookBL();

            dt = studentBLOBj.GetExistingdBookBL();
            bookDataGridView.DataSource = dt;
        }