Beispiel #1
0
//Edit Product Quantity
        private async void btnChangeIncrease_Click(object sender, EventArgs e)
        {
            Product product = new Product();

            product.Code     = txtSellCode.Text.ToLower().Trim();
            product.Quantity = Convert.ToInt32(txtSellQuantity.Text.Trim());
            try
            {
                await GetAndSetData.IncreaseProductQuantity(product);

                MessageBox.Show("با موفقیت ثبت شد ",
                                "موفق",
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Information);
                await UpdateProductListAndSold();

                txtSellCode.Text     = "";
                txtSellName.Text     = "";
                txtSellQuantity.Text = "";
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + "\n",
                                "خطا",
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Error);
            }
        }