//绑定数据源
DataSet ds = new DataSet();
SqlConnection connection = new SqlConnection(netiFace.ConnectionString.ConnectionString);
connection.Open();
SqlDataAdapter da = new SqlDataAdapter("select * from dot", connection);
da.Fill(ds, "dot");
DataTable mytable = new DataTable();
mytable = ds.Tables["dot"];
dataGridView1.AutoGenerateColumns = true;
dataGridView1.DataSource = mytable;
dataGridView1.MultiSelect = false;//不可多选行
bindingSource1.DataSource = mytable;
bindingNavigator1.BindingSource = bindingSource1;
//隐藏一个页签
this.tabControl2.TabPages.Remove(tabControl2.TabPages[2]);
this.tabControl1.TabPages.Remove(tabControl1.TabPages[3]);
this.tabControl1.TabPages.Remove(tabControl1.TabPages[2]);
----------------------------- //bindingNavigator和dataGridView的联动----------------------------------------------
bindingNavigatorMoveLastItem.Click += new System.EventHandler(this.MoveDataControl);
bindingNavigatorMoveLastItem.Click += new