public static int?GetInvoiceNumber(string connString) { int fiscalYearId = GetFiscalYear(connString).FiscalYearId; DanpheEMR.DalLayer.BillingDbContext billDbContext = new DalLayer.BillingDbContext(connString); int?invoiceNumber = (from txn in billDbContext.BillingTransactions where txn.FiscalYearId == fiscalYearId select txn.InvoiceNo).DefaultIfEmpty(0).Max(); return(invoiceNumber + 1); }
public DateTime GetCounterDay_Active(string connString) { DateTime currCounterDay = (DateTime)DanpheCache.Get("currCounterDay"); if (currCounterDay == null) { DanpheEMR.DalLayer.BillingDbContext billingDbcontext = new DalLayer.BillingDbContext(connString); } return(currCounterDay); }