Example #1
0
        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;
            }
        }
Example #2
0
        public ContactoBE ObtenerContacto(int IdContacto)
        {
            ContactoDA oContactoDA = new ContactoDA();

            try
            {
                return(oContactoDA.ObtenerContacto(IdContacto));
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                oContactoDA = null;
            }
        }
Example #3
0
        public List <ContactoBE> ListarContactos(int IdCliente)
        {
            ContactoDA oContactoDA = new ContactoDA();

            try
            {
                return(oContactoDA.ListarContactos(IdCliente));
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                oContactoDA = null;
            }
        }
Example #4
0
        //
        // GET: /Contacto/

        public ActionResult Index()
        {
            List <Contacto> Contactos = ContactoDA.Seleccionar();

            return(View(Contactos));
        }
Example #5
0
 public ContactoBLL()
 {
     da = new ContactoDA();
 }