protected async override void OnConfirmCommand() { if (PriceListItems == null || PriceListItems.Count == 0) { return; } if (string.IsNullOrEmpty(Entity.Name)) { return; } switch (ActionType) { case ActionType.Add: await ApiClient.AddPriceListAsync(Entity, PriceListItems); break; case ActionType.Edit: await ApiClient.UpdatePriceListAsync(Entity.Id, Entity, PriceListItems); break; } DialogResult = true; if (Close != null) { Close.Invoke(); } }