Ejemplo n.º 1
0
        public Dictionary <InstallationModel, List <Statistic> > getStatisticPerDay(int customerid, DateTime date)
        {
            Dictionary <InstallationModel, List <Statistic> > stats = new Dictionary <InstallationModel, List <Statistic> >();

            try
            {
                List <Statistic> tmp = new List <Statistic>();
                foreach (var installation in irepo.GetByCustomerId(customerid))
                {
                    tmp = mrepo.getPerDay(installation, date);
                    stats.Add(installation, tmp);
                }
                log.Info("Statistik für Kunden wurde erstellt.");
            }
            catch (DalException exp)
            {
                log.Error("Statistik für Kunden " + customerid + " konnte nicht erstellt werden.");
                throw new BLException("Statistik für Kunden " + customerid + " konnte nicht erstellt werden.", exp);
            }
            return(stats);
        }