public void DeleteTelefono(GEN_PER_TEL Model) { if (Model == null) { throw new ArgumentNullException("Telefono error al deletear"); } db.GEN_PER_TEL.Remove(Model); db.SaveChanges(); }
public ActionResult Create(GEN_PER_TEL Model) { if (this.ModelState.IsValid) { Model.PER_COD = (long)Session["PER_COD"]; this.personaService.CreateTelefono(Model); Session["PER_COD"] = null; return this.RedirectToAction("DetailContribuyente", "Contribuyente", new { id = Model.PER_COD }); } else { return View(Model); } }
public ActionResult Edit(GEN_PER_TEL telefono) { if (ModelState.IsValid) { this.personaService.EditTelefono(telefono); return this.RedirectToAction("DetailContribuyente", "Contribuyente", new { id = telefono.PER_COD }); } else { return View(telefono); } }