// // GET: /CuentaGastosDetalle/Edit/5 public ActionResult Edit(int id) { CuentaGastosDetalle cgd = new CuentaGastosDetalle() { IdCuentaGastosDetalle = id }; var model = cgd.verCuentaGastosDetalle(); ViewBag.CuentaGastoId = cgd.CuentaGastoId; ConceptosServiceModel cs = new ConceptosServiceModel(); List <ConceptosServiceModel> lis = new List <ConceptosServiceModel>(); // lis.Add(new ConceptosServiceModel { IdConcepto = 0, Nombre = "Selecciona una opcion" }); foreach (ConceptosServiceModel concepto in cs.GetListCuentaGastos()) { lis.Add(new ConceptosServiceModel { IdConcepto = concepto.IdConcepto, Nombre = concepto.Nombre }); } SelectList lista = new SelectList(lis, "IdConcepto", "Nombre", 0); ViewBag.Lista = lista; return(View(model)); }
// // GET: /CuentaGastosDetalle/Delete/5 public ActionResult Delete(int id) { CuentaGastosDetalle cgd = new CuentaGastosDetalle() { IdCuentaGastosDetalle = id }; return(View(cgd.verCuentaGastosDetalle())); }