private void Button_Click(object sender, RoutedEventArgs e) { CommClient.Employee myd = new CommClient.Employee(); // 得到医生 CommClient.EmployeeDepartmentHistory historyClient = new CommClient.EmployeeDepartmentHistory(); List <CommContracts.Employee> listOfSignalSource = historyClient.GetAllDepartmentEmployee(0); this.listView1.ItemsSource = listOfSignalSource; SelectDoctor = new CommContracts.Employee(); }
private void MyDataNameList_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs <object> e) { TreeViewItem item = MyDataNameList.SelectedItem as TreeViewItem; if (item == null) { return; } if (item.Header == null) { return; } if (this.listView1 == null) { return; } string strCurrentName = item.Header.ToString(); SetMenuEnable(false); if (strCurrentName == "值班时段字典") { this.listView1.View = this.Resources["ChuZhenShiDuan"] as GridView; var vm = this.DataContext as HISGUIDoctorVM; CommClient.Shift client = new CommClient.Shift(); List <CommContracts.Shift> list = client.GetAllShift(); this.listView1.ItemsSource = list; } //else if (strCurrentName == "号别字典") //{ // this.listView1.View = this.Resources["HaoBie"] as GridView; // var vm = this.DataContext as HISGUIDoctorVM; // CommClient.SignalItem client = new CommClient.SignalItem(); // List<CommContracts.SignalType> list = client.GetAllSignalItem(); // this.listView1.ItemsSource = list; //} else if (strCurrentName == "科室字典") { this.listView1.View = this.Resources["KeShi"] as GridView; var vm = this.DataContext as HISGUIDoctorVM; CommClient.Department client = new CommClient.Department(); List <CommContracts.Department> list = client.getALLDepartment(CommContracts.DepartmentEnum.临床科室); this.listView1.ItemsSource = list; } else if (strCurrentName == "医生字典") { this.listView1.View = this.Resources["YiSheng"] as GridView; SetMenuEnable(true); var vm = this.DataContext as HISGUIDoctorVM; CommClient.Employee employeeClient = new CommClient.Employee(); int nCurrentDepartmentID = employeeClient.GetCurrentDepartment(vm.CurrentUser.ID).ID; CommClient.EmployeeDepartmentHistory historyClient = new CommClient.EmployeeDepartmentHistory(); List <CommContracts.Employee> list = historyClient.GetAllDepartmentEmployee(nCurrentDepartmentID); this.listView1.ItemsSource = list; } }