private async void DeleteSelectedSupplement() { if (SelectedSupplement != null) { await _payrollSupplementEmployeeEndpoint.DeleteSupplement(SelectedSupplement.Id); Supplements.Remove(SelectedSupplement); } }
public Latte(int price, ProductGroup.ProductsGroups productsClassifications, List <Supplement> supplements = null) : base(price, productsClassifications, supplements) { Name = "Латте"; Supplements.Add(new Milk(10) { IsNotRequrement = false }); }
public Cappuccino(int price, ProductGroup.ProductsGroups productsClassifications, List <Supplement> supplements = null) : base(price, productsClassifications, supplements) { Name = "Капучино"; Supplements.Add(new Milk(10) { IsNotRequrement = false }); Supplements.Add(new MilkyFoam(15) { IsNotRequrement = false }); }
private Result(Result result, string supplementName, IDictionary <string, string> supplement) { Status = result.Status; Exception = result.Exception; foreach (var pair in result.Supplements) { Supplements.Add(pair); } if (HasSupplement(supplementName)) { throw new ArgumentException($"Result already has supplement named: {supplementName}", nameof(supplementName)); } Supplements.Add(supplementName, supplement); }
public bool HasSupplement(string name) { return(Supplements.ContainsKey(name)); }
private async void ProcessItem() { var entries = await _payrollArchivePrepare.CreateJournalEntries(Payrolls.ToList(), SelectedArchive, AccountingSettings, Supplements.ToList()); var parameters = new DialogParameters(); parameters.Add("entries", entries); _showDialog.ShowDialog("ProcessToJournal", parameters, result => { if (result.Result == ButtonResult.OK) { SelectedArchive.Knjizen = true; _archiveEndpoint.MarkAsProcessed(SelectedArchive.Id); } }); }
public int CalculateCost() => Price + Supplements?.Where(a => a.IsChecked).Sum(a => a.Price) ?? 0;
protected string ReturnToSupplementsIndex() { return($"/{ManagerRole.ToLower()}/{Supplements.ToLower()}"); }