Exemplo n.º 1
0
    private void LoadWebDemoGroup()
    {
        WebDemo            obj     = new WebDemo();
        int                RootID  = obj.GetRootID(Globals.AgentCatID);
        DataSet            ds      = obj.GetWebDemoGroupByParentID("WebDemoGroup", Globals.AgentCatID, RootID);
        DropDownListHelper ddlHelp = new DropDownListHelper();

        ddlHelp.FillData(ddlCategory, ds, "Name", "ID", "---Chọn chuyên mục WebDemo---");
    }
Exemplo n.º 2
0
 /// <summary>
 /// Load các danh mục chủng loại WebDemo vào TreeViewCategory
 /// </summary>
 /// <param name="TreeViewCategory"></param>
 /// <param name="Lang"></param>
 public void LoadTreeViewCategory(TreeView TreeViewCategory)
 {
     try
     {
         TreeViewCategory.Nodes.Clear();
         WebDemo obj      = new WebDemo();
         int     RootID   = obj.GetRootID(Globals.AgentCatID);
         DataSet dsParent = obj.GetWebDemoGroupByParentID("WebDemoGroup", Globals.AgentCatID, RootID);
         for (int i = 0; i < dsParent.Tables[0].Rows.Count; i++)
         {
             TreeNode newNode = new TreeNode(Convert.ToString(dsParent.Tables[0].Rows[i]["Name"]), Convert.ToString(dsParent.Tables[0].Rows[i]["ID"]));
             newNode.ToolTip     = Convert.ToString(dsParent.Tables[0].Rows[i]["Name"]);
             newNode.NavigateUrl = "Catalog.aspx?Action=Edit&ID=" + Convert.ToString(dsParent.Tables[0].Rows[i]["ID"]);
             newNode.ExpandAll();
             //RootNode.ChildNodes.Add(newNode);
             TreeViewCategory.Nodes.Add(newNode);
         }
     }
     catch { }
 }