Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DataTable dt = DatabaseHelper.Retrieve(@"
                    SELECT IC.ItemId, IC.Id AS ItemCopyID, L.Id AS LibraryID, I.Title, L.LocationName
                        FROM ItemCopy IC
                        JOIN Item I ON I.Id = IC.ItemId 
                        JOIN [Library] L ON L.Id = IC.LibraryId
                ");

                Books.DataSource = dt.Rows;
                Books.DataBind();
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DataTable dt = DatabaseHelper.Retrieve(@"
                    SELECT Author.FirstName, Author.LastName, Item.Title
                    FROM Author JOIN Item ON Author.Id = Item.AuthorId
                    
                ");



                Books.DataSource = dt.Rows;
                Books.DataBind();
            }
        }
Exemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DataTable dt = DatabaseHelper.Retrieve(@"
                    select Book.ID, Book.Title, Book.ISBN, Book.Author_ID,
                    Author.LastName, Author.FirstName
                    from Book
                    inner join Author
                    on Author.ID = Book.Author_ID
                    order by Title
                ");

                Books.DataSource = dt.Rows;
                Books.DataBind();
            }
        }