示例#1
0
        public async Task <Models.ConData.User> CreateUser(Models.ConData.User user)
        {
            OnUserCreated(user);

            context.Users.Add(user);
            context.SaveChanges();

            return(user);
        }
示例#2
0
        public async Task <Models.ConData.User> CancelUserChanges(Models.ConData.User item)
        {
            var entity = context.Entry(item);

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

            return(item);
        }
示例#3
0
        protected async System.Threading.Tasks.Task Form0Submit(SoccerLeagueTransferApp.Models.ConData.User args)
        {
            try
            {
                var conDataUpdateUserResult = await ConData.UpdateUser(UserID, user);

                DialogService.Close(user);
            }
            catch (System.Exception conDataUpdateUserException)
            {
                NotificationService.Notify(NotificationSeverity.Error, $"Error", $"Unable to update User");
            }
        }
示例#4
0
        protected async System.Threading.Tasks.Task Load()
        {
            user = new SoccerLeagueTransferApp.Models.ConData.User()
            {
            };

            userRoles = "";

            await CheckUserStatus();

            confirmPassword = "";

            userRoleNames = new List <string>()
            {
            };
        }
示例#5
0
        public async Task <Models.ConData.User> UpdateUser(int?userId, Models.ConData.User user)
        {
            OnUserUpdated(user);

            var item = context.Users
                       .Where(i => i.UserID == userId)
                       .FirstOrDefault();

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

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

            return(user);
        }
示例#6
0
        protected async System.Threading.Tasks.Task Load()
        {
            var conDataGetClubDetailsResult = await ConData.GetClubDetails();

            getClubDetailsResult = conDataGetClubDetailsResult;

            user = new SoccerLeagueTransferApp.Models.ConData.User()
            {
            };

            confirmPassword = "";

            var conDataGetRolesResult = await ConData.GetRoles();

            getRolesResult = conDataGetRolesResult;

            userRoleNames = new List <string>()
            {
            };
        }
        protected async System.Threading.Tasks.Task Grid0RowSelect(SoccerLeagueTransferApp.Models.ConData.User args)
        {
            var dialogResult = await DialogService.OpenAsync <EditUsers>("Edit Users", new Dictionary <string, object>() { { "UserID", args.UserID } });

            await InvokeAsync(() => { StateHasChanged(); });
        }
 protected async System.Threading.Tasks.Task Form0Submit(SoccerLeagueTransferApp.Models.ConData.User args)
 {
     await MuyikEditUser();
 }
示例#9
0
 protected async System.Threading.Tasks.Task Load()
 {
     user = new SoccerLeagueTransferApp.Models.ConData.User()
     {
     };
 }
示例#10
0
 protected async System.Threading.Tasks.Task Form0Submit(SoccerLeagueTransferApp.Models.ConData.User args)
 {
     await ChangeUserPassword();
 }
示例#11
0
 partial void OnUserCreated(Models.ConData.User item);
示例#12
0
 partial void OnUserGet(Models.ConData.User item);
示例#13
0
 partial void OnUserDeleted(Models.ConData.User item);