// GET: MotherBoard/Create
        public ActionResult Create()
        {
            var sockets = _cpuSocketService.GetCPUSockets();

            ViewBag.Sockets = new SelectList(sockets, "Id", "Name");
            var manufacturers = _manufacturerService.GetManufacturers();

            ViewBag.Manufacturers = new SelectList(manufacturers, "Id", "Name");
            var motherBoardFormFactors = _motherBoardFormFactorService.GetMotherBoardFormFactors();

            ViewBag.MotherBoardFormFactors = new SelectList(motherBoardFormFactors, "Id", "Name");
            var motherBoardNothernBridges = _northBridgeService.GetMotherBoardNorthBridges();

            ViewBag.MotherBoardNothernBridges = new SelectList(motherBoardNothernBridges, "Id", "Name");
            var outerMemoryInterfaces = _outerMemoryInterfaceService.GetOuterMemoryInterfaces();

            ViewBag.OuterMemoryInterfaces = new SelectList(outerMemoryInterfaces, "Id", "Name");
            var videoCardInterfaces = _videoCardInterfaceService.GetVideoCardInterfaces().Select(m => new VideoCardInterfaceViewModel()
            {
                Id = m.Id, Name = m.Name, Multiplier = m.Multiplier, Version = m.Version
            });

            ViewBag.VideoCardInterfaces = new SelectList(videoCardInterfaces, "Id", "FullName");
            var powerSupplyMotherBoardInterfaces = _powerSupplyMotherBoardInterfaceService.GetPowerSupplyMotherBoardInterfaces();

            ViewBag.PowerSupplyMotherBoardInterfaces = new SelectList(powerSupplyMotherBoardInterfaces, "Id", "Name");
            var ramTypes = _ramTypeService.GetRAMTypes();

            ViewBag.RamTypes = new SelectList(ramTypes, "Id", "Name");
            return(View());
        }
        // GET: PowerSupplyMotherBoardInterface
        public ActionResult Index()
        {
            var powerSupplyMotherBoardInterfaces = _powerSupplyMotherBoardInterfaceService.GetPowerSupplyMotherBoardInterfaces().OrderBy(m => m.Name);

            var model = powerSupplyMotherBoardInterfaces.Select(m => new PowerSupplyMotherBoardInterfaceViewModel
            {
                Id   = m.Id,
                Name = m.Name
            });

            return(View(model));
        }
Beispiel #3
0
        // GET: PowerSupply/Create
        public ActionResult Create()
        {
            var powerSuppliesMotherboardInterfaces = _motherBoardPowerSupplyInterfaceService.GetPowerSupplyMotherBoardInterfaces();

            ViewBag.PowerSuppliesMotherboardInterfaces = new SelectList(powerSuppliesMotherboardInterfaces, "Id", "Name");
            var manufacturers = _manufacturerService.GetManufacturers();

            ViewBag.Manufacturers = new SelectList(manufacturers, "Id", "Name");
            var powerSupplyCPUInterfaces = _powerSupplyCPUInterfaceService.GetPowerSupplyCPUInterfaces();

            ViewBag.PowerSupplyCPUInterfaces = new SelectList(powerSupplyCPUInterfaces, "Id", "Name");
            return(View());
        }