Quote GetQuote() { var registry = new CalculateTransaction.ViewModel(); foreach (var sevice in SelectedServices) { registry.AddService.Execute(sevice); } var profile = new ProfileServer().GetProfile(); _quote = new Quote() { Id = Guid.NewGuid().ToString(), TypeName = STATEMENT_TYPE_QUOTE, Title = Title, UserId = profile.Id, CloudSynced = false, CreatedOn = DateTime.Now, StatementNumber = GetStatementNumber(), Profile = profile, Services = new List<Service>(SelectedServices), Address = new Address(), Total = registry.Total, Subtotal = registry.Subtotal, Tax = registry.Tax }; Subtotal = _quote.Subtotal; Tax = _quote.Tax; Total = _quote.Total; return _quote; }
void OnRequestQuoteResponse(object obj) => _quote = obj as Quote;
protected override void SaveData(Quote quote) => _database.OnSave(quote);