示例#1
0
    private void LoadAllTinTuc()
    {
        TinTuc tt = new TinTuc();
        DataSet ds = tt.SelectByNguoiDungID(ChuCuaHangID);
        lblTieuDe.Text = "Các tin mới nhất.";

        foreach (DataRow dr in ds.Tables[0].Rows)
        {
            spnTinTuc.InnerHtml += "<br><a href=\"estorenews.aspx?nid="
                                   + dr["TinTucID"] + "&sid=" + CuaHangID
                                   + "\" ><b>" + dr["tieude"]
                                   + "</b><br><img border=\"0\"width=\"48\" src=\""
                                   + dr["anh"] + "\" /></a>&nbsp;&nbsp;"
                                   + dr["tomtat"] + "<br><a href=\"estorenews.aspx?nid="
                                   + dr["TinTucID"] + "&sid=" + CuaHangID
                                   + "\" >Xem tiếp</a><br><hr>";
        }
    }
    private void LoadDanhMucTinTuc()
    {
        TinTuc tt = new TinTuc();
        DataSet ds = tt.SelectByNguoiDungID(ChuCuaHangID);

        string content = "";
        //foreach (DataRow dr in ds.Tables[0].Rows)
        //{
        content += "<li><a href=\"#\">Tin cong ty</a></li>"
                        + "<li><a href=\"#\">Tin tuc lien quan</a></li>";
        //}
        spnDanhMucTinTuc.InnerHtml = content;
    }