WIP estimate
This commit is contained in:
parent
3b57246f80
commit
805e5fcb4f
8 changed files with 42 additions and 17 deletions
|
|
@ -10,6 +10,7 @@ namespace BookAStar.ViewModels.EstimateAndBilling
|
|||
using Model;
|
||||
using Model.Social;
|
||||
using Model.Workflow;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
|
||||
class BookQueryViewModel : ViewModel, IBookQueryData
|
||||
|
|
@ -26,6 +27,10 @@ namespace BookAStar.ViewModels.EstimateAndBilling
|
|||
EventDate = data.EventDate;
|
||||
Previsionnal = data.Previsionnal;
|
||||
Id = data.Id;
|
||||
estimates = new ObservableCollection<Estimate>(
|
||||
DataManager.Current.Estimates.Where(
|
||||
e => e.Query.Id == Id
|
||||
));
|
||||
this.data = data;
|
||||
}
|
||||
private BookQueryData data;
|
||||
|
|
@ -47,19 +52,17 @@ namespace BookAStar.ViewModels.EstimateAndBilling
|
|||
return DataManager.Current.EstimationCache.LocalGet(this.Id);
|
||||
}
|
||||
}
|
||||
public Estimate Estimate { get
|
||||
{
|
||||
return DataManager.Current.Estimates.FirstOrDefault(
|
||||
e=>e.Query.Id == Id
|
||||
);
|
||||
private ObservableCollection<Estimate> estimates;
|
||||
public ObservableCollection<Estimate> Estimates {
|
||||
get {
|
||||
return estimates;
|
||||
} }
|
||||
|
||||
|
||||
public bool EstimationDone
|
||||
{
|
||||
get
|
||||
{
|
||||
return Estimate != null;
|
||||
return Estimates != null && Estimates.Count>0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue