public void UpdateQuote (Quote quote)
 {
     if (quote.Id == 0)
     {
         quote.Id = _quotes.Count + 1;
         _quotes.Add(quote);
     }
     else
     {
         var oldQuote = _quotes.Find(c => c.Id == quote.Id);
         oldQuote.CustomerName = quote.CustomerName;
         oldQuote.Total = quote.Total;
     }
 }
Exemple #2
0
 public override async Task Init(object initData)
 {			
     Quote = initData as Quote;
     if (Quote == null)
         Quote = new Quote ();
 }
 public override void Init (object initData)
 {			
     Quote = initData as Quote;
     if (Quote == null)
         Quote = new Quote ();
 }