/// <summary>
        /// Updates the average annual kWh and best annual kWh amounts for each benchmark type by assessing those
        /// attributes of each property in the database.
        /// </summary>
        internal static void updateBenchmarkStats()
        {
            EMMediator mediator = new EMMediator();

            List<BenchmarkProperty> benchmarks = mediator.DataManager.getBenchmarkProperties();
            foreach(BenchmarkProperty benchmark in benchmarks)
            {
                benchmark.typeAveragekWh = mediator.DataManager.getTypeAverageAnnualkWh(benchmark.Id);
                benchmark.typeBestkWh = mediator.DataManager.getTypeBestAnnualkWh(benchmark.Id);
                mediator.DataManager.editBenchmark(benchmark.Id, benchmark);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Updates the average annual kWh and best annual kWh amounts for each benchmark type by assessing those
        /// attributes of each property in the database.
        /// </summary>
        internal static void updateBenchmarkStats()
        {
            EMMediator mediator = new EMMediator();

            List <BenchmarkProperty> benchmarks = mediator.DataManager.getBenchmarkProperties();

            foreach (BenchmarkProperty benchmark in benchmarks)
            {
                benchmark.typeAveragekWh = mediator.DataManager.getTypeAverageAnnualkWh(benchmark.Id);
                benchmark.typeBestkWh    = mediator.DataManager.getTypeBestAnnualkWh(benchmark.Id);
                mediator.DataManager.editBenchmark(benchmark.Id, benchmark);
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Returns a list of anonymous properties with postcode and annual costs populated.
        /// </summary>
        /// <returns>List[AnonymousProperty] with postcode and annual cost for each property in the database</returns>
        internal static List <AnonymousProperty> getAllPropertyAnnualCosts()
        {
            EMMediator               mediator      = new EMMediator();
            List <Property>          allProperties = mediator.DataManager.getAllProperties();
            List <AnonymousProperty> result        = new List <AnonymousProperty>();

            foreach (Property property in allProperties)
            {
                AnonymousProperty anonProperty = new AnonymousProperty();
                anonProperty.Postcode   = property.Postcode;
                anonProperty.AnnualCost = property.AnnualCost;
                anonProperty.Id         = property.Id;

                result.Add(anonProperty);
            }

            return(result);
        }
        /// <summary>
        /// Returns a list of anonymous properties with postcode and annual costs populated.
        /// </summary>
        /// <returns>List[AnonymousProperty] with postcode and annual cost for each property in the database</returns>
        internal static List<AnonymousProperty> getAllPropertyAnnualCosts()
        {
            EMMediator mediator = new EMMediator();
            List<Property> allProperties = mediator.DataManager.getAllProperties();
            List<AnonymousProperty> result = new List<AnonymousProperty>();

            foreach (Property property in allProperties)
            {
                AnonymousProperty anonProperty = new AnonymousProperty();
                anonProperty.Postcode = property.Postcode;
                anonProperty.AnnualCost = property.AnnualCost;
                anonProperty.Id = property.Id;

                result.Add(anonProperty);
            }

            return result;
        }
Exemplo n.º 5
0
 internal InvoiceManager()
 {
     mediator = new EMMediator();
 }
 internal TariffManager()
 {
     mediator = new EMMediator();
 }
 internal AccountManager()
 {
     mediator = new EMMediator();
 }
Exemplo n.º 8
0
 internal AccountManager()
 {
     mediator = new EMMediator();
 }
 internal MeterManager()
 {
     mediator = new EMMediator();
 }
Exemplo n.º 10
0
 internal TariffManager()
 {
     mediator = new EMMediator();
 }
Exemplo n.º 11
0
 internal MeterManager()
 {
     mediator = new EMMediator();
 }
 /// <summary>
 /// Constructor
 /// </summary>
 internal PropertyManager()
 {
     mediator = new EMMediator();
 }
 internal InvoiceManager()
 {
     mediator = new EMMediator();
 }
 internal AnnotationManager()
 {
     mediator = new EMMediator();
 }
Exemplo n.º 15
0
 internal AnnotationManager()
 {
     mediator = new EMMediator();
 }
Exemplo n.º 16
0
 /// <summary>
 /// Constructor
 /// </summary>
 internal PropertyManager()
 {
     mediator = new EMMediator();
 }