fix issue
This commit is contained in:
@ -33,11 +33,13 @@ namespace Billing.Views
|
||||
public decimal Spending => (decimal)GetValue(SpendingProperty);
|
||||
public decimal Balance => (decimal)GetValue(BalanceProperty);
|
||||
|
||||
public Command TitleLongPressed { get; }
|
||||
public Command EditBilling { get; }
|
||||
public Command DeleteBilling { get; }
|
||||
|
||||
public BillPage()
|
||||
{
|
||||
TitleLongPressed = new Command(OnTitleDateLongPressed);
|
||||
EditBilling = new Command(OnEditBilling);
|
||||
DeleteBilling = new Command(OnDeleteBilling);
|
||||
|
||||
@ -50,12 +52,15 @@ namespace Billing.Views
|
||||
{
|
||||
SelectedDate = e.Date;
|
||||
|
||||
var bills = App.Bills.Where(b =>
|
||||
b.CreateTime.Year == e.Date.Year &&
|
||||
b.CreateTime.Month == e.Date.Month &&
|
||||
b.CreateTime.Day == e.Date.Day);
|
||||
Bills = new List<UIBill>(bills.Select(b => WrapBill(b)));
|
||||
RefreshBalance(Bills);
|
||||
Task.Run(() =>
|
||||
{
|
||||
var bills = App.Bills.Where(b =>
|
||||
b.CreateTime.Year == e.Date.Year &&
|
||||
b.CreateTime.Month == e.Date.Month &&
|
||||
b.CreateTime.Day == e.Date.Day);
|
||||
Bills = new List<UIBill>(bills.Select(b => WrapBill(b)));
|
||||
RefreshBalance(Bills);
|
||||
});
|
||||
}
|
||||
|
||||
private void RefreshBalance(List<UIBill> bills)
|
||||
@ -89,7 +94,7 @@ namespace Billing.Views
|
||||
bill.Wallet = App.Accounts.FirstOrDefault(a => a.Id == bill.Bill.WalletId)?.Name;
|
||||
}
|
||||
|
||||
private void OnTitleDateLongPressed(object sender, EventArgs e)
|
||||
private void OnTitleDateLongPressed()
|
||||
{
|
||||
billingDate.SetDateTime(DateTime.Now);
|
||||
}
|
||||
|
Reference in New Issue
Block a user