⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form_sjjgcx.cs

📁 一个很简单的考试系统。实用性很强啊!数据库在里面
💻 CS
📖 第 1 页 / 共 2 页
字号:


using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;

namespace bizdb
{
	/// <summary>
	/// Form_sjjgcx 的摘要说明。
	/// </summary>
	public class Form_sjjgcx : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Panel pnl_sjjgcx1;
		private System.Windows.Forms.Label lbl_kcmc;
		private System.Windows.Forms.ComboBox cbb_kcmc;
		private System.Windows.Forms.Label lbl_cxrq;
		private System.Windows.Forms.DataGrid dgd_sjjgcx;
		private System.Windows.Forms.Panel pnl_sjjgcx2;
		private System.Windows.Forms.Button btn_gd;
		private System.Windows.Forms.Button btn_cx;
		private System.Windows.Forms.Button btn_xg;
		private System.Windows.Forms.Button btn_sc;
		private System.Windows.Forms.Button btn_tj;
		private System.Windows.Forms.Button btn_dy;
		private System.Windows.Forms.DateTimePicker dtp_kkrq;
		private System.Windows.Forms.DateTimePicker dtp_cxrq1;
		private System.Windows.Forms.DateTimePicker dtp_cxrq2;
		private SqlConnection cn=new SqlConnection();
		private SqlCommand cmd_cou=new SqlCommand();
		private SqlCommand cmd_pap=new SqlCommand();
		private SqlDataAdapter da4=new SqlDataAdapter();
		private DataSet ds=new DataSet();
		private string sql_pap,sql_cou;
		private SqlDataAdapter da_pap=new SqlDataAdapter();
		private System.Windows.Forms.RadioButton ckb_kkrq;
		private System.Windows.Forms.RadioButton ckb_cxrq;
		private System.Windows.Forms.Button button1;
		private System.Windows.Forms.Label label1;
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		private System.ComponentModel.Container components = null;

		public Form_sjjgcx()
		{
			//
			// Windows 窗体设计器支持所必需的
			//
			InitializeComponent();

			//
			// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
			//
		}

		/// <summary>
		/// 清理所有正在使用的资源。
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{
			this.pnl_sjjgcx1 = new System.Windows.Forms.Panel();
			this.dtp_cxrq2 = new System.Windows.Forms.DateTimePicker();
			this.dtp_cxrq1 = new System.Windows.Forms.DateTimePicker();
			this.lbl_cxrq = new System.Windows.Forms.Label();
			this.cbb_kcmc = new System.Windows.Forms.ComboBox();
			this.lbl_kcmc = new System.Windows.Forms.Label();
			this.dtp_kkrq = new System.Windows.Forms.DateTimePicker();
			this.ckb_kkrq = new System.Windows.Forms.RadioButton();
			this.ckb_cxrq = new System.Windows.Forms.RadioButton();
			this.dgd_sjjgcx = new System.Windows.Forms.DataGrid();
			this.pnl_sjjgcx2 = new System.Windows.Forms.Panel();
			this.btn_dy = new System.Windows.Forms.Button();
			this.btn_tj = new System.Windows.Forms.Button();
			this.btn_sc = new System.Windows.Forms.Button();
			this.btn_xg = new System.Windows.Forms.Button();
			this.btn_gd = new System.Windows.Forms.Button();
			this.btn_cx = new System.Windows.Forms.Button();
			this.button1 = new System.Windows.Forms.Button();
			this.label1 = new System.Windows.Forms.Label();
			this.pnl_sjjgcx1.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.dgd_sjjgcx)).BeginInit();
			this.pnl_sjjgcx2.SuspendLayout();
			this.SuspendLayout();
			// 
			// pnl_sjjgcx1
			// 
			this.pnl_sjjgcx1.Controls.Add(this.dtp_cxrq2);
			this.pnl_sjjgcx1.Controls.Add(this.dtp_cxrq1);
			this.pnl_sjjgcx1.Controls.Add(this.lbl_cxrq);
			this.pnl_sjjgcx1.Controls.Add(this.cbb_kcmc);
			this.pnl_sjjgcx1.Controls.Add(this.lbl_kcmc);
			this.pnl_sjjgcx1.Controls.Add(this.dtp_kkrq);
			this.pnl_sjjgcx1.Controls.Add(this.ckb_kkrq);
			this.pnl_sjjgcx1.Controls.Add(this.ckb_cxrq);
			this.pnl_sjjgcx1.Location = new System.Drawing.Point(16, 8);
			this.pnl_sjjgcx1.Name = "pnl_sjjgcx1";
			this.pnl_sjjgcx1.Size = new System.Drawing.Size(768, 40);
			this.pnl_sjjgcx1.TabIndex = 0;
			// 
			// dtp_cxrq2
			// 
			this.dtp_cxrq2.Location = new System.Drawing.Point(648, 8);
			this.dtp_cxrq2.Name = "dtp_cxrq2";
			this.dtp_cxrq2.Size = new System.Drawing.Size(112, 21);
			this.dtp_cxrq2.TabIndex = 9;
			// 
			// dtp_cxrq1
			// 
			this.dtp_cxrq1.Location = new System.Drawing.Point(512, 8);
			this.dtp_cxrq1.Name = "dtp_cxrq1";
			this.dtp_cxrq1.Size = new System.Drawing.Size(112, 21);
			this.dtp_cxrq1.TabIndex = 8;
			// 
			// lbl_cxrq
			// 
			this.lbl_cxrq.Location = new System.Drawing.Point(624, 8);
			this.lbl_cxrq.Name = "lbl_cxrq";
			this.lbl_cxrq.Size = new System.Drawing.Size(24, 23);
			this.lbl_cxrq.TabIndex = 6;
			this.lbl_cxrq.Text = "至";
			// 
			// cbb_kcmc
			// 
			this.cbb_kcmc.BackColor = System.Drawing.Color.White;
			this.cbb_kcmc.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
			this.cbb_kcmc.Location = new System.Drawing.Point(80, 8);
			this.cbb_kcmc.Name = "cbb_kcmc";
			this.cbb_kcmc.Size = new System.Drawing.Size(136, 20);
			this.cbb_kcmc.TabIndex = 1;
			
			// 
			// lbl_kcmc
			// 
			this.lbl_kcmc.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
			this.lbl_kcmc.Location = new System.Drawing.Point(8, 8);
			this.lbl_kcmc.Name = "lbl_kcmc";
			this.lbl_kcmc.Size = new System.Drawing.Size(64, 23);
			this.lbl_kcmc.TabIndex = 0;
			this.lbl_kcmc.Text = "课程名称";
			// 
			// dtp_kkrq
			// 
			this.dtp_kkrq.Location = new System.Drawing.Point(312, 8);
			this.dtp_kkrq.Name = "dtp_kkrq";
			this.dtp_kkrq.Size = new System.Drawing.Size(112, 21);
			this.dtp_kkrq.TabIndex = 3;
			// 
			// ckb_kkrq
			// 
			this.ckb_kkrq.Location = new System.Drawing.Point(224, 8);
			this.ckb_kkrq.Name = "ckb_kkrq";
			this.ckb_kkrq.Size = new System.Drawing.Size(80, 23);
			this.ckb_kkrq.TabIndex = 3;
			this.ckb_kkrq.Text = "开考日期";
			// 
			// ckb_cxrq
			// 
			this.ckb_cxrq.Location = new System.Drawing.Point(432, 8);
			this.ckb_cxrq.Name = "ckb_cxrq";
			this.ckb_cxrq.Size = new System.Drawing.Size(80, 23);
			this.ckb_cxrq.TabIndex = 4;
			this.ckb_cxrq.Text = "查询日期";
			// 
			// dgd_sjjgcx
			// 
			this.dgd_sjjgcx.DataMember = "";
			this.dgd_sjjgcx.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.dgd_sjjgcx.Location = new System.Drawing.Point(8, 56);
			this.dgd_sjjgcx.Name = "dgd_sjjgcx";
			this.dgd_sjjgcx.Size = new System.Drawing.Size(776, 416);
			this.dgd_sjjgcx.TabIndex = 1;
			// 
			// pnl_sjjgcx2
			// 
			this.pnl_sjjgcx2.Controls.Add(this.btn_dy);
			this.pnl_sjjgcx2.Controls.Add(this.btn_tj);
			this.pnl_sjjgcx2.Controls.Add(this.btn_sc);
			this.pnl_sjjgcx2.Controls.Add(this.btn_xg);
			this.pnl_sjjgcx2.Location = new System.Drawing.Point(8, 520);
			this.pnl_sjjgcx2.Name = "pnl_sjjgcx2";
			this.pnl_sjjgcx2.Size = new System.Drawing.Size(776, 40);
			this.pnl_sjjgcx2.TabIndex = 2;
			// 
			// btn_dy
			// 
			this.btn_dy.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
			this.btn_dy.Location = new System.Drawing.Point(352, 8);
			this.btn_dy.Name = "btn_dy";
			this.btn_dy.TabIndex = 5;
			this.btn_dy.Text = "打   印";
			// 
			// btn_tj
			// 
			this.btn_tj.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
			this.btn_tj.Location = new System.Drawing.Point(240, 8);
			this.btn_tj.Name = "btn_tj";
			this.btn_tj.TabIndex = 4;
			this.btn_tj.Text = "提   交";
			this.btn_tj.Click += new System.EventHandler(this.btn_tj_Click);
			// 
			// btn_sc
			// 
			this.btn_sc.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
			this.btn_sc.Location = new System.Drawing.Point(128, 8);
			this.btn_sc.Name = "btn_sc";
			this.btn_sc.TabIndex = 3;
			this.btn_sc.Text = "删   除";
			this.btn_sc.Click += new System.EventHandler(this.btn_sc_Click);
			// 
			// btn_xg
			// 
			this.btn_xg.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
			this.btn_xg.Location = new System.Drawing.Point(16, 8);
			this.btn_xg.Name = "btn_xg";
			this.btn_xg.TabIndex = 2;
			this.btn_xg.Text = "修   改";
			this.btn_xg.Click += new System.EventHandler(this.btn_xg_Click);
			// 
			// btn_gd
			// 
			this.btn_gd.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
			this.btn_gd.Location = new System.Drawing.Point(520, 488);
			this.btn_gd.Name = "btn_gd";
			this.btn_gd.TabIndex = 0;
			this.btn_gd.Text = "归档试卷";
			this.btn_gd.Click += new System.EventHandler(this.btn_gd_Click);
			// 
			// btn_cx
			// 
			this.btn_cx.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
			this.btn_cx.Location = new System.Drawing.Point(24, 488);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -