private bool sePuedeEfectuarLaCompra()
{
Int64 nroTarjeta;
Int64.TryParse(txtNroTarjeta.Text, out nroTarjeta);
SqlDataReader reader;
SqlCommand query = new SqlCommand();
query.CommandType = CommandType.Text;
query.CommandText = "SELECT * FROM [ABSTRACCIONX4].[TARJETAS] WHERE TARJ_NRO = " + nroTarjeta + "";
query.Connection = Program.conexion();
reader = query.ExecuteReader();
reader.Read();
if (reader.HasRows)
{
if (this.esTarjetaValida())
{
tarjetaNueva = false;
esEfectivo = false;
return true;
}
else
{
return false;
}
}
if (cboFormaPago.Text.Equals("Tarjeta de crédito"))
{
tarjetaNueva = true;
}else
{
tarjetaNueva = false;
esEfectivo = true;
}
return true;
}