public ReportTableViewModel GetOrdersOverview() { return(m_cache.ReadThrough($"ordersOverview_{m_session.Project.Id}", TimeSpan.FromMinutes(10), () => { var report = new ReportTableViewModel(); foreach (var row in m_purchaseOrderRepository.GetOrdersOverview(DateTime.Now.AddMonths(-1), DateTime.Now)) { report[row.ErpName, "ERP"] = row.ErpName; report[row.ErpName, m_statusTranslator.Translate(row.StatusId)] = row.Count.ToString(); } return report; })); }
public string Translate(int statusId) { return(m_translator.Translate(statusId)); }