📄 f95出1.cs
字号:
this.sqlDeleteCommand1.CommandText = "DELETE FROM T WHERE (Tno = @Original_Tno) AND (Tage = @Original_Tage) AND (Tcours" +
"e = @Original_Tcourse OR @Original_Tcourse IS NULL AND Tcourse IS NULL) AND (Tna" +
"me = @Original_Tname) AND (Tsex = @Original_Tsex)";
this.sqlDeleteCommand1.Connection = this.sqlConnection1;
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Tno", System.Data.SqlDbType.VarChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "Tno", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Tage", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "Tage", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Tcourse", System.Data.SqlDbType.VarChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "Tcourse", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Tname", System.Data.SqlDbType.VarChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "Tname", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Tsex", System.Data.SqlDbType.VarChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "Tsex", System.Data.DataRowVersion.Original, null));
//
// sqlConnection1
//
this.sqlConnection1.ConnectionString = "data source=.;initial catalog=TSC;integrated security=SSPI;persist security info=" +
"False;workstation id=S0353;packet size=4096";
//
// sqlInsertCommand1
//
this.sqlInsertCommand1.CommandText = "INSERT INTO T(Tno, Tname, Tage, Tsex, Tcourse) VALUES (@Tno, @Tname, @Tage, @Tsex" +
", @Tcourse); SELECT Tno, Tname, Tage, Tsex, Tcourse FROM T WHERE (Tno = @Tno)";
this.sqlInsertCommand1.Connection = this.sqlConnection1;
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Tno", System.Data.SqlDbType.VarChar, 10, "Tno"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Tname", System.Data.SqlDbType.VarChar, 10, "Tname"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Tage", System.Data.SqlDbType.Int, 4, "Tage"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Tsex", System.Data.SqlDbType.VarChar, 10, "Tsex"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Tcourse", System.Data.SqlDbType.VarChar, 10, "Tcourse"));
//
// sqlSelectCommand1
//
this.sqlSelectCommand1.CommandText = "SELECT Tno, Tname, Tage, Tsex, Tcourse FROM T";
this.sqlSelectCommand1.Connection = this.sqlConnection1;
//
// sqlUpdateCommand1
//
this.sqlUpdateCommand1.CommandText = @"UPDATE T SET Tno = @Tno, Tname = @Tname, Tage = @Tage, Tsex = @Tsex, Tcourse = @Tcourse WHERE (Tno = @Original_Tno) AND (Tage = @Original_Tage) AND (Tcourse = @Original_Tcourse OR @Original_Tcourse IS NULL AND Tcourse IS NULL) AND (Tname = @Original_Tname) AND (Tsex = @Original_Tsex); SELECT Tno, Tname, Tage, Tsex, Tcourse FROM T WHERE (Tno = @Tno)";
this.sqlUpdateCommand1.Connection = this.sqlConnection1;
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Tno", System.Data.SqlDbType.VarChar, 10, "Tno"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Tname", System.Data.SqlDbType.VarChar, 10, "Tname"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Tage", System.Data.SqlDbType.Int, 4, "Tage"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Tsex", System.Data.SqlDbType.VarChar, 10, "Tsex"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Tcourse", System.Data.SqlDbType.VarChar, 10, "Tcourse"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Tno", System.Data.SqlDbType.VarChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "Tno", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Tage", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "Tage", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Tcourse", System.Data.SqlDbType.VarChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "Tcourse", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Tname", System.Data.SqlDbType.VarChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "Tname", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Tsex", System.Data.SqlDbType.VarChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "Tsex", System.Data.DataRowVersion.Original, null));
//
// button1
//
this.button1.Location = new System.Drawing.Point(272, 24);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(136, 32);
this.button1.TabIndex = 1;
this.button1.Text = "教 师 信 息 显 示";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// dataSet11
//
this.dataSet11.DataSetName = "DataSet1";
this.dataSet11.Locale = new System.Globalization.CultureInfo("zh-CN");
this.dataSet11.Namespace = "http://www.tempuri.org/DataSet1.xsd";
//
// button2
//
this.button2.Location = new System.Drawing.Point(504, 288);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(88, 23);
this.button2.TabIndex = 2;
this.button2.Text = "返 回 主 页";
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// label1
//
this.label1.Location = new System.Drawing.Point(32, 80);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(64, 23);
this.label1.TabIndex = 3;
this.label1.Text = "教 师 号";
//
// label2
//
this.label2.Location = new System.Drawing.Point(208, 80);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(72, 23);
this.label2.TabIndex = 4;
this.label2.Text = "教 师 姓 名";
//
// label3
//
this.label3.Location = new System.Drawing.Point(408, 80);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(72, 23);
this.label3.TabIndex = 5;
this.label3.Text = "教 授 课 程";
this.label3.Click += new System.EventHandler(this.label3_Click);
//
// textBox1
//
this.textBox1.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "T.Tno"));
this.textBox1.Location = new System.Drawing.Point(104, 80);
this.textBox1.Name = "textBox1";
this.textBox1.TabIndex = 6;
this.textBox1.Text = "";
this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
//
// textBox2
//
this.textBox2.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "T.Tname"));
this.textBox2.Location = new System.Drawing.Point(288, 80);
this.textBox2.Name = "textBox2";
this.textBox2.TabIndex = 7;
this.textBox2.Text = "";
this.textBox2.TextChanged += new System.EventHandler(this.textBox2_TextChanged);
//
// textBox3
//
this.textBox3.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "T.Tcourse"));
this.textBox3.Location = new System.Drawing.Point(488, 80);
this.textBox3.Name = "textBox3";
this.textBox3.TabIndex = 8;
this.textBox3.Text = "";
//
// groupBox1
//
this.groupBox1.BackgroundImage = ((System.Drawing.Bitmap)(resources.GetObject("groupBox1.BackgroundImage")));
this.groupBox1.Controls.AddRange(new System.Windows.Forms.Control[] {
this.button1,
this.label1,
this.textBox1,
this.label2,
this.textBox2,
this.label3,
this.textBox3,
this.dataGrid1,
this.button2});
this.groupBox1.Location = new System.Drawing.Point(8, 24);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(640, 336);
this.groupBox1.TabIndex = 9;
this.groupBox1.TabStop = false;
//
// Form14
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.BackgroundImage = ((System.Drawing.Bitmap)(resources.GetObject("$this.BackgroundImage")));
this.ClientSize = new System.Drawing.Size(696, 385);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.groupBox1});
this.MaximizeBox = false;
this.Menu = this.mainMenu1;
this.Name = "Form14";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "输出教师表";
this.Load += new System.EventHandler(this.Form14_Load);
((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dataSet11)).EndInit();
this.groupBox1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private void menuItem24_Click(object sender, System.EventArgs e)
{
Application.Exit();
}
private void menuItem23_Click(object sender, System.EventArgs e)
{
MessageBox.Show(" 数据库课程设计\r -------教学管理系统\r\r小组成员:金铎,汪欣,齐肖西,李莎,王丽芳");
}
private void menuItem22_Click(object sender, System.EventArgs e)
{
MessageBox.Show("暂无帮助信息!");
}
private void menuItem2_Click(object sender, System.EventArgs e)
{
this.Hide();
Form form2=new Form2();
form2.ShowDialog ();
}
private void menuItem3_Click(object sender, System.EventArgs e)
{
this.Hide();
Form form3=new Form3();
form3.ShowDialog ();
}
private void menuItem4_Click(object sender, System.EventArgs e)
{
this.Hide();
Form form4=new Form4();
form4.ShowDialog ();
}
private void menuItem6_Click(object sender, System.EventArgs e)
{
this.Hide();
Form form5=new Form5();
form5.ShowDialog ();
}
private void menuItem7_Click(object sender, System.EventArgs e)
{
this.Hide();
Form form6=new Form6();
form6.ShowDialog ();
}
private void menuItem8_Click(object sender, System.EventArgs e)
{
this.Hide();
Form form7=new Form7();
form7.ShowDialog ();
}
private void menuItem10_Click(object sender, System.EventArgs e)
{
this.Hide();
Form form8=new Form8();
form8.ShowDialog ();
}
private void menuItem11_Click(object sender, System.EventArgs e)
{
this.Hide();
Form form9=new Form9();
form9.ShowDialog ();
}
private void menuItem12_Click(object sender, System.EventArgs e)
{
this.Hide();
Form form10=new Form10();
form10.ShowDialog ();
}
private void menuItem13_Click(object sender, System.EventArgs e)
{
this.Hide();
Form form11=new Form11();
form11.ShowDialog ();
}
private void menuItem15_Click(object sender, System.EventArgs e)
{
this.Hide();
Form form12=new Form12();
form12.ShowDialog ();
}
private void menuItem16_Click(object sender, System.EventArgs e)
{
this.Hide();
Form form13=new Form13();
form13.ShowDialog ();
}
private void menuItem18_Click(object sender, System.EventArgs e)
{
this.Hide();
Form form14=new Form14();
form14.ShowDialog ();
}
private void menuItem19_Click(object sender, System.EventArgs e)
{
this.Hide();
Form form15=new Form15();
form15.ShowDialog ();
}
private void menuItem20_Click(object sender, System.EventArgs e)
{
this.Hide();
Form form16=new Form16();
form16.ShowDialog ();
}
private void menuItem21_Click(object sender, System.EventArgs e)
{
this.Hide();
Form form17=new Form17();
form17.ShowDialog ();
}
private void button1_Click(object sender, System.EventArgs e)
{
sqlDataAdapter1.Fill(dataSet11,"T");
dataGrid1.SetDataBinding(dataSet11,"T");
dataGrid1.Update ();
}
private void button2_Click(object sender, System.EventArgs e)
{
Form form1=new Form1 ();
form1.ShowDialog ();
}
private void button4_Click(object sender, System.EventArgs e)
{
}
private void button3_Click(object sender, System.EventArgs e)
{
}
private void Form14_Load(object sender, System.EventArgs e)
{
}
private void textBox2_TextChanged(object sender, System.EventArgs e)
{
}
private void dataGrid1_Navigate(object sender, System.Windows.Forms.NavigateEventArgs ne)
{
}
private void label3_Click(object sender, System.EventArgs e)
{
}
private void textBox1_TextChanged(object sender, System.EventArgs e)
{
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -