Beispiel #1
0
        //Clase Listar
        public DataTable Listar()
        {
            tblDatos = new DataTable();
            //Se trae los parametros que hay en el procedimeinto almacenado el cual es el 1
            try
            {
                cnGeneral = new clsDatos();

                SqlParameter[] parParameter = new SqlParameter[1];

                parParameter[0] = new SqlParameter();
                parParameter[0].ParameterName = "@opc";
                parParameter[0].SqlDbType     = SqlDbType.Int;
                parParameter[0].SqlValue      = objContacto.opc;


                tblDatos = cnGeneral.RetornaTabla(parParameter, "SPContacto");
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }

            return(tblDatos);
        }
Beispiel #2
0
        //RETORA TABLA CON LOS CONTACTOS
        public DataTable Listar()
        {
            tblDatos = new DataTable();

            try
            {
                cnGeneral = new clsDatos();

                SqlParameter[] parParameter = new SqlParameter[1];

                parParameter[0] = new SqlParameter();
                parParameter[0].ParameterName = "@opc";
                parParameter[0].SqlDbType     = SqlDbType.Int;
                parParameter[0].SqlValue      = objContacto.opc;


                tblDatos = cnGeneral.RetornaTabla(parParameter, "SPContacto");
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }

            return(tblDatos);
        }