コード例 #1
0
        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);
        }
コード例 #2
0
 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);
     }
 }
コード例 #3
0
 public static int Guardar(Metadet2Logica met)
 {
     string[] parametros = { "@Usuario", "@Real" };
     return(AccesoDatos.Actualizar("sp_mant_metadet2", parametros, met.Usuario, met.Real));
 }