Beispiel #1
0
        private ViewModel_Tariff GetTariffData()
        {
            _tariffLogic         = new Lms_TariffLogic(_cache, new EntityFrameworkGenericRepository <Lms_TariffPoco>(_dbContext));
            _cityLogic           = new App_CityLogic(_cache, new EntityFrameworkGenericRepository <App_CityPoco>(_dbContext));
            _deliveryOptionLogic = new Lms_DeliveryOptionLogic(_cache, new EntityFrameworkGenericRepository <Lms_DeliveryOptionPoco>(_dbContext));
            _vehicleTypeLogic    = new Lms_VehicleTypeLogic(_cache, new EntityFrameworkGenericRepository <Lms_VehicleTypePoco>(_dbContext));
            _unitTypeLogic       = new Lms_UnitTypeLogic(_cache, new EntityFrameworkGenericRepository <Lms_UnitTypePoco>(_dbContext));
            _weightScaleLogic    = new Lms_WeightScaleLogic(_cache, new EntityFrameworkGenericRepository <Lms_WeightScalePoco>(_dbContext));

            ViewModel_Tariff tariffViewModel = new ViewModel_Tariff();

            tariffViewModel.Tariffs         = _tariffLogic.GetList();
            tariffViewModel.Cities          = _cityLogic.GetList();
            tariffViewModel.DeliveryOptions = _deliveryOptionLogic.GetList();
            tariffViewModel.VehicleTypes    = _vehicleTypeLogic.GetList();
            tariffViewModel.UnitTypes       = _unitTypeLogic.GetList();
            tariffViewModel.WeightScales    = _weightScaleLogic.GetList();

            return(tariffViewModel);
        }
        public SearchController(IMemoryCache cache, IEmailService emailService, IHostingEnvironment hostingEnvironment, IHttpContextAccessor httpContext, LogisticsContext dbContext)
        {
            _cache              = cache;
            _dbContext          = dbContext;
            _emailService       = emailService;
            _hostingEnvironment = hostingEnvironment;
            _httpContext        = httpContext;

            _orderLogic    = new Lms_OrderLogic(_cache, new EntityFrameworkGenericRepository <Lms_OrderPoco>(_dbContext));
            _customerLogic = new Lms_CustomerLogic(_cache, new EntityFrameworkGenericRepository <Lms_CustomerPoco>(_dbContext));
            _addressLogic  = new Lms_AddressLogic(_cache, new EntityFrameworkGenericRepository <Lms_AddressPoco>(_dbContext));
            _employeeLogic = new Lms_EmployeeLogic(_cache, new EntityFrameworkGenericRepository <Lms_EmployeePoco>(_dbContext));

            _cityLogic     = new App_CityLogic(_cache, new EntityFrameworkGenericRepository <App_CityPoco>(_dbContext));
            _provinceLogic = new App_ProvinceLogic(_cache, new EntityFrameworkGenericRepository <App_ProvincePoco>(_dbContext));
            _countryLogic  = new App_CountryLogic(_cache, new EntityFrameworkGenericRepository <App_CountryPoco>(_dbContext));

            _unitTypeLogic    = new Lms_UnitTypeLogic(_cache, new EntityFrameworkGenericRepository <Lms_UnitTypePoco>(_dbContext));
            _weightScaleLogic = new Lms_WeightScaleLogic(_cache, new EntityFrameworkGenericRepository <Lms_WeightScalePoco>(_dbContext));

            _deliveryOptionLogic   = new Lms_DeliveryOptionLogic(_cache, new EntityFrameworkGenericRepository <Lms_DeliveryOptionPoco>(_dbContext));
            _vehicleTypeScaleLogic = new Lms_VehicleTypeLogic(_cache, new EntityFrameworkGenericRepository <Lms_VehicleTypePoco>(_dbContext));
        }
Beispiel #3
0
 public VehicleTypeController(IMemoryCache cache, LogisticsContext dbContext)
 {
     _dbContext        = dbContext;
     _vehicleTypeLogic = new Lms_VehicleTypeLogic(_cache, new EntityFrameworkGenericRepository <Lms_VehicleTypePoco>(_dbContext));
 }