Well, I'm not really surprised! Lets just take "irrelevant" code away:
private void button1_Click(object sender, EventArgs e)
{
...
String Search = "Select bookID from ss where Snumber='" + this.textBox1.Text + "'";
...
if (Search =="1")
{
...
}
else if (Search == "2")
{
...
}
...
}
Since
Search
will never equal either value it does nothing with it.
Probably what you want to do is to use the values in the
myreader
returned data to make those decisions...