public bool EliminarContacto(int IdContacto, out string mensaje) { ContactoDA objContactoDA = new ContactoDA(); try { using (TransactionScope transaccion = new TransactionScope(TransactionScopeOption.Required)) { if (objContactoDA.EliminarContacto(IdContacto, out mensaje)) { transaccion.Complete(); return(true); } else { transaccion.Dispose(); return(false); } } } catch (Exception ex) { throw ex; } }
public ContactoBE ObtenerContacto(int IdContacto) { ContactoDA oContactoDA = new ContactoDA(); try { return(oContactoDA.ObtenerContacto(IdContacto)); } catch (Exception ex) { throw ex; } finally { oContactoDA = null; } }
public List <ContactoBE> ListarContactos(int IdCliente) { ContactoDA oContactoDA = new ContactoDA(); try { return(oContactoDA.ListarContactos(IdCliente)); } catch (Exception ex) { throw ex; } finally { oContactoDA = null; } }
// // GET: /Contacto/ public ActionResult Index() { List <Contacto> Contactos = ContactoDA.Seleccionar(); return(View(Contactos)); }
public ContactoBLL() { da = new ContactoDA(); }