private async void AddPoteryashkaButton_Click(object sender, EventArgs e) { var createPoteryashka = new PoteryashkaForm(); if (createPoteryashka.ShowDialog() == DialogResult.OK) { await clien.AddPoteryashkaAsync(createPoteryashka.Poteryashka); LoadPoteryashkasWithFormParams(); } }
private async void EditToolStripMenuItem_Click(object sender, EventArgs e) { var poteryashka = this.poteryashkasListView.SelectedItems[0].Tag as Poteryashka; var createPoteryashka = new PoteryashkaForm(poteryashka); if (createPoteryashka.ShowDialog() == DialogResult.OK) { await clien.UpdatePoteryashkaAsync(createPoteryashka.Poteryashka); LoadPoteryashkasWithFormParams(); } }