public IActionResult Index()
        {
            ValidateSession();
            _configurationLogic          = new Lms_ConfigurationLogic(_cache, new EntityFrameworkGenericRepository <Lms_ConfigurationPoco>(_dbContext));
            ViewBag.DefaultFuelSurcharge = _configurationLogic.GetSingleById(1).DefaultFuelSurcharge;

            _cityLogic        = new App_CityLogic(_cache, new EntityFrameworkGenericRepository <App_CityPoco>(_dbContext));
            ViewBag.Cities    = _cityLogic.GetList();
            _provinceLogic    = new App_ProvinceLogic(_cache, new EntityFrameworkGenericRepository <App_ProvincePoco>(_dbContext));
            ViewBag.Provinces = _provinceLogic.GetList();
            _countryLogic     = new App_CountryLogic(_cache, new EntityFrameworkGenericRepository <App_CountryPoco>(_dbContext));
            ViewBag.Countries = _countryLogic.GetList();

            return(View(GetCustomerData(0)));
        }
        private ViewModel_Employee GetEmployeeData()
        {
            ViewModel_Employee employeeViewModel = new ViewModel_Employee();

            employeeViewModel.Employees = _employeeLogic.GetList();

            _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));

            employeeViewModel.Cities    = _cityLogic.GetList();
            employeeViewModel.Provinces = _provinceLogic.GetList();
            employeeViewModel.Countries = _countryLogic.GetList();

            return(employeeViewModel);
        }
        public ReportController(IMemoryCache cache, IHostingEnvironment hostingEnvironment, IHttpContextAccessor httpContext, LogisticsContext dbContext)
        {
            _dbContext          = dbContext;
            _cache              = cache;
            _hostingEnvironment = hostingEnvironment;
            _httpContext        = httpContext;

            _orderLogic             = new Lms_OrderLogic(_cache, new EntityFrameworkGenericRepository <Lms_OrderPoco>(_dbContext));
            _customerLogic          = new Lms_CustomerLogic(_cache, new EntityFrameworkGenericRepository <Lms_CustomerPoco>(_dbContext));
            _addressMappingLogic    = new Lms_CustomerAddressMappingLogic(_cache, new EntityFrameworkGenericRepository <Lms_CustomerAddressMappingPoco>(_dbContext));
            _addressLogic           = new Lms_AddressLogic(_cache, new EntityFrameworkGenericRepository <Lms_AddressPoco>(_dbContext));
            _invoiceLogic           = new Lms_InvoiceLogic(_cache, new EntityFrameworkGenericRepository <Lms_InvoicePoco>(_dbContext));
            _additionalServiceLogic = new Lms_OrderAdditionalServiceLogic(_cache, new EntityFrameworkGenericRepository <Lms_OrderAdditionalServicePoco>(_dbContext));
            _paymentMethodLogic     = new Lms_PaymentMethodLogic(_cache, new EntityFrameworkGenericRepository <Lms_PaymentMethodPoco>(_dbContext));
            _paymentCollectionLogic = new Lms_InvoicePaymentCollectionLogic(_cache, new EntityFrameworkGenericRepository <Lms_InvoicePaymentCollectionPoco>(_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));
            _bankLogic     = new Lms_BankLogic(_cache, new EntityFrameworkGenericRepository <Lms_BankPoco>(_dbContext));
        }
        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));
        }
Exemple #5
0
 public CountryController(IMemoryCache cache, LogisticsContext dbContext)
 {
     _cache        = cache;
     _dbContext    = dbContext;
     _countryLogic = new App_CountryLogic(_cache, new EntityFrameworkGenericRepository <App_CountryPoco>(_dbContext));
 }