コード例 #1
0
ファイル: DoctorVM.cs プロジェクト: meirkalman/DrugsProj3.0
 public DoctorVM(IControlManage controlManage)
 {
     IControlManage = controlManage;
     DoctorM        = new DoctorModel();
     Command        = new DoctorCommand(this);
     try
     {
         PatientsId = new ObservableCollection <string>(DoctorM.GetAllPatientsId());
     }
     catch (Exception e)
     {
         (App.Current as App).navigation.MainWindows.comments.Text = e.Message.ToString();
     }
 }
コード例 #2
0
 public AddDoctorVisitVM(IControlManage controlManage)
 {
     try
     {
         IControlManage     = controlManage;
         AddDoctorVisitM    = new AddDoctorVisitModel();
         AddCommand         = new AddDoctorVisitCommand(this);
         MedicinesNames     = new ObservableCollection <string>(AddDoctorVisitM.GetAllMedicinesNames());
         Patient            = IControlManage.Patient;
         User               = IControlManage.User;
         DoctorName         = User.Fname + " " + User.Lname;
         PatientName        = Patient.Fname + " " + Patient.Lname;
         Recipes            = new ObservableCollection <Recipe>(AddDoctorVisitM.getPatientHistory(Patient.PatientId));
         Type               = new ObservableCollection <string>(Enum.GetNames(typeof(ShowData)));
         MedicationsAdded   = new ObservableCollection <string>();
         PrescriptionsGiven = new List <Recipe>();
     }
     catch (Exception e)
     {
         (App.Current as App).navigation.MainWindows.comments.Text = e.Message.ToString();
     }
 }
コード例 #3
0
 public LoginVM(IControlManage controlManage)
 {
     IControlManage = controlManage;
     LoginM         = new LoginModel();
     Command        = new LoginCommand(this);
 }