private void CreatPropertiesTree() { DataTable dtproperty = CommonFuncCall.GetDictionariesByDic_codes("sys_enterprise_property"); TreeNode tmpNd; if (dtproperty != null) { foreach (DataRow drv in dtproperty.Rows) { tmpNd = new TreeNode(); tmpNd.Tag = drv; tmpNd.Text = drv["dic_name"].ToString(); //name //tmpNd.Name = drv["dic_id"].ToString();//id tmpNd.Name = string.Empty; //id this.tvNature.Nodes.Add(tmpNd); } } ArrayList dic_name = new ArrayList(); dic_name.Add("sys_enterprise_property"); dtproperty = CommonFuncCall.GetDictionariesByPDic_codes(dic_name); if (dtproperty != null) { foreach (DataRow drv in dtproperty.Rows) { tmpNd = new TreeNode(); tmpNd.Tag = drv; tmpNd.Text = drv["dic_name"].ToString(); //name tmpNd.Name = drv["dic_id"].ToString(); //id this.tvNature.Nodes[0].Nodes.Add(tmpNd); } } this.tvNature.Nodes[0].Expand(); }
private void CreatPropertiesTree() { DataTable dtproperty = CommonFuncCall.GetDictionariesByDic_codes("sys_enterprise_property"); TreeNode tmpNd; if (dtproperty != null) { foreach (DataRow drv in dtproperty.Rows) { tmpNd = new TreeNode(); tmpNd.Tag = drv; tmpNd.Text = drv["dic_name"].ToString(); //name tmpNd.Name = drv["dic_id"].ToString(); //id this.treeViewEx1.Nodes.Add(tmpNd); } } //dtproperty = CommonFuncCall.GetDictionariesByPDic_codes("sys_enterprise_property"); }