public PatientCategorySetting()
        {
            InitializeComponent();

            patientCategorySettingViewModel = new PatientCategorySettingViewModel();

            DataContext = patientCategorySettingViewModel;

            tablePatientCategorys = new TablePatientCategorys();
        }
Exemple #2
0
        public PatientSearch()
        {
            InitializeComponent();

            patientSearchViewModel = new PatientSearchViewModel();

            DataContext = patientSearchViewModel;

            tablePatients = new TablePatients();

            tablePatientCategorys = new TablePatientCategorys();
        }
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            if (Patients != null)
            {
                patientSettingViewModel = new PatientSettingViewModel(WindowType, Agencys, Patients);
            }
            else
            {
                patientSettingViewModel = new PatientSettingViewModel(WindowType);
            }

            DataContext = patientSettingViewModel;

            tablePatients = new TablePatients();

            tablePatientCategorys = new TablePatientCategorys();
        }
Exemple #4
0
        //編輯
        public PatientSettingViewModel(string windowType, Agencys agencys, Patients patients)
        {
            WindowType = windowType;
            Patients   = patients;

            //設定病患資料
            //載入設定就好,避免多設定
            Patient_Number   = patients.Patient_Number;
            Patient_Name     = patients.Patient_Name;
            Patient_IDNumber = patients.Patient_IDNumber;
            Patient_Gender   = patients.Patient_Gender;
            Patient_Birth    = patients.Patient_Birth;
            if (PathCheck.IsFileExist(agencys.Agency_ImagePath + patients.Patient_Photo))
            {
                Patient_Photo = new CreateBitmapImage().BitmapImageShow(agencys.Agency_ImagePath + patients.Patient_Photo, 400);
            }
            Patient_FirstRegistrationDate = patients.Patient_FirstRegistrationDate == null ? DateTime.Now : (DateTime)patients.Patient_FirstRegistrationDate;
            DateTime lastRegistrationDate = new TableRegistrations().QueryLastRegistrationDate(patients);

            Patient_LastRegistrationDate = lastRegistrationDate == null?Patient_FirstRegistrationDate.ToString("yyyy/MM/dd") : lastRegistrationDate.ToString("yyyy/MM/dd");

            PatientCategoryInfo = new TablePatientCategorys().QueryPatientPatientCategoryInfo(Patients).ToList().FindAll(s => s.IsChecked == true);
        }
Exemple #5
0
 public PatientCategoryViewModel(Patients patients)
 {
     DisplayPatientCategoryInfo = PatientCategoryInfo = new TablePatientCategorys().QueryPatientPatientCategoryInfo(patients);
 }
Exemple #6
0
 public PatientCategoryViewModel()
 {
     DisplayPatientCategoryInfo = PatientCategoryInfo = new TablePatientCategorys().QueryAllPatientCategoryInfo();
 }