Esempio n. 1
0
        //btn add category COMPLITED
        private async void btnAddCat_Click(object sender, EventArgs e)
        {
            Category category = new Category();

            if (!txtCatName.Text.Equals(""))
            {
                category.CategoryName = txtCatName.Text;
                category.Description  = txtCatDes.Text;
                await ControlerMethods.SetCategoryAsync(category);

                txtCatDes.Text          = "";
                txtCatName.Text         = "";
                DataCategory.DataSource = await ControlerMethods.GetCategoryAsync();
            }
        }