protected void btnDeleteBooks_Click(object sender, EventArgs e)
        {
            BCC_DOTNET_LMSEntities db = new BCC_DOTNET_LMSEntities();

            tblBook tbl = db.tblBooks.ToList().Where(x => x.code == int.Parse(txtCode.Text)).First();

            db.DeleteObject(tbl);
            db.SaveChanges();
            populateBooks();
        }
        protected void btnUpdateBooks_Click(object sender, EventArgs e)
        {
            BCC_DOTNET_LMSEntities db = new BCC_DOTNET_LMSEntities();

            tblBook tbl = db.tblBooks.ToList().Where(x => x.code == int.Parse(txtCode.Text)).First();

            tbl.title        = txtTitle.Text;
            tbl.author       = txtAuthor.Text;
            tbl.publication  = txtPublication.Text;
            tbl.subject      = txtSubject.Text;
            tbl.no_of_copies = int.Parse(txtBooksQnty.Text);

            db.SaveChanges();
            populateBooks();
        }
        protected void btnInsertBooks_Click(object sender, EventArgs e)
        {
            BCC_DOTNET_LMSEntities db = new BCC_DOTNET_LMSEntities();

            tblBook tbl = new tblBook();

            tbl.title        = txtTitle.Text;
            tbl.author       = txtAuthor.Text;
            tbl.publication  = txtPublication.Text;
            tbl.subject      = txtSubject.Text;
            tbl.no_of_copies = int.Parse(txtBooksQnty.Text);
            db.AddTotblBooks(tbl);
            db.SaveChanges();
            populateBooks();
        }