public virtual async Task OnGetAsync() { if (Filter.StoreId.HasValue) { StoreName = (await _storeAppService.GetAsync(Filter.StoreId.Value)).Name; } }
public virtual async Task OnGetAsync() { if (StoreId.HasValue) { StoreName = (await _storeAppService.GetAsync(StoreId.Value)).Name; } if (CustomerUserId.HasValue) { // Todo: get username } }
public virtual async Task OnGetAsync() { //TODO: Need to handle: when StoreId is empty, and current user owns multiple store if (!StoreId.HasValue && CurrentUser.Id.HasValue) { var storeOwners = await _storeOwnerAppService.GetListAsync(new GetStoreOwnerListDto { OwnerUserId = CurrentUser.Id.Value, }); StoreId = storeOwners.Items.FirstOrDefault()?.StoreId; } if (!StoreId.HasValue) { var defaultStore = await _storeAppService.GetDefaultAsync(); StoreId = defaultStore.Id; } StoreName = (await _storeAppService.GetAsync(StoreId.Value)).Name; }
public async Task OnGetAsync() { var dto = await _service.GetAsync(Id); Store = ObjectMapper.Map <StoreDto, CreateEditStoreViewModel>(dto); }
public Task <StoreDto> GetAsync(Guid id) { return(_service.GetAsync(id)); }
public virtual async Task OnGetAsync() { StoreName = (await _storeAppService.GetAsync(StoreId)).Name; }