Пример #1
0
        // GET: Item/Delete/5
        public ActionResult Delete(int id)
        {
            ItemComponent itemComponent = new ItemComponent();


            return(View(itemComponent.ReadBy(id)));
        }
Пример #2
0
        // GET: Item/Edit/5
        public ActionResult Edit(int id)
        {
            Item item = new Item();

            ItemComponent     itemComponent     = new ItemComponent();
            TipoItemComponent tipoItemComponent = new TipoItemComponent();

            item           = itemComponent.ReadBy(id);
            item.ListaTipo = tipoItemComponent.Read();
            item.ListaTipo.Select(y =>
                                  new
            {
                y.Id,
                y.tipoItem
            });
            ViewBag.ListaCategoria = new SelectList(item.ListaTipo, "Id", "tipoItem");



            return(View(item));
        }