Example #1
0
        // GET: Furnitures/Edit/5
        public IActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var furniture = _furnitureRepository.Get(id);

            if (furniture == null)
            {
                return(NotFound());
            }
            ViewData["CompanyId"] = new SelectList(_companyDevRepository.GetAll(), "CompanyId", "ComName", furniture.CompanyId);
            ViewData["SubtypeId"] = new SelectList(_subtypeRepository.GetAll(), "SubtypeId", "SubtypeName", furniture.SubtypeId);
            return(View(furniture));
        }