category management
This commit is contained in:
@ -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()
|
||||
|
Reference in New Issue
Block a user