//Eliminar contacto
        public int?eliminarCont(int id_contacto)
        {
            int?regAfec;

            using (DataAccessLayer dal = new DataAccessLayer())
            {
                var            connection  = dal.AbrirConexion();
                SqlTransaction transaction = connection.BeginTransaction();
                try
                {
                    regAfec = dal.EjecutarEliminacion(transaction, connection, id_contacto);
                    transaction.Commit();

                    return(regAfec);
                }
                catch (Exception e)
                {
                    transaction.Rollback();
                    return(null);
                }
                finally
                {
                    transaction.Dispose();
                }
            }
        }
        //Busqueda de contactos segun filtro
        public List <Contacto> EjecutarConsultaFiltro(Filtro filter)
        {
            try
            {
                using (DataAccessLayer dal = new DataAccessLayer())
                {
                    var connection = dal.AbrirConexion();
                    //DataSet ds = dal.EjecutarQueryConPaginado(connection, filter);

                    DataSet ds = dal.ConsultarContactosFilter(connection, filter);
                    return(SetDsContactos(ds));
                }
            }
            catch (Exception e)
            {
                throw new Exception("ERROR GENERAL EN AgendaABM.EjecutarConsultaFiltro", e);
            }
        }