Beispiel #1
0
        public async Task GetRays(int FrequencyId)
        {
            Rays = new List <Ray>();
            Rays = await _apiService.RayList(FrequencyId);

            UpdatedRays?.Invoke();
        }
Beispiel #2
0
        public async Task GetRays(int FrequencyId)
        {
            Rays = new List <Ray>();
            Rays = await http.GetJsonAsync <List <Ray> >($"/api/Ray/{FrequencyId}");

            UpdatedRays?.Invoke();
        }
Beispiel #3
0
        public async Task UnPrismRay(int RayId)
        {
            if (CurrentUser.Id == 0)
            {
                await GetOrCreateUser();
            }
            Rays = await _apiService.UnPrismRay(RayId, CurrentUser.Id);

            UpdatedRays?.Invoke();
        }
Beispiel #4
0
        public async Task UnPrismRay(int RayId)
        {
            if (CurrentUser.Id == 0)
            {
                _navigationManager.NavigateTo("/login");
            }
            Rays = await _apiService.UnPrismRay(RayId, CurrentUser.Id);

            UpdatedRays?.Invoke();
        }
Beispiel #5
0
        public async Task UnPrismRay(int RayId)
        {
            if (CurrentUser.Id == 0)
            {
                await GetOrCreateUser();
            }
            Rays = await http.GetJsonAsync <List <Ray> >($"/api/Prism/Remove/{CurrentUser.Id}/{RayId}");

            UpdatedRays?.Invoke();
        }
Beispiel #6
0
        public async Task PrismRay(int RayId)
        {
            if (CurrentUser.Id == 0)
            {
                await GetOrCreateUser();
            }
            Rays = await _apiService.PrismRay(new Prism()
            {
                RayId = RayId, UserId = CurrentUser.Id
            });

            UpdatedRays?.Invoke();
        }
Beispiel #7
0
        public async Task PrismRay(int RayId)
        {
            if (CurrentUser.Id == 0)
            {
                _navigationManager.NavigateTo("/login");
            }
            Rays = await _apiService.PrismRay(new Prism()
            {
                RayId = RayId, UserId = CurrentUser.Id
            });

            UpdatedRays?.Invoke();
        }
Beispiel #8
0
        public async Task PrismRay(int RayId)
        {
            if (CurrentUser.Id == 0)
            {
                await GetOrCreateUser();
            }
            Rays = await http.PostJsonAsync <List <Ray> >("/api/Prism/Add", new Prism()
            {
                RayId = RayId, UserId = CurrentUser.Id
            });

            UpdatedRays?.Invoke();
        }
Beispiel #9
0
        public async Task CreateRay(string text)
        {
            var ray = new Ray()
            {
                FrequencyId = selectedFrequency.Value,
                Text        = text,
                UserId      = CurrentUser.Id
            };

            if (CurrentUser.Id == 0)
            {
                _navigationManager.NavigateTo("/login");
                ray.UserId = CurrentUser.Id;
            }

            Rays = await _apiService.AddRay(ray);

            UpdatedRays?.Invoke();
        }
Beispiel #10
0
        public async Task CreateRay(string text)
        {
            var ray = new Ray()
            {
                FrequencyId = selectedFrequency.Value,
                Text        = text,
                UserId      = CurrentUser.Id
            };

            if (CurrentUser.Id == 0)
            {
                await GetOrCreateUser();

                ray.UserId = CurrentUser.Id;
            }

            Rays = await _apiService.AddRay(ray);

            UpdatedRays?.Invoke();
        }
Beispiel #11
0
        public async Task CreateRay(string text)
        {
            var ray = new Ray()
            {
                FrequencyId = selectedFrequency.Value,
                Text        = text,
                UserId      = CurrentUser.Id
            };

            if (CurrentUser.Id == 0)
            {
                await GetOrCreateUser();

                ray.UserId = CurrentUser.Id;
            }

            Rays = await http.PostJsonAsync <List <Ray> >("/api/Ray/Add", ray);

            UpdatedRays?.Invoke();
        }