private void Currancyrate()
{
SqlConnection connection = new SqlConnection(this.connStr);
connection.Open();
SqlCommand command = new SqlCommand("select * from shiv.exchange_rate where country ='" + this.Session["exchangerate"].ToString() + "'", connection);
SqlDataReader reader = command.ExecuteReader();
if (reader.Read())
{
this.lblcurrency.Text = reader["rate"].ToString();
this.Lblcusymb1.Text = reader["symbol"].ToString();
}
connection.Close();
connection.Dispose();
reader.Close();
reader.Dispose();
command.Dispose();
} |