Exemplo n.º 1
0
        private void btnUpdateCategory_Click(object sender, EventArgs e)
        {
            if (!(String.IsNullOrEmpty(txtCategoryName.Text) || String.IsNullOrWhiteSpace(txtCategoryName.Text)))
            {
                GeneralMethods.UpdateCategory(CID, txtCategoryName.Text);
                MessageBox.Show("Category successfully updated!");
                this.Close();
            }

            else
            {
                MessageBox.Show("Please enter a valid name for the category!", "Error");
            }
        }