public IActionResult OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } //Edit PatientStore.EditPatient(Patient); return(RedirectToPage("./Index")); }
public IActionResult OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } //Add Patient.OwnerId = OwnerId; PatientStore.AddPatient(Patient); return(RedirectToPage("./Index")); }
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; } }
public CreateModel(PatientStore patientStore) { PatientStore = patientStore; }
public IActionResult OnPostDelete(Guid id) { PatientStore.DeletePatient(id); return(RedirectToPage()); }
public IndexModel(PatientStore pacienteStore) { PatientStore = pacienteStore; Patients = PatientStore.GetPatient(); }
public IndexModel(UserManager <ApplicationUser> userManager, OwnerStore ownerStore, PatientStore patientStore) { OwnerStore = ownerStore; _userManager = userManager; }
public void OnGet(Guid id) { Patient = PatientStore.GetPatientById(id); }
public EditModel(PatientStore patientStore) { PatientStore = patientStore; }