public int EliminarArtCustodia(artCustodia r) { var rs = new Logica.Repositorio.EliminarArtCustodia(); var ret = rs.EliminarArtCustodiaWcf(r); return(ret); }
public int AgregarArt(artCustodia r) { var rs = new Logica.Repositorio.AgregarArtCustodia(); int ret = rs.agregarArtCustodia(r); return(ret); }
public void Insertar(artCustodia articulosCustodia) { try { ProyectoPR5Entities entities = new ProyectoPR5Entities(); entities.artCustodia.Add(articulosCustodia); entities.SaveChanges(); } catch (Exception ee) { } }
public void Eliminar(artCustodia articulosCustodia) { try { ProyectoPR5Entities entities = new ProyectoPR5Entities(); var result = entities.artCustodia.Find(articulosCustodia.idArticuloCus); entities.artCustodia.Remove(result); entities.SaveChanges(); } catch (Exception ee) { } }
public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } artCustodia artCustodia = db.artCustodia.Find(id); if (artCustodia == null) { return(HttpNotFound()); } return(View(artCustodia)); }
public void Actualizar(artCustodia articulosCustodia) { try { using (ProyectoPR5Entities entities = new ProyectoPR5Entities()) { entities.Entry(articulosCustodia).State = System.Data.Entity.EntityState.Modified; entities.SaveChanges(); } } catch (Exception ee) { } }
public void Insertar(artCustodia articulosCustodia) { try { using (TransactionScope scope = new TransactionScope()) { DAL.Clases.ManarticulosCustodia._Instancia.Insertar(articulosCustodia); scope.Complete(); } } catch (Exception ee) { throw; } }
public ActionResult DeleteConfirmed(int id) { /* artCustodia artCustodia = db.artCustodia.Find(id); * db.artCustodia.Remove(artCustodia); * db.SaveChanges();*/ var sss = new artCustodia(); sss.idArticuloCus = id; Service1Client service = new Service1Client(); service.EliminarArtCustodia(sss); service.Close(); return(RedirectToAction("Index")); }
public ActionResult Create([Bind(Include = "idArticuloCus,nombre,idCategoria,FechaIngreso,descripcion")] artCustodia artCustodia) { string pagina = "Create"; if (ModelState.IsValid) { Service1Client service = new Service1Client(); service.AgregarArt(artCustodia); service.Close(); pagina = "Create"; TempData["msg"] = "<script>alert('Articulo Ingresado');</script>"; ModelState.Clear(); } ViewBag.idCategoria = new SelectList(db.Categoria, "idCategoria", "nombreCategoria", artCustodia.idCategoria); return(View(pagina)); }
public int agregarArtCustodia(artCustodia r) { BL.Clases.ManarticulosCustodia._Instancia.Insertar(r); return(1); }
public int EliminarArtCustodiaWcf(artCustodia r) { BL.Clases.ManarticulosCustodia._Instancia.Eliminar(r); return(1); }