Ejemplo n.º 1
0
        public int nRegistrosFiltro(string ape, string nom)
        {
            int nRegistro = 0;

            using (SqlConnection con = new SqlConnection(CadenaConexion))
            {
                try
                {
                    con.Open();
                    cdEmpleado cdEmpleado = new cdEmpleado();
                    nRegistro = cdEmpleado.nRegistrosFiltro(con, ape, nom);
                    con.Close();
                }
                catch (SqlException sx)
                {
                    throw new Exception("Error en SqlException: cnEmpleados.nRegistrosFiltro \n" + sx.Message);
                }
                catch (Exception e)
                {
                    throw new Exception("Error PatataException: cnEmpleados.nRegistrosFiltro \n" + e.Message);
                }
            }
            return(nRegistro);
        }