category management

This commit is contained in:
2022-03-07 17:34:09 +08:00
parent 49e4e46cdb
commit 46464e19dc
131 changed files with 3992 additions and 189 deletions

View File

@ -177,22 +177,16 @@ namespace Billing.Views
}
using (Tap.Start())
{
var source = App.Categories.Select(c => new SelectItem<int>
{
Value = c.Id,
Name = c.Name,
Icon = c.Icon
});
var page = new ItemSelectPage<SelectItem<int>>(source);
page.ItemTapped += Category_ItemTapped;
var page = new CategorySelectPage(categoryId);
page.CategoryTapped += CategorySelectPage_Tapped;
await Navigation.PushAsync(page);
}
}
private void Category_ItemTapped(object sender, SelectItem<int> category)
private void CategorySelectPage_Tapped(object sender, UICategory e)
{
categoryId = category.Value;
SetValue(CategoryNameProperty, category.Name);
categoryId = e.Category.Id;
SetValue(CategoryNameProperty, e.Name);
}
private async void OnSelectWallet()