Пример #1
0
        //GET: Bead/Details/{id}
        public ActionResult Details(int id)
        {
            var svc   = new BeadService();
            var model = svc.GetBeadById(id);

            return(View(model));
        }
Пример #2
0
        //GET:Bead/Edit/{id}
        public ActionResult Edit(int id)
        {
            var service = new BeadService();
            var detail  = service.GetBeadById(id);
            var model   = new BeadEdit
            {
                BeadId      = detail.BeadId,
                Brand       = detail.Brand,
                Type        = detail.Type,
                SubType     = detail.SubType,
                Shape       = detail.Shape,
                Size        = detail.Size,
                Color       = detail.Color,
                Quantity    = detail.Quantity,
                Cost        = detail.Cost,
                Description = detail.Description,
                LocationId  = detail.LocationId,
                SourceId    = detail.SourceId,
                FileAsBytes = detail.FileAsBytes,
                ImageFile   = detail.ImageFile
            };

            return(View(model));
        }