Пример #1
0
        private void LoadDoctorAdvices()
        {
            var vm = this.DataContext as HISGUIClinicDoctorWorkVM;

            if (vm == null)
            {
                return;
            }

            if (vm.CurrentClinicDoctorAdvice == null)
            {
                return;
            }

            m_DoctorAdviceTypeCombo.SelectedItem = vm.CurrentClinicDoctorAdvice.DoctorAdviceType;
            m_开单日期.SelectedDate = vm.CurrentClinicDoctorAdvice.StartTime;
            m_诊断Panel.Children.Clear();
            if (vm.CurrentClinicDoctorAdvice.ClinicDoctorAdvice_DiagnoseItems != null)
            {
                foreach (CommContracts.ClinicDoctorAdvice_DiagnoseItem dia in vm.CurrentClinicDoctorAdvice.ClinicDoctorAdvice_DiagnoseItems)
                {
                    if (dia.DiagnoseItem == null)
                    {
                        continue;
                    }

                    DiagnoseItemControl diagnoseItemControl = new DiagnoseItemControl(dia.DiagnoseItem);
                    m_诊断Panel.Children.Add(diagnoseItemControl);
                }
            }


            if (vm.CurrentClinicDoctorAdvice != null)
            {
                m_myGridView.ItemsSource = vm.CurrentClinicDoctorAdvice.DoctorAdviceDetailGroups;
            }
        }
Пример #2
0
        private void 诊断搜索KeyUp(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.Enter)
            {
                string str = this.m_诊断搜索Text.Text;
                DiagnoseItemFindView view = new DiagnoseItemFindView(str);
                //view.WindowStartupLocation = WindowStartupLocation.Manual;
                //view.Left = 0;
                //view.Top = 0;
                // 获得搜索文本控件的屏幕绝对坐标,固定搜索框位置
                view.Focus();
                bool?bResult = view.ShowDialog();


                if (bResult.HasValue)
                {
                    if (bResult.Value == true)
                    {
                        DiagnoseItemControl itemControl = new DiagnoseItemControl(view.CurrentZhenDuan);
                        this.m_诊断Panel.Children.Add(itemControl);
                    }
                }
            }
        }