Beispiel #1
0
        private async void DeleteSelectedSupplement()
        {
            if (SelectedSupplement != null)
            {
                await _payrollSupplementEmployeeEndpoint.DeleteSupplement(SelectedSupplement.Id);

                Supplements.Remove(SelectedSupplement);
            }
        }
Beispiel #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
            });
        }
Beispiel #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
            });
        }
Beispiel #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);
        }
Beispiel #5
0
 public bool HasSupplement(string name)
 {
     return(Supplements.ContainsKey(name));
 }
Beispiel #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);
                }
            });
        }
Beispiel #7
0
 public int CalculateCost() => Price + Supplements?.Where(a => a.IsChecked).Sum(a => a.Price) ?? 0;
 protected string ReturnToSupplementsIndex()
 {
     return($"/{ManagerRole.ToLower()}/{Supplements.ToLower()}");
 }