string myConnection = "Data Source=LOCALHOST;Initial Catalog=WFL;User ID=lapmee;pwd=nininahazwebeni";
string sql = "select * from Affectation";
SqlCommand command = new SqlCommand(sql, myConnection);
SqlDataAdapter adapter = new SqlDataAdapter(command);
myConnection.open();
DataSet data = new DataSet();
adapter.Fill(data);
myConnection.close();
GridView1.DataSource = data.Table[0];
GridView1.DataBind();