示例#1
0
        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;
            }));
        }
示例#2
0
 public string Translate(int statusId)
 {
     return(m_translator.Translate(statusId));
 }