Exemple #1
0
        // GET: VideoCard/Details/5
        public ActionResult Details(int id)
        {
            var service = new VideoCardService();
            var model   = service.GetVideoCardById(id);

            return(View(model));
        }
Exemple #2
0
        // GET: VideoCard/Edit/5
        public ActionResult Edit(int id)
        {
            var service = new VideoCardService();
            var detail  = service.GetVideoCardById(id);
            var model   = new VideoCardEdit
            {
                VideoId            = detail.VideoId,
                Name               = detail.Name,
                Manufacturer       = detail.Manufacturer,
                Chipset            = detail.Chipset,
                MemoryType         = detail.MemoryType,
                CoreClock          = detail.CoreClock,
                BoostClock         = detail.BoostClock,
                SLICrossfire       = detail.SLICrossfire,
                FrameSync          = detail.FrameSync,
                Length             = detail.Length,
                ThermalDesignPower = detail.ThermalDesignPower,
                DVIPorts           = detail.DVIPorts,
                HDMIPorts          = detail.HDMIPorts,
                MiniHDMIPorts      = detail.MiniHDMIPorts,
                DisplayPorts       = detail.DisplayPorts,
                ExpansionSlotWidth = detail.ExpansionSlotWidth,
                Cooling            = detail.Cooling,
                IsAvailable        = detail.IsAvailable
            };

            return(View(model));
        }
Exemple #3
0
        // GET: VideoCard/Delete/5
        public ActionResult Delete(int id)
        {
            var service = new VideoCardService();
            var model   = service.GetVideoCardById(id);

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