async Task SuccessFullySaved() { ClearSelections(); LoadGrid(); StateHasChanged(); await SuccessNotification.Show(); }
public async Task HandleValidSubmit() { if (UserId > 0) { await UserHttpRepository.UpdateUser(UserInfo); Saved = true; Message = "修改成功"; CssClass = "alert alert-success"; } else { var userInfo = await UserHttpRepository.AddUserinfo(UserInfo); if (userInfo != null) { _notification.Show(); } else { Saved = false; Message = "新增失败"; CssClass = "alert alert-danger"; } } }
protected async Task SaveLocation() { Db.PortDetails.Add(portForm.ToPortDetails()); await Db.SaveChangesAsync(); locations = await Db.Locations.ToArrayAsync(); portsGridView = locations .SelectMany(p => p.Ports) .Where(AreValidRecords) .Select(p => PortDetailsGridView.FromPort(p)) .ToArray(); portForm = new PortDetailsForm(); await EditorPanel.HideAsync(); await SuccessNotification.Show(); }
protected async Task SaveLocation() { Db.PortDetails.Add(portForm.ToPortDetails()); try { await Db.SaveChangesAsync(); } catch (System.Exception) { await FailNotification.Show(); } portsGridView = await LoadPortsViewModel(); portForm = new PortDetailsForm(); await EditorPanel.HideAsync(); await SuccessNotification.Show(); }
private async Task Update() { await ApartmentRepo.UpdateAsync(_apartment); _notification.Show(); }
private async System.Threading.Tasks.Task Create() { await ProductRepo.CreateProduct(_product); _notification.Show(); }
private async Task Create() { await ProductRepo.CreateProduct(_product); _notification.Show(); }
private async Task Update() { await RegionRepo.UpdateAsync(_region); _notification.Show(); }
private async Task Update() { await HouseRepo.UpdateAsync(_house); _notification.Show(); }