public ActionResult GuiasBalancesLineasUpdate([ModelBinder(typeof(DevExpressEditorsBinder))] GuiasBalancesLineasModel item) { var items = GetListGuiasBalancesLineas; try { if (ModelState.IsValid) { var EditItem = items.Single(s => s.Id == item.Id); EditItem.GuiaId = item.GuiaId; EditItem.GuiasBalancesId = item.GuiasBalancesId; EditItem.Id = item.Id; EditItem.InformeId = item.InformeId; EditItem.orden = item.orden; EditItem.signo = item.signo; EditItem.signoea = item.signoea; SetListGuiasBalancesLineas(items); } } catch (Exception ex) { throw; } return(PartialView("_GuiasBalancesLineasGrid", items)); }
public ActionResult GuiasBalancesLineasAddNew([ModelBinder(typeof(DevExpressEditorsBinder))] GuiasBalancesLineasModel item) { var items = GetListGuiasBalancesLineas; item.Id = items.Count() + 1; try { if (ModelState.IsValid) { items.Add(item); SetListGuiasBalancesLineas(items); } } catch (Exception ex) { throw; } return(PartialView("_GuiasBalancesLineasGrid", items)); }