diff --git a/BookAStar/BookAStar/App.xaml b/BookAStar/BookAStar/App.xaml
index 617bae21..926c83f0 100644
--- a/BookAStar/BookAStar/App.xaml
+++ b/BookAStar/BookAStar/App.xaml
@@ -24,6 +24,7 @@
#30AAAAFA
+ #30FAFAFA
#207AFAFA
#FF103010
#FF303010
@@ -44,8 +45,11 @@
@@ -83,6 +87,8 @@
+
+
\ No newline at end of file
diff --git a/BookAStar/BookAStar/Helpers/LocaLEntity.cs b/BookAStar/BookAStar/Helpers/LocaLEntity.cs
index 6ec0f775..3a24c71c 100644
--- a/BookAStar/BookAStar/Helpers/LocaLEntity.cs
+++ b/BookAStar/BookAStar/Helpers/LocaLEntity.cs
@@ -10,7 +10,9 @@ namespace BookAStar
public class LocalEntity : ObservableCollection, ILocalEntity where K : IEquatable
{
public V CurrentItem { get; protected set; }
+
public Func GetKey { get; set; }
+
public LocalEntity(Func getKey) : base()
{
if (getKey == null) throw new InvalidOperationException();
@@ -28,6 +30,7 @@ namespace BookAStar
Add(item);
CurrentItem = item;
}
+
public V LocalGet(K key)
{
CurrentItem = this.Single(x => GetKey(x).Equals(key));
@@ -38,6 +41,11 @@ namespace BookAStar
{
this.Populate();
}
+
+ public void Load(string subKey)
+ {
+ this.Populate(subKey);
+ }
}
}
\ No newline at end of file
diff --git a/BookAStar/BookAStar/Helpers/MainSettings.cs b/BookAStar/BookAStar/Helpers/MainSettings.cs
index 8da30074..2f8bbd75 100644
--- a/BookAStar/BookAStar/Helpers/MainSettings.cs
+++ b/BookAStar/BookAStar/Helpers/MainSettings.cs
@@ -33,7 +33,6 @@ namespace BookAStar
#region Setting Constants
public static readonly string SettingsDefault = string.Empty;
public static readonly string EntityDataSettingsPrefix = "Ed";
- public static readonly string EntityCursorSettingsPrefix = "Ec";
private const string userNameKey = "user_id";
private const string PushNotificationsKey = "pushNotifs";
private const string AllowGPSUsageKey = "allowGPSUsage";
diff --git a/BookAStar/BookAStar/Interfaces/IEstimate.cs b/BookAStar/BookAStar/Interfaces/IEstimate.cs
index 9a1f92b3..662546cd 100644
--- a/BookAStar/BookAStar/Interfaces/IEstimate.cs
+++ b/BookAStar/BookAStar/Interfaces/IEstimate.cs
@@ -5,9 +5,9 @@ namespace BookAStar.Model.Interfaces
{
public interface IEstimate
{
- List AttachedFiles { get; set; }
- List AttachedGraphics { get; }
- List Bill { get; set; }
+ IList AttachedFiles { get; set; }
+ IList AttachedGraphics { get; }
+ IList Bill { get; set; }
string ClientId { get; set; }
long? CommandId { get; set; }
string CommandType { get; set; }
diff --git a/BookAStar/BookAStar/Interfaces/ILocalEntity.cs b/BookAStar/BookAStar/Interfaces/ILocalEntity.cs
index 38988e9f..8e1f1945 100644
--- a/BookAStar/BookAStar/Interfaces/ILocalEntity.cs
+++ b/BookAStar/BookAStar/Interfaces/ILocalEntity.cs
@@ -7,6 +7,11 @@ namespace BookAStar
void Load();
}
+ public interface IPersistentOnDemand : ILoadable
+ {
+ void Save();
+ }
+
public interface ILocalEntity : ILoadable where K : IEquatable
{
V CurrentItem { get; }
diff --git a/BookAStar/BookAStar/Model/Workflow/Estimate.cs b/BookAStar/BookAStar/Model/Workflow/Estimate.cs
index cce5645a..ba82c9a4 100644
--- a/BookAStar/BookAStar/Model/Workflow/Estimate.cs
+++ b/BookAStar/BookAStar/Model/Workflow/Estimate.cs
@@ -14,7 +14,7 @@ namespace BookAStar.Model.Workflow
public string Description { get; set; }
public int? Status { get; set; }
public string Title { get; set; }
- public List Bill { get; set; }
+ public IList Bill { get; set; }
///
/// List of attached graphic files
/// to this estimate, as relative pathes to
@@ -22,7 +22,7 @@ namespace BookAStar.Model.Workflow
/// In db, they are separated by :
///
///
- public List AttachedGraphics { get; set; }
+ public IList AttachedGraphics { get; set; }
public string AttachedGraphicsString
{
@@ -36,7 +36,7 @@ namespace BookAStar.Model.Workflow
/// In db, they are separated by :
///
///
- public List AttachedFiles { get; set; }
+ public IList AttachedFiles { get; set; }
public string AttachedFilesString
{
get { return AttachedFiles == null ? null : string.Join(":", AttachedFiles); }
diff --git a/BookAStar/BookAStar/Pages/EditEstimatePage.xaml b/BookAStar/BookAStar/Pages/EditEstimatePage.xaml
index 78bbe098..88c9f693 100644
--- a/BookAStar/BookAStar/Pages/EditEstimatePage.xaml
+++ b/BookAStar/BookAStar/Pages/EditEstimatePage.xaml
@@ -37,8 +37,9 @@
>
-
-
+
+
@@ -54,51 +55,20 @@
-
+ Grid.Row="0" Grid.Column="3"
+ FontFamily="Monospace">
-
+
diff --git a/BookAStar/BookAStar/Pages/EditEstimatePage.xaml.cs b/BookAStar/BookAStar/Pages/EditEstimatePage.xaml.cs
index d8a397bf..6d5bfb10 100644
--- a/BookAStar/BookAStar/Pages/EditEstimatePage.xaml.cs
+++ b/BookAStar/BookAStar/Pages/EditEstimatePage.xaml.cs
@@ -25,6 +25,18 @@ namespace BookAStar.Pages
BindingContext = model;
}
+ protected override void OnBindingContextChanged()
+ {
+ base.OnBindingContextChanged();
+ ((EditEstimateViewModel)BindingContext).PropertyChanged += EditEstimatePage_PropertyChanged;
+
+ }
+
+ private void EditEstimatePage_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
+ {
+
+ }
+
protected void OnNewCommanLine(object sender, EventArgs e)
{
var com = new BillingLine() { Count = 1, UnitaryCost = 0.01m };
diff --git a/BookAStar/BookAStar/ViewModels/EditEstimateViewModel.cs b/BookAStar/BookAStar/ViewModels/EditEstimateViewModel.cs
index 94f88ea0..64961538 100644
--- a/BookAStar/BookAStar/ViewModels/EditEstimateViewModel.cs
+++ b/BookAStar/BookAStar/ViewModels/EditEstimateViewModel.cs
@@ -18,6 +18,13 @@ namespace BookAStar.ViewModels
AttachedFiles = new ObservableCollection(data.AttachedFiles);
AttachedGraphicList = new ObservableCollection(data.AttachedGraphics);
Bill = new ObservableCollection(data.Bill);
+ Bill.CollectionChanged += Bill_CollectionChanged;
+ }
+
+ private void Bill_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
+ {
+ Data.Bill = Bill;
+ NotifyPropertyChanged("FormattedTotal");
}
public Estimate Data { get; protected set; }