private void OutputDataInTables(int month)
        {
            var tableExpenses         = new ConsoleTable($"Количество месяцев", "Аренда", "Зарплата", "Закупка", "Итого");
            var tableRevenueFromSales = new ConsoleTable("№", "Цена продажи", "Наценка", "Количество", "Итого с продаж");

            tableExpenses.AddRow(month.ToString(), (calculater.AnalyticsOfShop.TotalRentalSpace * month).ToString(),
                                 (calculater.AnalyticsOfShop.TotalSalary * month).ToString(),
                                 (calculater.AnalyticsOfShop.TotalPurchasePriceOfGood * month).ToString(),
                                 (calculater.AnalyticsOfShop.TotalExpenses * month).ToString());


            foreach (var good in calculater.GetGoods())
            {
                tableRevenueFromSales.AddRow(1.ToString(),
                                             (good.SalePrice * month).ToString(),
                                             (good.Margin * month).ToString(),
                                             (good.Count * month).ToString(),
                                             (good.TotalRevenueFromSales * month).ToString());
            }

            Console.WriteLine("Затраты");
            tableExpenses.Print();
            Console.WriteLine();
            Console.WriteLine("Доход от продажи товара");
            tableRevenueFromSales.Print();

            Console.WriteLine($"Доход {calculater.AnalyticsOfShop.Revenue * month} Расход {calculater.AnalyticsOfShop.TotalExpenses * month}");
            Console.WriteLine($"Прибыль за {month} {Endings.GetNewWord("месяц", month)} составила:{calculater.Delta.DeltaFromShop}");

            calculater.Clear();
            Console.ReadLine();
        }
Exemplo n.º 2
0
        public void Calculate()
        {
            SetBudget();
            SetSalaryForImployeesDefault();
            SetRentalSpace();
            SetToyPricePurchace();
            CalculateCountToys();
            SetToyPriceSale();
            SetNumberOfMonths();
            calculater.CalculateRevenue(month);
            toFill?.Invoke(month, bubgetDublicat);
            draw?.Invoke(month);

            calculater.Clear();
            Console.ReadLine();
        }