diff --git a/BookAStar/BookAStar/BookAStar.csproj b/BookAStar/BookAStar/BookAStar.csproj
index bc7344be..ec918cbb 100644
--- a/BookAStar/BookAStar/BookAStar.csproj
+++ b/BookAStar/BookAStar/BookAStar.csproj
@@ -47,6 +47,7 @@
+
@@ -143,7 +144,7 @@
-
+
diff --git a/BookAStar/BookAStar/Pages/EditBillingLinePage.xaml b/BookAStar/BookAStar/Pages/EditBillingLinePage.xaml
index dd8b4f38..9f8ad878 100644
--- a/BookAStar/BookAStar/Pages/EditBillingLinePage.xaml
+++ b/BookAStar/BookAStar/Pages/EditBillingLinePage.xaml
@@ -63,12 +63,12 @@
-
-
-
+
+
diff --git a/BookAStar/BookAStar/Pages/EditBillingLinePage.xaml.cs b/BookAStar/BookAStar/Pages/EditBillingLinePage.xaml.cs
index d3678002..2a1d9f3d 100644
--- a/BookAStar/BookAStar/Pages/EditBillingLinePage.xaml.cs
+++ b/BookAStar/BookAStar/Pages/EditBillingLinePage.xaml.cs
@@ -1,5 +1,10 @@
using BookAStar.ViewModels;
using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Input;
using Xamarin.Forms;
namespace BookAStar.Pages
@@ -10,11 +15,10 @@ namespace BookAStar.Pages
{
BindingContext = model;
InitializeComponent();
- }
-
+ }
public void OnValidateClicked (object sender, EventArgs e)
{
- this.Navigation.PopAsync();
+ OnBackButtonPressed();
}
}
}
diff --git a/BookAStar/BookAStar/ViewModels/BillingLineViewModel.cs b/BookAStar/BookAStar/ViewModels/BillingLineViewModel.cs
index 102da3a8..61679112 100644
--- a/BookAStar/BookAStar/ViewModels/BillingLineViewModel.cs
+++ b/BookAStar/BookAStar/ViewModels/BillingLineViewModel.cs
@@ -58,6 +58,7 @@ namespace BookAStar.ViewModels
{
SetProperty(ref unitaryCost, value, "UnitaryCost");
data.UnitaryCost = value;
+ UnitaryCostText = value.ToString(unitCostFormat, CultureInfo.InvariantCulture);
}
}
protected int durationValue;
@@ -106,9 +107,20 @@ namespace BookAStar.ViewModels
set
{
+ if (unitaryCostText != value)
+ {
+ try
+ {
+ data.UnitaryCost = decimal.Parse(value, CultureInfo.InvariantCulture);
+ }
+ catch (Exception)
+ {
+ // TODO Error model
+ // UI should shoud entry as wearing a wrong value
+ // thanks to its `Behaviors`
+ }
+ }
SetProperty(ref unitaryCostText, value, "UnitaryCostText");
- // TODO update behavior
-
}
}
bool invalidCost;