Ejemplo n.º 1
0
        private void ShowAllBook(string searchBook)
        {
            BookManager bookManager = new BookManager();

            BookGridView.DataSource = bookManager.GetAllBook(searchBook);
            BookGridView.DataBind();
        }
        public void FillData()
        {
            Web webObj = new Web();

            BookGridView.DataSource = webObj.DisplayBooks();
            BookGridView.DataBind();
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Initialise the grid using the json data file
        /// </summary>
        private void InitialiseBookGridView()
        {
            IDataProvider dataProvider = new DataProvider();
            var           books        = dataProvider.GetBooks();

            Session[BooksSession]   = books;
            BookGridView.DataSource = books;
            BookGridView.DataBind();
        }
Ejemplo n.º 4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         updateBtn.Enabled  = false;
         SaveButton.Enabled = true;
         List <BookModel> abookModels = GetAllStudent();
         BookGridView.DataSource = abookModels;
         BookGridView.DataBind();
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         BookGridView.DataSource = new List <Book>
         {
             new Book {
                 Id = 1, Author = "One", Title = "One Hundred"
             },
             new Book {
                 Id = 2, Author = "Two", Title = "Two Hundreds"
             },
             new Book {
                 Id = 3, Author = "Three", Title = "Three Hundreds"
             },
         };
         BookGridView.DataBind();
     }
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Bind the book grid to the session
 /// </summary>
 private void BindBookGridView()
 {
     BookGridView.DataSource = Session[BooksSession];
     BookGridView.DataBind();
 }