Ejemplo n.º 1
0
        public MainWindowViewModel()
        {
            NavCommand      = new MyICommand <string>(OnNav);
            MenuOpenCommand = new MyICommand(OnOpen);

            loginViewModel   = new LoginViewModel();
            CurrentViewModel = loginViewModel;
            HelpText         = loginViewModel.HelpText;
            HeaderLabelText  = "Login";

            var app = Application.Current as App;

            _appointementController = app.AppointementController;
            _feedbackController     = app.FeedbackController;
            _patientController      = app.PatientController;
            _doctorController       = app.DoctorController;
            _roomController         = app.RoomController;
        }
Ejemplo n.º 2
0
 public AuthorityPatientDecorator(IPatientController patientController, String role)
 {
     this.PatientController = patientController;
     this.Role       = role;
     AuthorizedUsers = new Dictionary <string, List <string> >();
     AuthorizedUsers["ClaimAccount"] = new List <string>()
     {
         "Patient"
     };
     AuthorizedUsers["Delete"] = new List <string>()
     {
         "Patient", "Director"
     };
     AuthorizedUsers["Edit"] = new List <string>()
     {
         "Patient"
     };
     AuthorizedUsers["Get"] = new List <string>()
     {
         "Patient", "Secretary", "Doctor"
     };
     AuthorizedUsers["GetAll"] = new List <string>()
     {
         "Secretary", "Doctor"
     };
     AuthorizedUsers["GetPatientByJMBG"] = new List <string>()
     {
         "Patient", "Secretary"
     };
     AuthorizedUsers["GiveGradeToDoctor"] = new List <string>()
     {
         "Patient"
     };
     AuthorizedUsers["Save"] = new List <string>()
     {
         "Patient", "Secretary"
     };
 }
        public ScheduledApointementsStartViewModel()
        {
            _app = Application.Current as App;
            _patientController = _app.PatientController;

            AppointementDate = DateTime.Now;
            AllFlag          = true;

            nextButtonText = "ShowAll";

            mainWindowDataContext = App.Current.MainWindow.DataContext as MainWindowViewModel;
            HelpText = "After choosing parameters you can see the list of scheduled examinations or calendar of scheduled examinations, click on button 'See the List' or 'See the Calendar' to see it. ";
            scheduledApointementsStartValidator = new ScheduledApointementsStartValidator();

            NextPageCommand            = new MyICommand(OnNextPage, CanContinue);
            PatientEmailChangedCommand = new MyICommand(OnPatientEmailChanged);

            DoctorsOptions = new ObservableCollection <Doctor>();


            AddDoctorsOptions();
            AddAppointements();
            AddRoomsOptions();
        }
Ejemplo n.º 4
0
        public ApointementWithAccStartViewModel()
        {
            _apointementWithStartValidator = new ApointementWithStartValidator();

            GoToSelectTermCommand      = new MyICommand(OnGoToSelectTermCommand, CanContinue);
            DoctorNameChangedCommand   = new MyICommand(OnDoctorNameChanged);
            PatientEmailChangedCommand = new MyICommand(OnPatientEmailChanged);

            mainWindowDataContext = App.Current.MainWindow.DataContext as MainWindowViewModel;
            HelpText = "Schedule Apointement Help text";

            AppointementDate = DateTime.Today;

            _app = Application.Current as App;
            _appointementController = _app.AppointementController;

            _doctorController  = _app.DoctorController;
            _patientController = _app.PatientController;
            _patientController = _app.PatientController;

            DoctorsOptionsList = new ObservableCollection <Doctor>(_doctorController.GetAll().ToList());

            FilteredDoctorsOptionsList = DoctorsOptionsList;
        }
Ejemplo n.º 5
0
        public void ShowModaless(IPatientController inPatientController)
        {
            _patientController = inPatientController;

            this.Show();
        }