SqlCommand newCommand = newSqlCommand();
SqlConnection newconnection = newSqlConnection("data source=;initial catalog=kouft;intregrated security=true");
newCommand.CommandText=
"select code,pass from Table_1 where code="textBox1.Text" and pass="textBox2.Text" ";
if (newCommand.CommandText!=null);
newCommand.Connection=newconnection;
newCommand.Connection.Open();
SqlDataAdapter da=newSqlDataAdapter(newCommand);
DataSet ds=newDataSet();
da.Fill(ds);
dataGridView1.DataSource=ds.Tables[0];
else (label3.Visible==true);
من ميخوام با زدن دكمه ورود كدكاربري ورمز چك شود واگه درست بود اطلاعات نمايش داده شود واگه درست نبود يك پيغاخطا نمايش داده شود.