Пример #1
0
        private async void DeleteSelectedSupplement()
        {
            if (SelectedSupplement != null)
            {
                await _payrollSupplementEmployeeEndpoint.DeleteSupplement(SelectedSupplement.Id);

                Supplements.Remove(SelectedSupplement);
            }
        }
Пример #2
0
        public Latte(int price, ProductGroup.ProductsGroups productsClassifications, List <Supplement> supplements = null) : base(price, productsClassifications, supplements)
        {
            Name = "Латте";

            Supplements.Add(new Milk(10)
            {
                IsNotRequrement = false
            });
        }
Пример #3
0
        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
            });
        }
Пример #4
0
        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);
        }
Пример #5
0
 public bool HasSupplement(string name)
 {
     return(Supplements.ContainsKey(name));
 }
Пример #6
0
        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);
                }
            });
        }
Пример #7
0
 public int CalculateCost() => Price + Supplements?.Where(a => a.IsChecked).Sum(a => a.Price) ?? 0;
 protected string ReturnToSupplementsIndex()
 {
     return($"/{ManagerRole.ToLower()}/{Supplements.ToLower()}");
 }