Пример #1
0
        public async Task <Models.ConData.Player> CancelPlayerChanges(Models.ConData.Player item)
        {
            var entity = context.Entry(item);

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

            return(item);
        }
Пример #2
0
        public async Task <Models.ConData.Player> CreatePlayer(Models.ConData.Player player)
        {
            OnPlayerCreated(player);

            context.Players.Add(player);
            context.SaveChanges();

            return(player);
        }
        protected async System.Threading.Tasks.Task Form0Submit(SoccerLeagueTransferApp.Models.ConData.Player args)
        {
            try
            {
                var conDataCreatePlayerResult = await ConData.CreatePlayer(player);

                DialogService.Close(player);
            }
            catch (System.Exception conDataCreatePlayerException)
            {
                NotificationService.Notify(NotificationSeverity.Error, $"Error", $"Unable to create new Player!");
            }
        }
Пример #4
0
        protected async System.Threading.Tasks.Task Load()
        {
            var conDataGetGendersResult = await ConData.GetGenders();

            getGendersResult = conDataGetGendersResult;

            var conDataGetClubDetailsResult = await ConData.GetClubDetails();

            getClubDetailsResult = conDataGetClubDetailsResult;

            var conDataGetPlayerPositionsResult = await ConData.GetPlayerPositions();

            getPlayerPositionsResult = conDataGetPlayerPositionsResult;

            player = new SoccerLeagueTransferApp.Models.ConData.Player()
            {
            };
        }
Пример #5
0
        public async Task <Models.ConData.Player> UpdatePlayer(int?playerId, Models.ConData.Player player)
        {
            OnPlayerUpdated(player);

            var item = context.Players
                       .Where(i => i.PlayerID == playerId)
                       .FirstOrDefault();

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

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

            return(player);
        }
 protected async System.Threading.Tasks.Task Form0Submit(SoccerLeagueTransferApp.Models.ConData.Player args)
 {
     await MuyikDeletePlayer();
 }
        protected async System.Threading.Tasks.Task Load()
        {
            var conDataGetPlayerByPlayerIdResult = await ConData.GetPlayerByPlayerId(PlayerID);

            player = conDataGetPlayerByPlayerIdResult;
        }
Пример #8
0
        protected async System.Threading.Tasks.Task Grid0RowSelect(SoccerLeagueTransferApp.Models.ConData.Player args)
        {
            var dialogResult = await DialogService.OpenAsync <EditPlayer>("Edit Player", new Dictionary <string, object>() { { "PlayerID", args.PlayerID } });

            await InvokeAsync(() => { StateHasChanged(); });
        }
Пример #9
0
 partial void OnPlayerUpdated(Models.ConData.Player item);
Пример #10
0
 partial void OnPlayerGet(Models.ConData.Player item);
Пример #11
0
 partial void OnPlayerDeleted(Models.ConData.Player item);