Пример #1
0
        protected async System.Threading.Tasks.Task Load()
        {
            await CheckUserStatus();

            var conDataGetPlayerPositionByPositionIdResult = await ConData.GetPlayerPositionByPositionId(PositionID);

            playerposition = conDataGetPlayerPositionByPositionIdResult;
        }
        protected async System.Threading.Tasks.Task Load()
        {
            playerposition = new SoccerLeagueTransferApp.Models.ConData.PlayerPosition()
            {
            };

            await CheckUserStatus();
        }
Пример #3
0
        public async Task <Models.ConData.PlayerPosition> CreatePlayerPosition(Models.ConData.PlayerPosition playerPosition)
        {
            OnPlayerPositionCreated(playerPosition);

            context.PlayerPositions.Add(playerPosition);
            context.SaveChanges();

            return(playerPosition);
        }
Пример #4
0
        protected async System.Threading.Tasks.Task Form0Submit(SoccerLeagueTransferApp.Models.ConData.PlayerPosition args)
        {
            try
            {
                var conDataUpdatePlayerPositionResult = await ConData.UpdatePlayerPosition(PositionID, playerposition);

                DialogService.Close(playerposition);
            }
            catch (System.Exception conDataUpdatePlayerPositionException)
            {
                NotificationService.Notify(NotificationSeverity.Error, $"Error", $"Unable to update PlayerPosition");
            }
        }
 protected async System.Threading.Tasks.Task Form0Submit(SoccerLeagueTransferApp.Models.ConData.PlayerPosition args)
 {
     await MuyikDeletePlayerPosition();
 }
Пример #6
0
        public async Task <Models.ConData.PlayerPosition> UpdatePlayerPosition(int?positionId, Models.ConData.PlayerPosition playerPosition)
        {
            OnPlayerPositionUpdated(playerPosition);

            var item = context.PlayerPositions
                       .Where(i => i.PositionID == positionId)
                       .FirstOrDefault();

            if (item == null)
            {
                throw new Exception("Item no longer available");
            }
            var entry = context.Entry(item);

            entry.CurrentValues.SetValues(playerPosition);
            entry.State = EntityState.Modified;
            context.SaveChanges();

            return(playerPosition);
        }
Пример #7
0
 partial void OnPlayerPositionUpdated(Models.ConData.PlayerPosition item);
Пример #8
0
        public async Task <Models.ConData.PlayerPosition> CancelPlayerPositionChanges(Models.ConData.PlayerPosition item)
        {
            var entity = context.Entry(item);

            entity.CurrentValues.SetValues(entity.OriginalValues);
            entity.State = EntityState.Unchanged;

            return(item);
        }
Пример #9
0
 partial void OnPlayerPositionGet(Models.ConData.PlayerPosition item);
        protected async System.Threading.Tasks.Task Grid0RowSelect(SoccerLeagueTransferApp.Models.ConData.PlayerPosition args)
        {
            var dialogResult = await DialogService.OpenAsync <EditPlayerPosition>("Edit Player Position", new Dictionary <string, object>() { { "PositionID", args.PositionID } });

            await InvokeAsync(() => { StateHasChanged(); });
        }