Ejemplo n.º 1
0
 public ActionResult Edit(int id, FormCollection collection)
 {
     try
     {
         // TODO: Add update logic here
         ItemComponent itemComponent = new ItemComponent();
         Item          item          = new Item();
         item.Id         = id;
         item.porcentaje = int.Parse(collection.Get("porcentaje"));
         item.item       = collection.Get("item");
         item.Tipo.Id    = int.Parse(collection.Get("Tipo.tipoItem"));
         itemComponent.Update(item);
         return(RedirectToAction("Index"));
     }
     catch (Exception e)
     {
         return(View());
     }
 }