コード例 #1
0
ファイル: Add.aspx.cs プロジェクト: njunet/Water125
 private void BindCate()
 {
     Maticsoft.BLL.Products.Category bll = new Maticsoft.BLL.Products.Category();
     this.DropCategory.DataSource    = bll.GetAllList();
     this.DropCategory.DataTextField = "Name";
     DropCategory.DataValueField     = "CategoryId";
     DropCategory.DataBind();
 }
コード例 #2
0
ファイル: Add.aspx.cs プロジェクト: chinasio/Control
 private void BindCate()
 {
     Maticsoft.BLL.Products.Category bll = new Maticsoft.BLL.Products.Category();
     this.DropCategory.DataSource = bll.GetAllList();
     this.DropCategory.DataTextField = "Name";
     DropCategory.DataValueField = "CategoryId";
     DropCategory.DataBind();
 }
コード例 #3
0
ファイル: Modify.aspx.cs プロジェクト: tianyaalone/Water125
 private void BiudCategory()
 {
     Maticsoft.BLL.Products.Category bll = new Maticsoft.BLL.Products.Category();
     DataSet ds = bll.GetAllList();
     this.dropCategory.DataSource = ds.Tables[0].DefaultView;
     this.dropCategory.DataTextField = "Name";
     this.dropCategory.DataValueField = "CategoryId";
     this.dropCategory.DataBind();
 }
コード例 #4
0
ファイル: Add.aspx.cs プロジェクト: njunet/Water125
        private void BiudCategory()
        {
            Maticsoft.BLL.Products.Category bll = new Maticsoft.BLL.Products.Category();
            DataSet ds = bll.GetAllList();

            this.dropCategory.DataSource     = ds.Tables[0].DefaultView;
            this.dropCategory.DataTextField  = "Name";
            this.dropCategory.DataValueField = "CategoryId";
            this.dropCategory.DataBind();
        }
コード例 #5
0
        //邦定根节点
        public void BindTreeView()
        {
            Maticsoft.BLL.Products.Category bll = new Maticsoft.BLL.Products.Category();
            DataTable dt = bll.GetAllList().Tables[0];
            DataRow[] drs = dt.Select("ParentID= " + 0);// 选出所有子节点	

            //菜单状态           
            bool menuExpand = true;

            TreeView1.Nodes.Clear(); // 清空树
            foreach (DataRow r in drs)
            {
                string ClassID = r["CategoryId"].ToString();
                string ClassDesc = "<b>" + r["Name"].ToString() + "</b>";
                string ParentId = r["ParentId"].ToString();
                //string Orders = r["Orders"].ToString();
                //string IsShow = r["IsShow"].ToString();

                //if (IsShow == "false")
                //{
                //    ClassDesc = "";
                //}

                //treeview set
                this.TreeView1.Font.Name = "宋体";
                this.TreeView1.Font.Size = FontUnit.Parse("9");

                Microsoft.Web.UI.WebControls.TreeNode rootnode = new Microsoft.Web.UI.WebControls.TreeNode();
                rootnode.Text = ClassDesc;
                rootnode.NodeData = ClassID;
                //rootnode.NavigateUrl = url;
                //rootnode.Target = framename;
                rootnode.Expanded = menuExpand;
                //rootnode.ImageUrl = imageurl;

                TreeView1.Nodes.Add(rootnode);

                int sonparentid = int.Parse(ClassID);// or =location
                CreateNode(sonparentid, rootnode, dt);
                
            }

        }
コード例 #6
0
        //邦定根节点
        public void BindTreeView()
        {
            Maticsoft.BLL.Products.Category bll = new Maticsoft.BLL.Products.Category();
            DataTable dt = bll.GetAllList().Tables[0];

            DataRow[] drs = dt.Select("ParentID= " + 0);// 选出所有子节点

            //菜单状态
            bool menuExpand = true;

            TreeView1.Nodes.Clear(); // 清空树
            foreach (DataRow r in drs)
            {
                string ClassID   = r["CategoryId"].ToString();
                string ClassDesc = "<b>" + r["Name"].ToString() + "</b>";
                string ParentId  = r["ParentId"].ToString();
                //string Orders = r["Orders"].ToString();
                //string IsShow = r["IsShow"].ToString();

                //if (IsShow == "false")
                //{
                //    ClassDesc = "";
                //}

                //treeview set
                this.TreeView1.Font.Name = "宋体";
                this.TreeView1.Font.Size = FontUnit.Parse("9");

                Microsoft.Web.UI.WebControls.TreeNode rootnode = new Microsoft.Web.UI.WebControls.TreeNode();
                rootnode.Text     = ClassDesc;
                rootnode.NodeData = ClassID;
                //rootnode.NavigateUrl = url;
                //rootnode.Target = framename;
                rootnode.Expanded = menuExpand;
                //rootnode.ImageUrl = imageurl;

                TreeView1.Nodes.Add(rootnode);

                int sonparentid = int.Parse(ClassID);// or =location
                CreateNode(sonparentid, rootnode, dt);
            }
        }
コード例 #7
0
 private void ShowCategory()
 {
     Maticsoft.BLL.Products.Category bll = new Maticsoft.BLL.Products.Category();
     this.DataList1.DataSource = bll.GetAllList();
     this.DataList1.DataBind();
 }
コード例 #8
0
ファイル: Main.Master.cs プロジェクト: chinasio/Control
 private void ShowCategory()
 {
     Maticsoft.BLL.Products.Category bll = new Maticsoft.BLL.Products.Category();
     this.DataList1.DataSource = bll.GetAllList();
     this.DataList1.DataBind();
 }