📄 addscore.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data.OleDb;
using System.Runtime.InteropServices;
using System.Data;
namespace WindowsApplication1
{
/// <summary>
/// tjcj 的摘要说明。
/// </summary>
public class AddScore : System.Windows.Forms.Form
{
private System.Windows.Forms.Label label5;
private System.Windows.Forms.ImageList imageList1;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.ListView listView2;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.ListView listView1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox comboBox2;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.ComboBox comboBox3;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox textBox1;
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.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.Label label12;
private System.Data.OleDb.OleDbConnection cn1;
public OleDbConnection cn=new OleDbConnection("Data Source=xsxxdb.mdb;Jet OLEDB:Engine Type=5;Provider=Microsoft.Jet.OLEDB.4.0");
/// <summary>
/// 必需的设计器变量。
/// </summary>
[DllImport("User32.dll")]
public static extern int MessageBox(int h,string m,string c,int type);
private System.ComponentModel.IContainer components;
public AddScore()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(AddScore));
this.label5 = new System.Windows.Forms.Label();
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.label1 = new System.Windows.Forms.Label();
this.comboBox2 = new System.Windows.Forms.ComboBox();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.comboBox3 = new System.Windows.Forms.ComboBox();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.listView2 = new System.Windows.Forms.ListView();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.listView1 = new System.Windows.Forms.ListView();
this.label4 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.label10 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.label12 = new System.Windows.Forms.Label();
this.cn1 = new System.Data.OleDb.OleDbConnection();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
this.groupBox4.SuspendLayout();
this.SuspendLayout();
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label5.Location = new System.Drawing.Point(309, 72);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(0, 21);
this.label5.TabIndex = 7;
//
// imageList1
//
this.imageList1.ImageSize = new System.Drawing.Size(16, 16);
this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
//
// groupBox1
//
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.comboBox2);
this.groupBox1.Controls.Add(this.comboBox1);
this.groupBox1.Controls.Add(this.comboBox3);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.groupBox1.Location = new System.Drawing.Point(32, 10);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(277, 175);
this.groupBox1.TabIndex = 11;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "选择班级学期";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label1.Location = new System.Drawing.Point(32, 27);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(36, 21);
this.label1.TabIndex = 28;
this.label1.Text = "专业";
//
// comboBox2
//
this.comboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.comboBox2.Location = new System.Drawing.Point(85, 78);
this.comboBox2.Name = "comboBox2";
this.comboBox2.Size = new System.Drawing.Size(162, 23);
this.comboBox2.TabIndex = 27;
this.comboBox2.TextChanged += new System.EventHandler(this.comboBox2_TextChanged);
this.comboBox2.SelectedIndexChanged += new System.EventHandler(this.comboBox2_SelectedIndexChanged);
//
// comboBox1
//
this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.comboBox1.Location = new System.Drawing.Point(85, 27);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(162, 23);
this.comboBox1.TabIndex = 26;
this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
//
// comboBox3
//
this.comboBox3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.comboBox3.Location = new System.Drawing.Point(85, 130);
this.comboBox3.Name = "comboBox3";
this.comboBox3.Size = new System.Drawing.Size(160, 23);
this.comboBox3.TabIndex = 31;
this.comboBox3.TextChanged += new System.EventHandler(this.comboBox3_TextChanged);
this.comboBox3.SelectedIndexChanged += new System.EventHandler(this.comboBox3_SelectedIndexChanged);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label3.Location = new System.Drawing.Point(32, 130);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(36, 21);
this.label3.TabIndex = 30;
this.label3.Text = "学期";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label2.Location = new System.Drawing.Point(32, 78);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(36, 21);
this.label2.TabIndex = 29;
this.label2.Text = "班级";
//
// groupBox2
//
this.groupBox2.Controls.Add(this.listView2);
this.groupBox2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.groupBox2.Location = new System.Drawing.Point(320, 10);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(235, 175);
this.groupBox2.TabIndex = 12;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "课程";
//
// listView2
//
this.listView2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.listView2.Location = new System.Drawing.Point(11, 21);
this.listView2.Name = "listView2";
this.listView2.Size = new System.Drawing.Size(202, 144);
this.listView2.SmallImageList = this.imageList1;
this.listView2.StateImageList = this.imageList1;
this.listView2.TabIndex = 11;
this.listView2.View = System.Windows.Forms.View.SmallIcon;
this.listView2.SelectedIndexChanged += new System.EventHandler(this.listView2_SelectedIndexChanged);
//
// groupBox3
//
this.groupBox3.Controls.Add(this.listView1);
this.groupBox3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.groupBox3.Location = new System.Drawing.Point(32, 185);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(523, 175);
this.groupBox3.TabIndex = 13;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "学生名单";
//
// listView1
//
this.listView1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.listView1.Location = new System.Drawing.Point(21, 26);
this.listView1.Name = "listView1";
this.listView1.Size = new System.Drawing.Size(480, 128);
this.listView1.SmallImageList = this.imageList1;
this.listView1.StateImageList = this.imageList1;
this.listView1.TabIndex = 9;
this.listView1.View = System.Windows.Forms.View.SmallIcon;
this.listView1.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged);
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label4.Location = new System.Drawing.Point(21, 185);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(36, 21);
this.label4.TabIndex = 14;
this.label4.Text = "成绩";
//
// textBox1
//
this.textBox1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.textBox1.Location = new System.Drawing.Point(75, 185);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(85, 25);
this.textBox1.TabIndex = 15;
this.textBox1.Text = "";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label6.Location = new System.Drawing.Point(21, 31);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(36, 21);
this.label6.TabIndex = 16;
this.label6.Text = "课程";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label7.Location = new System.Drawing.Point(21, 82);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(36, 21);
this.label7.TabIndex = 17;
this.label7.Text = "学生";
//
// label8
//
this.label8.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label8.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label8.Location = new System.Drawing.Point(75, 31);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(160, 28);
this.label8.TabIndex = 18;
//
// label9
//
this.label9.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label9.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -