private void treeView_Data_AfterSelect(object sender, TreeViewEventArgs e) { EventArgs_Unit myEventArgs_Unit = new EventArgs_Unit(); switch (this.treeView_Data.SelectedNode.Level) { case 0: break; case 1: myEventArgs_Unit.EmployerGroup = this.treeView_Data.SelectedNode.Name.ToString(); break; case 2: myEventArgs_Unit.EmployerHPID = this.treeView_Data.SelectedNode.Name.ToString(); break; case 3: myEventArgs_Unit.DepartmentHPID = this.treeView_Data.SelectedNode.Name.ToString(); break; case 4: myEventArgs_Unit.WorkPlaceHPID = this.treeView_Data.SelectedNode.Name.ToString(); break; } Publisher_Unit.OnEventName(myEventArgs_Unit); }
/// <summary> /// 刷新数据 /// </summary> /// <param name="bool_JustFill">true-只添加和修改数据,false-刷新全部数据</param> private void RefreshData(bool bool_JustFill) { if (this.myEventArgs_Unit == null) { return; } this.myEventArgs_Unit.bool_JustFill = bool_JustFill; Publisher_Unit.OnEventName(this.myEventArgs_Unit); }