Ejemplo n.º 1
0
        /// <summary>
        /// 绑定左侧供应商级别树方法
        /// </summary>
        private void BindTvSupplier()
        {
            DataTable dt = DBHelper.GetTable("供应商分类查询", "sys_dictionaries", "*", "dic_code='sys_supplier_category'", "", "order by dic_id");

            CreateTreeView(TreeVBusinUnt.Nodes, dt, "-1");
            if (dt.Rows.Count > 0)
            {
                TreeVBusinUnt.Nodes[0].Expand();
            }
            TreeVBusinUnt.SelectedNode = TreeVBusinUnt.Nodes[0];
            TreeVBusinUnt.ExpandAll();//设置所有节点均展开
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 绑定左侧供应商级别树方法
        /// </summary>
        private void BindTvSupplier()
        {
            try
            {
                DataTable dt = DBHelper.GetTable("供应商分类查询", "sys_dictionaries", "*", "dic_code='sys_supplier_category'", "", "order by dic_id");

                CreateTreeView(TreeVBusinUnt.Nodes, dt, "-1");
                if (dt.Rows.Count > 0)
                {
                    TreeVBusinUnt.Nodes[0].Expand();
                }
                TreeVBusinUnt.SelectedNode = TreeVBusinUnt.Nodes[0];
                TreeVBusinUnt.ExpandAll();//设置所有节点均展开
            }
            catch (Exception ex)
            {
                MessageBoxEx.Show(ex.Message, "异常提示", MessageBoxButtons.OK, MessageBoxIcon.Question);
            }
        }