不全

 

dsTLocation定义:

publicpartialclassdsTLocation : global::System.Data.DataSet

{

…………………………….

}

 

tLocationBindingSource定义:

private System.Windows.Forms.BindingSource tLocationBindingSource

this.tLocationBindingSource = new System.Windows.Forms.BindingSource(this.components);

this.tLocationBindingSource.DataMember = "T_Location";       // DataSet中的表

this.tLocationBindingSource.DataSource = this.dsTLocation;   //DataSet

 

DataGridView对象选择的数据源tLocationBindingSource

this.dataGridView1.DataSource = this.tLocationBindingSource;

 

LocationTableAdapter定义:

publicpartialclassT_LocationTableAdapter : global::System.ComponentModel.Component {

        privateglobal::System.Data.SqlClient.SqlDataAdapter _adapter;

        privateglobal::System.Data.SqlClient.SqlConnection _connection;

        privateglobal::System.Data.SqlClient.SqlTransaction _transaction;

        privateglobal::System.Data.SqlClient.SqlCommand[] _commandCollection;

 

 

this.t_LocationTableAdapter.Fill(this.dsTLocation.T_Location);

this.t_LocationTableAdapter.Update(this.dsTLocation);

 

posted @ 2019-12-08 22:12  清语堂  阅读(388)  评论(0编辑  收藏  举报