コード例 #1
0
 public IActionResult OnPostAsync()
 {
     if (!ModelState.IsValid)
     {
         return(Page());
     }
     //Edit
     PatientStore.EditPatient(Patient);
     return(RedirectToPage("./Index"));
 }
コード例 #2
0
        public IActionResult OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }
            //Add

            Patient.OwnerId = OwnerId;
            PatientStore.AddPatient(Patient);
            return(RedirectToPage("./Index"));
        }
コード例 #3
0
        async Task ExecuteLoadPatientsCommand()
        {
            IsBusy = true;

            try
            {
                Patients.Clear();
                var patients = await PatientStore.GetItemsAsync(true);

                foreach (var patient in patients)
                {
                    Patients.Add(patient);
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
            }
            finally
            {
                IsBusy = false;
            }
        }
コード例 #4
0
 public CreateModel(PatientStore patientStore)
 {
     PatientStore = patientStore;
 }
コード例 #5
0
 public IActionResult OnPostDelete(Guid id)
 {
     PatientStore.DeletePatient(id);
     return(RedirectToPage());
 }
コード例 #6
0
 public IndexModel(PatientStore pacienteStore)
 {
     PatientStore = pacienteStore;
     Patients     = PatientStore.GetPatient();
 }
コード例 #7
0
 public IndexModel(UserManager <ApplicationUser> userManager, OwnerStore ownerStore, PatientStore patientStore)
 {
     OwnerStore   = ownerStore;
     _userManager = userManager;
 }
コード例 #8
0
 public void OnGet(Guid id)
 {
     Patient = PatientStore.GetPatientById(id);
 }
コード例 #9
0
 public EditModel(PatientStore patientStore)
 {
     PatientStore = patientStore;
 }