con = new MySqlConnection();
con.ConnectionString =ConfigurationSettings.AppSettings["constr"];
con.Open();
string str = "select * from pto ";
MySqlDataAdapter da = new MySqlDataAdapter(str, con);
DataSet ds=new DataSet();
da.Fill(ds);
dataGridView1.DataSource = ds.Tables[0];