Exemplo n.º 1
0
        private async void btnOk_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(tbShopId.Text))
            {
                lbError.Text = "Не заполнено ShopId";
                return;
            }
            if (string.IsNullOrEmpty(tbShopRegion.Text))
            {
                lbError.Text = "Не заполнено ShopRegion";
                return;
            }

            var result = await MQueryCommand.TryInsertNewShopAsync(tbShopId.Text, tbShopRegion.Text);

            if (result.IsComplete)
            {
                DialogResult = DialogResult.OK;
            }
            else
            {
                lbError.Text = result.Message;
            }
        }