Ejemplo n.º 1
0
        protected void getdata()
        {
            string sql = "Select * from VW_Tree_Account_Code";

            ds = SelectSql(sql);

            oTree = new obout_ASPTreeView_2_NET.Tree();
            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                if (!dr["ParentID"].Equals(DBNull.Value))
                {
                    oTree.Add(dr["ParentID"], dr["Account_Code"], dr["Account_Name"], dr["Expanded"], dr["Icon"], null);
                }
                else
                {
                    oTree.AddRootNode("", true, null);
                    oTree.Add("root", dr["Account_Code"], dr["Account_Name"], dr["Expanded"], dr["Icon"], null);
                }
            }            //end Count rows
        }
Ejemplo n.º 2
0
        protected void getdata()
        {
            string sql = "Select * from VW_Tree_Account_Code";
            ds = SelectSql(sql);

            oTree = new obout_ASPTreeView_2_NET.Tree();
            foreach(DataRow dr in ds.Tables[0].Rows)
            {

                if ( !dr["ParentID"].Equals(DBNull.Value) )
                {
                    oTree.Add(dr["ParentID"], dr["Account_Code"], dr["Account_Name"] , dr["Expanded"], dr["Icon"], null);
                }
                else
                {
                    oTree.AddRootNode("", true, null);
                    oTree.Add("root", dr["Account_Code"], dr["Account_Name"] , dr["Expanded"], dr["Icon"], null);
                }
            }//end Count rows
        }