public bool IsProfitableStocktakeForDay(Stocktake stocktake, DateTime day) { bool isDayOfStocktake = stocktake.DayOfStocktake.Date.Equals(day.Date); bool isProfitable = stocktake.Profit > 0; return(isDayOfStocktake && isProfitable); }
public List <string> GetAllStocktakeResourcesNames(Stocktake stocktake) { List <string> allResources = new List <string>(); foreach (var medicine in stocktake.Medicines) { allResources.Add(medicine.Key); } foreach (var vitamin in stocktake.Vitamins) { allResources.Add(vitamin.Key); } return(allResources); }