コード例 #1
0
        // 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());
        }
コード例 #2
0
        // GET: VideoCardInterface
        public ActionResult Index()
        {
            var videoCardInterfaces = _videoCardInterfaceService.GetVideoCardInterfaces().OrderBy(m => m.Name);

            var model = videoCardInterfaces.Select(m => new VideoCardInterfaceViewModel
            {
                Id         = m.Id,
                Name       = m.Name,
                Multiplier = m.Multiplier,
                Version    = m.Version
            });

            return(View(model));
        }
コード例 #3
0
        // GET: VideoCard/Create
        public ActionResult Create()
        {
            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 gpus = _gpuService.GetGPUs();

            ViewBag.GPUs = new SelectList(gpus, "Id", "Name");
            var graphicMemoryTypes = _graphicMemoryTypeService.GetGraphicMemoryTypes();

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

            ViewBag.Manufacturers = new SelectList(manufacturers, "Id", "Name");
            return(View());
        }