Exemplo n.º 1
0
 /// <summary>构造函数
 ///
 /// </summary>
 public FrmTreeListDemoTreeQuery()
 {
     InitializeComponent();
     m_TreeListDemoDAL = new  TreeListDemoDAL();
     this.dataTreeListView.RootKeyValue = 0u;
     DoInitData();
 }
Exemplo n.º 2
0
 /// <summary>构造函数
 ///
 /// </summary>
 /// <param name="model">对象</param>
 /// <param name="intParentId">父级ID</param>
 /// <param name="lstTreeListDemo">对象集合</param>
 public FrmTreeListDemoDialog(TreeListDemo model, int intParentId, List <TreeListDemo> lstTreeListDemo)
 {
     InitializeComponent();
     DoInitData();
     m_lstTreeListDemo          = lstTreeListDemo;
     m_intParentId              = intParentId;
     m_TreeListDemoDAL          = new TreeListDemoDAL();
     this.dataNavigator.Visible = false;
     if (model != null)
     {
         this.dataNavigator.Visible  = true;
         m_TreeListDemo              = model;
         this.dataNavigator.ListInfo = lstTreeListDemo.Select(t => t.Id.ToString()).ToList();
         m_strIndex = lstTreeListDemo.FindIndex(t => t.Id == m_TreeListDemo.Id).ToString();
         this.dataNavigator.CurrentIndex = int.Parse(m_strIndex);
     }
 }