public async Task <Models.ConData.User> CreateUser(Models.ConData.User user) { OnUserCreated(user); context.Users.Add(user); context.SaveChanges(); return(user); }
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); }
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"); } }
protected async System.Threading.Tasks.Task Load() { user = new SoccerLeagueTransferApp.Models.ConData.User() { }; userRoles = ""; await CheckUserStatus(); confirmPassword = ""; userRoleNames = new List <string>() { }; }
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); }
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(); }
protected async System.Threading.Tasks.Task Load() { user = new SoccerLeagueTransferApp.Models.ConData.User() { }; }
protected async System.Threading.Tasks.Task Form0Submit(SoccerLeagueTransferApp.Models.ConData.User args) { await ChangeUserPassword(); }
partial void OnUserCreated(Models.ConData.User item);
partial void OnUserGet(Models.ConData.User item);
partial void OnUserDeleted(Models.ConData.User item);