예제 #1
0
        private void LayDanhMuc()
        {
            DataTable dt = new DataTable();

            dt = DanhMuc.Thongtin_Danhmuc();

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                ltrDanhMuc.Text += @" 
            <tr>
            <td class='cotMa1'>" + dt.Rows[i]["MaDM"] + @"</td>
            <td class='cotTen1'>" + dt.Rows[i]["TenDM"] + @"</td>
            <td class='cotAnh1'>
                    <img class='anhDaiDien' src=/pic/AnhSanPham/" + dt.Rows[i]["AnhDaiDien"] + @"'/>
                    <img class='anhDaiDienHover' src=/pic/AnhSanPham/" + dt.Rows[i]["AnhDaiDien"] + @"'/>
                </td>
            <td class='cotThuTu1'>" + dt.Rows[i]["ThuTu"] + @"</td>
            <td class='cotCongCu1'>
                <a href='#' class='dmcon' title='Xem danh mục con'></a>
                <a href='#' class='sua' title='sửa'></a>
                <a href='#' class='xoa' title='xóa'></a>
            </td>
        </tr>
";
            }
        }
예제 #2
0
        private void LayDanhMucCha()
        {
            DataTable dt = new DataTable();

            dt = DanhMuc.Thongtin_Danhmuc();
            ddlDanhMucCha.Items.Clear();
            ddlDanhMucCha.Items.Add(new ListItem("Danh mục gốc", "0"));
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                ddlDanhMucCha.Items.Add(new ListItem(dt.Rows[i]["TenDM"].ToString(), dt.Rows[i]["MaDM"].ToString()));
            }
        }