public static DataTable Consultar(Metadet2Logica met) { DataTable datos = new DataTable(); try { datos = AccesoDatos.Consultar("SELECT * FROM t_metadet2 WHERE usuario = '" + met.Usuario + "' and cast(fecha as date) = cast('" + DateTime.Today + "' as date)"); } catch (Exception ex) { throw ex; } return(datos); }
public static bool Verificar(Metadet2Logica met) { try { string sQuery; sQuery = "SELECT * FROM t_metadet2 WHERE usuario = '" + met.Usuario + "' and cast(fecha as date) = cast('" + DateTime.Today + "' as date)"; DataTable datos = AccesoDatos.Consultar(sQuery); if (datos.Rows.Count != 0) { return(true); } else { return(false); } } catch { return(false); } }
public static int Guardar(Metadet2Logica met) { string[] parametros = { "@Usuario", "@Real" }; return(AccesoDatos.Actualizar("sp_mant_metadet2", parametros, met.Usuario, met.Real)); }