using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;namespace Employees
{
/// <summary>
/// Form1 的摘要说明。
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Data.SqlClient.SqlConnection sqlConnectionNorthwind;
private System.Data.SqlClient.SqlCommand sqlSelectCommand1;
private System.Data.SqlClient.SqlCommand sqlInsertCommand1;
private System.Data.SqlClient.SqlCommand sqlUpdateCommand1;
private System.Data.SqlClient.SqlCommand sqlDeleteCommand1;
private System.Data.SqlClient.SqlDataAdapter sqlDataAdapterEmployees;
private Employees.DataSetEmployees dataSetEmployees1;
private System.Windows.Forms.ListBox listBoxNames;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox textBoxFirstName;
private System.Windows.Forms.TextBox textBoxLastName;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.TextBox textBoxTitle;
private System.Windows.Forms.TextBox textBoxTitleofCourtesy;
private System.Windows.Forms.TextBox textBoxBirthday;
private System.Windows.Forms.TextBox textBoxhiredate;
private System.Windows.Forms.TextBox textBoxCity;
private System.Windows.Forms.TextBox textBoxAddress;
private System.Windows.Forms.TextBox textBoxPostalCode;
private System.Windows.Forms.TextBox textBoxLastExtension;
private System.Windows.Forms.TextBox textBoxHomephone;
private System.Windows.Forms.TextBox textBoxLastCountry;
private System.Windows.Forms.TextBox textBoxNotes;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;namespace Employees
{
/// <summary>
/// Form1 的摘要说明。
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Data.SqlClient.SqlConnection sqlConnectionNorthwind;
private System.Data.SqlClient.SqlCommand sqlSelectCommand1;
private System.Data.SqlClient.SqlCommand sqlInsertCommand1;
private System.Data.SqlClient.SqlCommand sqlUpdateCommand1;
private System.Data.SqlClient.SqlCommand sqlDeleteCommand1;
private System.Data.SqlClient.SqlDataAdapter sqlDataAdapterEmployees;
private Employees.DataSetEmployees dataSetEmployees1;
private System.Windows.Forms.ListBox listBoxNames;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox textBoxFirstName;
private System.Windows.Forms.TextBox textBoxLastName;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.TextBox textBoxTitle;
private System.Windows.Forms.TextBox textBoxTitleofCourtesy;
private System.Windows.Forms.TextBox textBoxBirthday;
private System.Windows.Forms.TextBox textBoxhiredate;
private System.Windows.Forms.TextBox textBoxCity;
private System.Windows.Forms.TextBox textBoxAddress;
private System.Windows.Forms.TextBox textBoxPostalCode;
private System.Windows.Forms.TextBox textBoxLastExtension;
private System.Windows.Forms.TextBox textBoxHomephone;
private System.Windows.Forms.TextBox textBoxLastCountry;
private System.Windows.Forms.TextBox textBoxNotes;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
sqlDataAdapterEmployees.Fill(dataSetEmployees1);
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
} /// <summary>
/// 清理所有正在使用的资源。
/// </summary>
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
} private void Form1_Load(object sender, System.EventArgs e)
{
} private void sqlConnectionNorthwind_InfoMessage(object sender, System.Data.SqlClient.SqlInfoMessageEventArgs e)
{
} private void sqlDataAdapter1_RowUpdated(object sender, System.Data.SqlClient.SqlRowUpdatedEventArgs e)
{
} private void sqlDataAdapterEmployees_RowUpdated(object sender, System.Data.SqlClient.SqlRowUpdatedEventArgs e)
{
} private void listBox1_SelectedIndexChanged(object sender, System.EventArgs e)
{
} private void label1_Click(object sender, System.EventArgs e)
{
} private void textBox1_TextChanged(object sender, System.EventArgs e)
{
} private void label2_Click(object sender, System.EventArgs e)
{
} private void label4_Click(object sender, System.EventArgs e)
{
} private void textBox4_TextChanged(object sender, System.EventArgs e)
{
} private void textBox3_TextChanged(object sender, System.EventArgs e)
{
} private void textBox7_TextChanged(object sender, System.EventArgs e)
{
} private void textBox6_TextChanged(object sender, System.EventArgs e)
{
}
}
}
sqlDataAdapterEmployees = new SqlDataAdapter();
.....
还是有问题。