예제 #1
0
        private async void AddCategory_Click(object sender, RoutedEventArgs e)
        {
            var cate = new CategoryDialog(conn);

            cate.Closing += this.UpdateListCategory;
            await cate.ShowAsync();
        }
예제 #2
0
        private async void EditCategory_Click(object sender, RoutedEventArgs e)
        {
            Button   btn      = sender as Button;
            Category category = ListCategory.Where(x => x.CategoryID == int.Parse(btn.Tag.ToString())).ToList().ElementAt(0);
            var      cate     = new CategoryDialog(conn, category);

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