public VehicleVersionViewModel AddNewVehicleVerison()
        {
            VehicleModelRepository      vehicleModelRepository      = new VehicleModelRepository(new AutoSolutionContext());
            TransmissionTypeRepository  transmissionTypeRepository  = new TransmissionTypeRepository(new AutoSolutionContext());
            VehicleEngineTypeRepository vehicleEngineTypeRepository = new VehicleEngineTypeRepository(new AutoSolutionContext());
            VehicleVersionViewModel     vehicleVersionViewModel     = new VehicleVersionViewModel()
            {
                VehicleManufacturerList = vehicleModelRepository.GetVehicleManufacturerDropDown(),
                VehicleModelList        = vehicleModelRepository.GetVehicleModelDropDownEmpty(),
                TransmissionTypeList    = transmissionTypeRepository.GetTransmissionTypeDownEmpty(),
                EngineTypeList          = vehicleEngineTypeRepository.GetVehicleEngineTypeDropDownEmpty(),
            };

            return(vehicleVersionViewModel);
        }
Example #2
0
        public PartsProductsViewModel AddNewPartsProducts()
        {
            VehicleModelRepository             vehicleModelRepository             = new VehicleModelRepository(new AutoSolutionContext());
            PartsSubCategoryRepository         partsSubCategoryRepository         = new PartsSubCategoryRepository(new AutoSolutionContext());
            TransmissionTypeRepository         transmissionTypeRepository         = new TransmissionTypeRepository(new AutoSolutionContext());
            VehicleEngineTypeRepository        vehicleEngineTypeRepository        = new VehicleEngineTypeRepository(new AutoSolutionContext());
            PartsProductManufacturerRepository partsProductManufacturerRepository = new PartsProductManufacturerRepository(new AutoSolutionContext());
            PartsProductsViewModel             partsProductsViewModel             = new PartsProductsViewModel()
            {
                VehicleManufacturerList      = vehicleModelRepository.GetVehicleManufacturerDropDown(),
                PartsProductsCategoryList    = partsSubCategoryRepository.GetPartsProductCategoryDropDown(),
                PartsProductsSubCategoryList = partsSubCategoryRepository.GetPartsProductSubCategoryDropDownEmpty(),
                PartProductManufacturerList  = partsProductManufacturerRepository.GetPPManufacturerDropDownEmpty(),
                VehicleModelList             = vehicleModelRepository.GetVehicleModelDropDownEmpty(),
                //TransmissionTypeList = transmissionTypeRepository.GetTransmissionTypeDownEmpty(),
                //EngineTypeList = vehicleEngineTypeRepository.GetVehicleEngineTypeDropDownEmpty(),
            };

            return(partsProductsViewModel);
        }