public IActionResult OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } //Edit OwnerStore.EditOwner(Owner); return(RedirectToPage("./Index")); }
public IActionResult OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } //Add //Propietario.CompanyId = CurrentUser.CompanyId; OwnerStore.AddOwner(Owner); return(RedirectToPage("./Index")); }
public void OnGet(Guid id) { Owner = OwnerStore.GetOwnerById(id); }
public EditModel(OwnerStore ownerStore) { OwnerStore = ownerStore; }
public CreateModel(UserManager <ApplicationUser> userManager, OwnerStore ownerStore) { OwnerStore = ownerStore; _userManager = userManager; }
public async Task OnGetAsync() { CurrentUser = await _userManager.GetUserAsync(User); Owners = OwnerStore.GetOwners(CurrentUser.CompanyId); }
public IActionResult OnPostDelete(Guid id) { OwnerStore.DeleteOwner(id); return(RedirectToPage()); }
public IndexModel(UserManager <ApplicationUser> userManager, OwnerStore ownerStore, PatientStore patientStore) { OwnerStore = ownerStore; _userManager = userManager; }