public void fileWriterType(string filePath, TypeOfOwnership type) { StreamWriter sw = new StreamWriter("DIR\\" + filePath + ".txt", false, System.Text.Encoding.UTF8); sw.WriteLine($"Вид продукции: {type.getTypeOfOwnership()}"); sw.Close(); }
public Enterprise() { outlay = 0; income = 0; profit = 0; netprofit = 0; inputData(); type = new TypeOfOwnership(); Console.WriteLine("Ввод закупки: "); createProduction(); outlayProduction(); Console.WriteLine("Ввод поставки: "); createSupply(); outlaySupply(); Console.WriteLine($"Общие затраты за год: {outlay}"); Console.WriteLine($"Доходы за год: {income}"); profitCallculating(); netprofitCallculating(); Console.WriteLine("================================"); printInfo(); printProduction(); printSupply(); }