private void getInvoiceCounter() { invoiceCounter = applicationDB.InvoiceCounters .Where(x => x.DocumentType == documentType) .Where(x => x.Year == dateInvoice.Year.ToString()) .Where(x => x.Month == dateInvoice.Month.ToString()) .FirstOrDefault(); }
private void makeInvoiceCounter() { invoiceCounter = new InvoiceCounter { Counter = 1, Year = dateInvoice.Year.ToString(), Month = dateInvoice.Month.ToString(), DocumentType = documentType }; }