wip billing
This commit is contained in:
parent
1092f75fc4
commit
1bffe247e3
4 changed files with 27 additions and 25 deletions
|
|
@ -63,12 +63,12 @@
|
|||
<Entry.Behaviors>
|
||||
<behaviors:DecimalValidatorBehavior x:Name="unitCostValidator" />
|
||||
</Entry.Behaviors>
|
||||
<Image x:Name="unitaryCostSuccessErrorImage"
|
||||
Style="{Binding Source={x:Reference unitCostValidator},
|
||||
</Entry>
|
||||
<Label Text="€" Style="{StaticResource BigLabel}" />
|
||||
<Image x:Name="unitaryCostSuccessErrorImage"
|
||||
Style="{Binding Source={x:Reference unitCostValidator},
|
||||
Path=IsValid,
|
||||
Converter={StaticResource boolToStyleImage}}" />
|
||||
</Entry>
|
||||
<Label Text="€" Style="{StaticResource BigLabel}" HorizontalTextAlignment="Start"/>
|
||||
</StackLayout>
|
||||
<Button Text="Valider cette ligne de facture" Command="{Binding ValidateCommand}"
|
||||
Clicked="OnValidateClicked"></Button>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
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
|
||||
|
|
@ -15,10 +10,11 @@ namespace BookAStar.Pages
|
|||
{
|
||||
BindingContext = model;
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
|
||||
public void OnValidateClicked (object sender, EventArgs e)
|
||||
{
|
||||
OnBackButtonPressed();
|
||||
this.Navigation.PopAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,6 @@ namespace BookAStar.ViewModels
|
|||
{
|
||||
SetProperty<decimal>(ref unitaryCost, value, "UnitaryCost");
|
||||
data.UnitaryCost = value;
|
||||
UnitaryCostText = value.ToString(unitCostFormat, CultureInfo.InvariantCulture);
|
||||
}
|
||||
}
|
||||
protected int durationValue;
|
||||
|
|
@ -107,20 +106,9 @@ 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<string>(ref unitaryCostText, value, "UnitaryCostText");
|
||||
// TODO update behavior
|
||||
|
||||
}
|
||||
}
|
||||
bool invalidCost;
|
||||
|
|
|
|||
18
BookAStar/BookAStar/Views/CommandLineEditor.xaml.cs
Normal file
18
BookAStar/BookAStar/Views/CommandLineEditor.xaml.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace BookAStar.Views
|
||||
{
|
||||
public partial class CommandLineEditor : ContentView
|
||||
{
|
||||
public CommandLineEditor()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue