public List <Order> GetWeeklyOrders() { int year = DateTime.Now.Year; var week = ConverterManager.GetWeek(DateTime.Now); var oders = table.ToList().Where(s => s.date.Year == year && ConverterManager.GetWeek(s.date) == week).ToList(); return(oders); }
public List <Order> GetWeeklyOrdersForAStore(int storeID) { int year = DateTime.Now.Year; int week = ConverterManager.GetWeek(DateTime.Now); var orders = GetOrdersByStoreID(storeID).Where(s => s.date.Year == year && ConverterManager.GetWeek(s.date) == week).ToList(); return(orders); }
public List <Payment> GetWeeklyPaymentsForAStore(int storeID) { int year = DateTime.Now.Year; int week = ConverterManager.GetWeek(DateTime.Now); var payments = GetPaymentsForAStore(storeID).Where(s => s.date.Year == year && ConverterManager.GetWeek(s.date) == week).ToList(); return(payments); }