コード例 #1
0
        public Dictionary <InstallationModel, List <InstallationState> > getInstallationState(int customerid)
        {
            Dictionary <InstallationModel, List <InstallationState> > istate = new Dictionary <InstallationModel, List <InstallationState> >();

            try
            {
                List <InstallationState> tmp = new List <InstallationState>();
                foreach (var installation in irepo.GetByCustomerId(customerid))
                {
                    tmp = mrepo.getCurrentValues(installation);
                    istate.Add(installation, tmp);
                }
                log.Info("InstallationState für Kunden " + customerid + " wurde erstellt.");
            }
            catch (DalException exp)
            {
                log.Error("InstallationState von Kunden " + customerid + " konnte nicht erstellt werden.");
                throw new BLException("InstallationState von Kunden " + customerid + " konnte nicht erstellt werden.", exp);
            }
            return(istate);
        }
コード例 #2
0
        public List <InstallationModel> getInstallations(CustomerModel customer)
        {
            List <InstallationModel> tmp;

            try
            {
                log.Info("Fetching Installation from customer id" + customer.customerid);
                tmp = irepo.GetByCustomerId(customer.customerid);
            }
            catch (DalException exp)
            {
                log.Error("Cannot fetch Installations from customer id " + customer.customerid, exp);
                throw new BLException("Cannot fetch Installations from customer id " + customer.customerid, exp);
            }
            return(tmp);
        }