Beispiel #1
0
    public void ReBindPageList()
    {
        DBLL.DBcommon         dbcom           = new DBLL.DBcommon();
        DBLL.clsTopicCategory TopicCategory   = new DBLL.clsTopicCategory();
        DataTable             TopicCategorydt = TopicCategory.sp_selectNormalTableOfAllByTopicCategoryAndnType(false, 2);

        ddlnTCategoryID.DataSource     = TopicCategorydt;
        ddlnTCategoryID.DataValueField = "nTCategoryID";
        ddlnTCategoryID.DataTextField  = "sTCategoryNameCN";
        ddlnTCategoryID.DataBind();
        AlbumList.Clear();
        DBLL.clsAlbum Album = new DBLL.clsAlbum();
        DataTable     dt    = new DataTable();

        dt = Album.sp_selectNormalTableOfAllByAlbum(false, int.Parse(ddlnTCategoryID.SelectedValue));
        if (dt != null)
        {
            AlbumList.Merge(dt);
            lvAlbumList.DataSource = AlbumList;
            lvAlbumList.DataBind();
        }
        else
        {
            lvAlbumList.DataSource = null;
            lvAlbumList.DataBind();
        }
    }
Beispiel #2
0
    protected void ddlnTCategoryID_SelectedIndexChanged(object sender, EventArgs e)
    {
        AlbumList.Clear();
        DBLL.clsAlbum Album = new DBLL.clsAlbum();
        DataTable     dt    = new DataTable();

        dt = Album.sp_selectNormalTableOfAllByAlbum(false, int.Parse(ddlnTCategoryID.SelectedValue));
        if (dt != null)
        {
            AlbumList.Merge(dt);
            lvAlbumList.DataSource = AlbumList;
            lvAlbumList.DataBind();
        }
        else
        {
            lvAlbumList.DataSource = null;
            lvAlbumList.DataBind();
        }
    }