Example #1
0
    private void DanhMucSanPham()
    {
        XuLyLayDanhMucSanPham xulydanhmucsanpham = new
                                                   XuLyLayDanhMucSanPham();

        try
        {
            xulydanhmucsanpham.Thucthi();
        }
        catch
        {
            Response.Redirect("../Trangloi.aspx");
        }
        GridView1.DataSource = xulydanhmucsanpham.Ketqua;
        GridView1.DataBind();
    }
    //-----------Hiện danh mục sản phẩm----------------
    private void HienDanhMucSanPham()
    {
        XuLyLayDanhMucSanPham xulydanhmucsanpham = new
                                                   XuLyLayDanhMucSanPham();

        try
        {
            xulydanhmucsanpham.Thucthi();
        }
        catch
        {
            Response.Redirect("../Trangloi.aspx");
        }
        dropDanhMucSanPham.DataTextField  = "TenDanhMucSanPham";
        dropDanhMucSanPham.DataValueField = "IDDanhMucSanPham";
        dropDanhMucSanPham.DataSource     = xulydanhmucsanpham.Ketqua;
        dropDanhMucSanPham.DataBind();
    }