예제 #1
0
 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();
 }
예제 #2
0
        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);
            }
        }
예제 #3
0
 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);
     }
 }