コード例 #1
0
        public VisitAddViewModel()
        {
            ButtonClick = new DelegateCommand(Add);
            patRepo     = new BaseRepo <Patient>(new ClinicAppDAL.EF.ClinicAppClinicContext());
            diagRepo    = new BaseRepo <Diagnosis>(new ClinicAppDAL.EF.ClinicAppClinicContext());
            docRepo     = new DoctorRepo(new ClinicAppDAL.EF.ClinicAppClinicContext());
            visRepo     = new DoctorVisitRepo(new ClinicAppDAL.EF.ClinicAppClinicContext());
            VisitDate   = DateTime.Now;

            Doctors   = new ObservableCollection <Doctor>(docRepo.GetAll());
            Patients  = new ObservableCollection <Patient>(patRepo.GetAll());
            Diagnoses = new ObservableCollection <Diagnosis>(diagRepo.GetAll());
        }
コード例 #2
0
 public VisitsListViewModel(IRegionManager regionManager, IDialogService dialogService)
 {
     _regionManager  = regionManager;
     _dialogService  = dialogService;
     repo            = new DoctorVisitRepo(new ClinicAppDAL.EF.ClinicAppClinicContext());
     Visits          = new ObservableCollection <DoctorVisit>(repo.GetAll());
     SelectedCommand = new DelegateCommand <DoctorVisit>(Selected);
     DeleteCommand   = new DelegateCommand(Delete, canDelete).ObservesProperty(() => SelectedVisit);
     ChangeCommand   = new DelegateCommand(Change, canDelete).ObservesProperty(() => SelectedVisit);
     AddCommand      = new DelegateCommand(Add);
     SearchCommand   = new DelegateCommand(Search);
     VisitCount      = repo.GetDoctorVisitCount().ToString();
     SearchText      = DateTime.Now;
 }
コード例 #3
0
ファイル: DiagnoseInfoViewModel.cs プロジェクト: PvtPepe/Kurs
 public DiagnoseInfoViewModel()
 {
     visitRepo = new DoctorVisitRepo(new ClinicAppDAL.EF.ClinicAppClinicContext());
 }