示例#1
0
 public void RegistrationSetting()
 {
     //設定掛號日
     RegistrationsList            = new TableRegistrations().QueryRegistrationsList(patients);
     Patient_LastRegistrationDate = RegistrationsList.Count() > 0 ? RegistrationsList[0].DisplayName : Patient_FirstRegistrationDate;
     RegistrationsList.Insert(0, new ComboBoxItemInfo("全部", -1));
 }
示例#2
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);
        }