WIP estimate

This commit is contained in:
Paul Schneider 2016-11-25 14:48:11 +01:00
commit 3b57246f80
22 changed files with 407 additions and 52 deletions

View file

@ -9,11 +9,14 @@ namespace BookAStar.ViewModels.EstimateAndBilling
using Interfaces;
using Model;
using Model.Social;
using Model.Workflow;
using System.Linq;
class BookQueryViewModel : ViewModel, IBookQueryData
{
public BookQueryViewModel()
{
}
public BookQueryViewModel(BookQueryData data)
{
@ -44,11 +47,28 @@ 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
);
} }
public bool EstimationDone
{
get
{
return Estimate != null;
}
}
public string EditEstimateButtonText
{
get
{
return DraftEstimate != null ? "Editer le devis" : "Faire un devis" ;
return DraftEstimate != null ?
Strings.EditEstimate : Strings.DoEstimate;
}
}
}