示例#1
0
        private async void AddSubCategory_Click(object sender, RoutedEventArgs e)
        {
            var cate = new SubCategoryDialog(conn);

            cate.Closing += this.UpdateListSubCategory;
            await cate.ShowAsync();
        }
示例#2
0
        private async void EditSubCategory_Click(object sender, RoutedEventArgs e)
        {
            Button      btn         = sender as Button;
            SubCategory subCategory = ListSubCategory.Where(x => x.SubCategoryID == int.Parse(btn.Tag.ToString())).ToList().ElementAt(0);
            var         cate        = new SubCategoryDialog(conn, subCategory);

            cate.Closing += this.UpdateListSubCategory;
            await cate.ShowAsync();
        }