Ejemplo n.º 1
0
        public string InvoiceAsString(DateTime invoiceDate)
        {
            if (type.Equals(Type.WithEndDate) && !endDateTime.Equals(invoiceDate))
            {
                return("");
            }
            if (type.Equals(Type.WithoutEndDate) &&
                !invoiceDate.Day.Equals(DateTime.DaysInMonth(endDateTime.Year, endDateTime.Month)))
            {
                return("");
            }

            return(GetBillAsString(BillNumber.GetCurrent(), invoiceDate));
        }
Ejemplo n.º 2
0
        // Выставление счёта
        public void InvoiceProject(DateTime invoiceDate)
        {
            string invoice = InvoiceAsString(invoiceDate);

            if (invoice.Equals(""))
            {
                return;
            }

            string filename = BillNumber.GetCurrent() + ".txt";

            File.WriteAllText(filename, invoice);
            BillNumber.Next();
        }