// 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: OuterMemoryInterface public ActionResult Index() { var motherBoardInterfaces = _motherBoardInterfaceService.GetOuterMemoryInterfaces().OrderBy(m => m.Name); var model = motherBoardInterfaces.Select(m => new OuterMemoryInterfaceViewModel { Id = m.Id, Name = m.Name }); return(View(model)); }
// GET: HDD/Create public ActionResult Create() { var outerMemoryInterfaces = _outerMemoryInterfaceService.GetOuterMemoryInterfaces(); ViewBag.OuterMemoryInterfaces = new SelectList(outerMemoryInterfaces, "Id", "Name"); var outerMemoryFormFactors = _outerMemoryFormFactorService.GetOuterMemoryFormFactors(); ViewBag.OuterMemoryFormFactors = new SelectList(outerMemoryFormFactors, "Id", "Name"); var manufacturers = _manufacturerService.GetManufacturers(); ViewBag.Manufacturers = new SelectList(manufacturers, "Id", "Name"); return(View()); }