private void ViewAlbum(int cId) { AlbumsBSO albumBSO = new AlbumsBSO(); DataTable table = new DataTable(); if (cId != 0) table = albumBSO.GetAlbumsByCate(cId); else table = albumBSO.GetAlbumsAll(); commonBSO commonBSO = new commonBSO(); commonBSO.FillToGridView(grvAlbum, table); }
private void ViewAlbums(int cID) { AlbumsBSO albumBSO = new AlbumsBSO(); DataTable table = albumBSO.GetAlbumsByCate(cID); int i = 0; string str = "<div class='msg_thumb_wrapper'>"; if (table.Rows.Count > 0) { foreach (DataRow row in table.Rows) { if ((i % 6) == 0 & i != 0) { str += "</div><div class='msg_thumb_wrapper' style='display:none;'>"; } str += "<a href='" + ResolveUrl("~/") + "/Admin/Upload/Albums/AlbumsImg/ImgLarge/" + row["ImageLarge"].ToString() + "'><img src='" + ResolveUrl("~/") + "Admin/Upload/Albums/AlbumsImg/ImgThumb/" + row["ImageThumb"].ToString() + "' alt='" + ResolveUrl("~/") + "Admin/Upload/Albums/AlbumsImg/ImgLarge/" + row["ImageLarge"].ToString() + "'/></a>"; i++; } } str += "</div>"; ltlAlbums.Text = str; }