Exemplo n.º 1
0
 public bool Read()
 {
     try
     {
         StringBuilder sb = new StringBuilder();
         sb.Append(string.Format("select * from tipo_cotizacion where id = {0} and descripcion = '{1}';", _id, _descripcion));
         Conexion       con = new Conexion();
         TipoMonedaBase pd  = con.ObtenerMoneda(sb.ToString());
         this._id          = pd.Id;
         this._descripcion = pd.Nombre;
         return(true);
     }
     catch
     {
         return(false);
     }
 }
 public bool ReadNombre()
 {
     try
     {
         StringBuilder sb = new StringBuilder();
         sb.Append(string.Format("select * from tipo_moneda where nombre = '{0}';", _nombre));
         Conexion       con = new Conexion();
         TipoMonedaBase pd  = con.ObtenerMoneda(sb.ToString());
         this._id      = pd.Id;
         this._nombre  = pd.Nombre;
         this._simbolo = pd.Simbolo;
         return(true);
     }
     catch
     {
         return(false);
     }
 }