Esempio n. 1
0
 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"));
        }
Esempio n. 3
0
 public void OnGet(Guid id)
 {
     Owner = OwnerStore.GetOwnerById(id);
 }
Esempio n. 4
0
 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;
 }