public ActionResult Create(Obra obra, int id) { BLLObra bll = new BLLObra(); obra.IdCliente = id; obra.id = 0; bll.CreateObra(obra); return(RedirectToAction("Index", new { id = id })); }
public ActionResult Index(int id, string search, int?page) { var cp = new BLLObra(); var lista = cp.ListByCompanyID(id); if (search == null) { search = ""; } return(View(lista.Where(x => x.Nombre.ToUpper().StartsWith(search.ToUpper())).ToList().ToPagedList(page ?? 1, 10))); }