Esempio n. 1
0
        // GET: MOBA/Details/5
        public ActionResult Details(int id)
        {
            var service = new MOBAService();
            var model   = service.GetMOBAById(id);

            return(View(model));
        }
Esempio n. 2
0
        // GET: MOBA/Edit/5
        public ActionResult Edit(int id)
        {
            var service = new MOBAService();
            var detail  = service.GetMOBAById(id);
            var model   = new MOBAEdit
            {
                MotherboardId      = detail.MotherboardId,
                Name               = detail.Name,
                Manufacturer       = detail.Manufacturer,
                Socket             = detail.Socket,
                FormFactor         = detail.FormFactor,
                MemoryMax          = detail.MemoryMax,
                MemorySlots        = detail.MemorySlots,
                Color              = detail.Color,
                Chipset            = detail.Chipset,
                PCIEX16Slots       = detail.PCIEX16Slots,
                PCIEX8Slots        = detail.PCIEX8Slots,
                PCIEX4Slots        = detail.PCIEX4Slots,
                PCISlots           = detail.PCISlots,
                EthernetPorts      = detail.EthernetPorts,
                M2Slots            = detail.M2Slots,
                Sata3GBsPorts      = detail.Sata3GBsPorts,
                Sata6GBsPorts      = detail.Sata6GBsPorts,
                SataExpressPorts   = detail.MSataSlots,
                OnboardVideo       = detail.OnboardVideo,
                OnboardUSB3Headers = detail.OnboardUSB3Headers,
                WifiNetworking     = detail.WifiNetworking,
                IsAvailable        = detail.IsAvailable,
            };

            return(View(model));
        }
Esempio n. 3
0
        // GET: MOBA/Delete/5
        public ActionResult Delete(int id)
        {
            var service = new MOBAService();
            var model   = service.GetMOBAById(id);

            if (model == null)
            {
                return(HttpNotFound());
            }
            return(View(model));
        }