Exemplo n.º 1
0
        // GET: PSU/Details/5
        public ActionResult Details(int id)
        {
            var service = new PSUService();
            var model   = service.GetPSUById(id);

            return(View(model));
        }
Exemplo n.º 2
0
        // GET: PSU/Delete/5
        public ActionResult Delete(int id)
        {
            var service = new PSUService();
            var model   = service.GetPSUById(id);

            if (model == null)
            {
                return(HttpNotFound());
            }
            return(View(model));
        }
Exemplo n.º 3
0
        // GET: PSU/Edit/5
        public ActionResult Edit(int id)
        {
            var service = new PSUService();
            var detail  = service.GetPSUById(id);
            var model   = new PSUEdit
            {
                PsuId            = detail.PsuId,
                Name             = detail.Name,
                Manufacturer     = detail.Manufacturer,
                Type             = detail.Type,
                EffeciencyRating = detail.EffeciencyRating,
                TypeOfModular    = detail.TypeOfModular,
                Color            = detail.Color,
                Fanless          = detail.Fanless,
                ATXConnectors    = detail.ATXConnectors,
                IsAvailable      = detail.IsAvailable
            };

            return(View(model));
        }