コード例 #1
0
 public SearchPatientPage()
 {
     this.InitializeComponent();
     this.setDateText();
     this.viewModel   = new AllPatientsViewModel();
     this.DataContext = this.viewModel;
 }
コード例 #2
0
 public PatientRecords()
 {
     this.InitializeComponent();
     this.viewModel   = new AllPatientsViewModel();
     this.DataContext = this.viewModel;
     this.setDateText();
     this.pInfo.DataContext = this;
 }
コード例 #3
0
        public ActionResult Index()
        {
            var patients = GetNamesOfPatients();

            var model = new AllPatientsViewModel
            {
                Patients = patients,
                Details  = new DisplayDetailsViewModel {
                    PersonalDetails = new PersonalDetails {
                        PersonalID = 0
                    }
                }
            };

            return(View(model));
        }
コード例 #4
0
        public AllPatientsViewModel PatientDetails(string id)
        {
            if (id == null)
            {
            }

            var patient = db.Users
                          .FirstOrDefault(p => p.Id == id);

            if (patient == null)
            {
            }

            var patientDetails = new AllPatientsViewModel
            {
                FirstName   = patient.Firstname,
                LastName    = patient.Lastname,
                PhoneNumber = patient.PhoneNumber,
                Email       = patient.Email,
                Address     = patient.Address
            };

            return(patientDetails);
        }