private void FillDataInGrid()
        {
            int  topicid = Convert.ToInt32(ddlTreeNode_Topics.SelectedValue);
            char status  = Convert.ToChar(ddlStatus.SelectedValue);
            List <Gallery_Collection> list = collection_obj.GetList(topicid, status);
            int count = list.Count;

            GridView1.DataSource = list;
            GridView1.DataBind();
        }
示例#2
0
        protected void PopulateCollectionList2DDL()
        {
            GalleryCollection gallery_collection_obj = new GalleryCollection();
            int topicid = Convert.ToInt32(ddlTreeNode_Topics.SelectedValue);
            List <Gallery_Collection> list = gallery_collection_obj.GetList(topicid, '1');

            ddlCollection.Items.Clear();
            ddlCollection.DataSource     = list;
            ddlCollection.DataTextField  = "Title";
            ddlCollection.DataValueField = "CollectionId";
            ddlCollection.Items.Insert(0, new ListItem("- Chọn -", "0"));
            ddlCollection.DataBind();
            ddlCollection.AutoPostBack = true;
        }
        protected void CollectionList2DDL()
        {
            if (ddlTreeNode_Topics.SelectedValue != string.Empty)
            {
                GalleryCollection gallery_collection_obj = new GalleryCollection();
                int topicid = Convert.ToInt32(ddlTreeNode_Topics.SelectedValue);
                List <Gallery_Collection> list = gallery_collection_obj.GetList(topicid, '1');

                ddlCollection.Items.Clear();
                ddlCollection.DataSource     = list;
                ddlCollection.DataTextField  = "Title";
                ddlCollection.DataValueField = "CollectionId";
                ddlCollection.DataBind();
            }
            ddlCollection.Items.Insert(0, new ListItem("- Chọn -", ""));
        }