public DataTable ObtenerCatalogoAlimentos() { metodo_datos method = new metodo_datos(); DataTable table; SqlCommand sql_command; sql_command = method.GetCommand(); sql_command.CommandText = "SELECT * FROM CatalogoAlimentos"; table = method.ExecSearch(sql_command); return(table); }
public DataTable ObtenerUltimaMedida(string CorreoCliente) { metodo_datos method = new metodo_datos(); DataTable table; SqlCommand sql_command; sql_command = method.GetCommand(); sql_command.Parameters.Add("@Correo", SqlDbType.NVarChar); sql_command.CommandText = "Select Max(FechaMedida) as UltimaMedida from Medida Where CorreoCliente = @Correo"; sql_command.Parameters[0].Value = CorreoCliente; table = method.ExecSearch(sql_command); return(table); }
public DataTable BuscarUsuarioTodo(string Correo) { metodo_datos method = new metodo_datos(); DataTable table; SqlCommand sql_command; sql_command = method.GetCommand(); sql_command.Parameters.Add("@Correo", SqlDbType.NVarChar); sql_command.CommandText = "SELECT * FROM Persona WHERE Correo = @Correo"; sql_command.Parameters[0].Value = Correo; table = method.ExecSearch(sql_command); return(table); }
public DataTable ObtenerMedicionCompleta(string CodigoMedida) { metodo_datos method = new metodo_datos(); SqlCommand sql_command; DataTable table; sql_command = method.GetCommand(); sql_command.Parameters.Add("@CodigoMedida", SqlDbType.Int); sql_command.CommandText = "SELECT medicion.BicepIzquierdo, medicion.BicepDerecho, medicion.Abdomen, medicion.CuadricepIzquierdo," + "medicion.CuadricepDerecho, medicion.PantorrillaIzquierda, " + "medicion.PantorrillaDerecha FROM Medida AS medicion WHERE CodigoMedida = @CodigoMedida"; sql_command.Parameters[0].Value = CodigoMedida; table = method.ExecSearch(sql_command); return(table); }
public DataTable BuscarUltimoRegistroHarris(string correo) { metodo_datos method = new metodo_datos(); DataTable table; SqlCommand sql_command; sql_command = method.GetCommand(); sql_command.Parameters.Add("@Correo", SqlDbType.NVarChar); sql_command.CommandText = "Select Max(FechaHarris) as UltimoRegistro from HarrisBen Where Correo = @Correo"; sql_command.Parameters[0].Value = correo; table = method.ExecSearch(sql_command); return(table); }
public DataTable ObtenerMedida(string CorreoCliente, string FechaDieta) { metodo_datos method = new metodo_datos(); DataTable table; SqlCommand sql_command; sql_command = method.GetCommand(); sql_command.Parameters.Add("@Correo", SqlDbType.NVarChar); sql_command.Parameters.Add("@Fecha", SqlDbType.DateTime); sql_command.CommandText = "SELECT * FROM Medida WHERE CorreoCliente = @Correo AND FechaMedida = @Fecha"; sql_command.Parameters[0].Value = CorreoCliente; sql_command.Parameters[1].Value = FechaDieta; table = method.ExecSearch(sql_command); return(table); }
public DataTable ObtenerDietaCompleta(string CorreoCliente, string CodigoDieta) { metodo_datos method = new metodo_datos(); DataTable table; SqlCommand sql_command; sql_command = method.GetCommand(); sql_command.Parameters.Add("@CorreoCliente", SqlDbType.NVarChar); sql_command.Parameters.Add("@CodigoDieta", SqlDbType.Int); sql_command.CommandText = "EXEC GetDieta @CorreoCliente, @CodigoDieta"; sql_command.Parameters[0].Value = CorreoCliente; sql_command.Parameters[1].Value = CodigoDieta; table = method.ExecSearch(sql_command); return(table); }
public DataTable BuscarRegistroHarris(string correo, string fecha) { metodo_datos method = new metodo_datos(); DataTable table; SqlCommand sql_command; sql_command = method.GetCommand(); sql_command.Parameters.Add("@Correo", SqlDbType.NVarChar); sql_command.Parameters.Add("@Fecha", SqlDbType.DateTime); sql_command.CommandText = "SELECT * FROM HarrisBen where Correo = @Correo and FechaHarris = @Fecha"; sql_command.Parameters[0].Value = correo; sql_command.Parameters[1].Value = fecha; table = method.ExecSearch(sql_command); return(table); }