예제 #1
0
 public AddPatientViewModel()
 {
     DbContext     = new EwscdContext();
     Patient       = new Patient();
     OkCommand     = new DelegateCommand(Register);
     CancelCommand = new DelegateCommand(Cancel);
 }
예제 #2
0
        public DoctorViewModel()
        {
            DbContext = new EwscdContext();

            Actions = DbContext.Action.Where(x => x.DoctorId == Properties.Settings.Default.CurrentDoctorId).ToList();

            CheckAsHeldCommand = new DelegateCommand(CheckAsHeld);
        }
예제 #3
0
        public LoginViewModel()
        {
            DbContext           = new EwscdContext();
            LoginCommand        = new DelegateCommand(LogIn);
            RegistrationCommand = new DelegateCommand(Registration);

            RoleList = new List <string> {
                Const.DoctorRole, Const.CuratorRole
            };
        }
 public RegistrationViewModel()
 {
     DbContext = new EwscdContext();
     RoleList  = new List <string> {
         Const.DoctorRole, Const.CuratorRole
     };
     Employee      = new Employee();
     OkCommand     = new DelegateCommand(Register);
     CancelCommand = new DelegateCommand(Cancel);
 }
예제 #5
0
        public CuratorViewModel()
        {
            DbContext = new EwscdContext();

            Patients = DbContext.Patients.Where(x => x.CuratorId == Properties.Settings.Default.CurrentCuratorId).ToList();

            ActionVisibility       = Visibility.Hidden;
            SelectedPatientCommand = new DelegateCommand(SelectPatient);
            AddPatientCommand      = new DelegateCommand(AddPatient);
            AddNewActionCommand    = new DelegateCommand(AddNewAction);
        }
        public AddNewActionViewModel()
        {
            DbContext = new EwscdContext();
            Doctors   = DbContext.Employees.Where(x => x.Role == Const.DoctorRole).OrderBy(x => x.FIO).ToList();
            KindList  = new List <string> {
                Const.AppointmentKind, Const.ProcedureKind
            };
            Action = new DataLayer.Entities.Action();

            OkCommand     = new DelegateCommand(Register);
            CancelCommand = new DelegateCommand(Cancel);
        }