Example #1
0
 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
            }
        }
Example #3
0
        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;
        }
Example #4
0
        public async Task OnGetAsync()
        {
            var dto = await _service.GetAsync(Id);

            Store = ObjectMapper.Map <StoreDto, CreateEditStoreViewModel>(dto);
        }
Example #5
0
 public Task <StoreDto> GetAsync(Guid id)
 {
     return(_service.GetAsync(id));
 }
Example #6
0
 public virtual async Task OnGetAsync()
 {
     StoreName = (await _storeAppService.GetAsync(StoreId)).Name;
 }