LIstBox下的一次双击使用(Winform)
//查询列出所有表
private void GetTable()
{
DataView view = new DataView();
view = add.GetTable();
list_table.DataSource = view;
list_table.DisplayMember = "TABLE_NAME";
}
//查询所选择表的所有数据
private void list_table_MouseDoubleClick(object sender, MouseEventArgs e)
{
DataRowView dview = (DataRowView)list_table.SelectedItem;
string term = dview.Row[2].ToString();
BindData(term);
}
private void GetTable()
{
DataView view = new DataView();
view = add.GetTable();
list_table.DataSource = view;
list_table.DisplayMember = "TABLE_NAME";
}
//查询所选择表的所有数据
private void list_table_MouseDoubleClick(object sender, MouseEventArgs e)
{
DataRowView dview = (DataRowView)list_table.SelectedItem;
string term = dview.Row[2].ToString();
BindData(term);
}