📄 form_st.cs
字号:
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>
/// Form1 的摘要说明。
/// </summary>
public class Form_st : System.Windows.Forms.Form
{
private System.Windows.Forms.Panel pnl_st1;
private System.Windows.Forms.Panel pnl_st2;
private System.Windows.Forms.Panel pnl_st3;
private System.Windows.Forms.Label lbl_gtfz;
private System.Windows.Forms.Label lbl_nd;
private System.Windows.Forms.Label lbl_stlx;
private System.Windows.Forms.PictureBox pcb_yltp;
private System.Windows.Forms.TextBox txt_stnr;
private System.Windows.Forms.TextBox txt_gtfz;
private System.Windows.Forms.Label lbl_yltp;
private System.Windows.Forms.Label lbl_stnr;
private System.Windows.Forms.Button btn_qx;
private System.Windows.Forms.Button btn_fjtp;
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_mjl;
private System.Windows.Forms.Button btn_hyjl;
private System.Windows.Forms.Button btn_qyjl;
private System.Windows.Forms.Button btn_sjl;
private System.Windows.Forms.DataGrid dgd_st;
private System.Windows.Forms.Button btn_qrtj;
private System.Windows.Forms.Button btn_cx;
private System.Windows.Forms.ComboBox cbb_jxdy;
private System.Windows.Forms.ComboBox cbb_kc;
private System.Windows.Forms.Label lbl_jxdy;
private System.Windows.Forms.Label lbl_kc;
private System.Windows.Forms.ComboBox cbb_stlx;
private System.Windows.Forms.ComboBox cbb_nd;
private System.Windows.Forms.OpenFileDialog ofd_fjtp;
private System.Data.SqlClient.SqlConnection sqlcnt_st = new SqlConnection();
private System.Data.SqlClient.SqlCommand sqlcmd_st;
private System.Data.SqlClient.SqlDataAdapter sqldpt_st = new SqlDataAdapter();
private System.Data.DataSet dst_st = new DataSet();
private System.Data.SqlClient.SqlCommand sqlcmd_stc;
private byte bl_qx = 0;
private string cno;
private string jno;
private string tno = "";
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
private dbAccess db = new dbAccess();
public Form_st()
{
//
// 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_st1 = new System.Windows.Forms.Panel();
this.btn_cx = new System.Windows.Forms.Button();
this.cbb_jxdy = new System.Windows.Forms.ComboBox();
this.cbb_kc = new System.Windows.Forms.ComboBox();
this.lbl_jxdy = new System.Windows.Forms.Label();
this.lbl_kc = new System.Windows.Forms.Label();
this.pnl_st2 = new System.Windows.Forms.Panel();
this.cbb_nd = new System.Windows.Forms.ComboBox();
this.cbb_stlx = new System.Windows.Forms.ComboBox();
this.pcb_yltp = new System.Windows.Forms.PictureBox();
this.txt_stnr = new System.Windows.Forms.TextBox();
this.txt_gtfz = new System.Windows.Forms.TextBox();
this.lbl_yltp = new System.Windows.Forms.Label();
this.lbl_stnr = new System.Windows.Forms.Label();
this.lbl_gtfz = new System.Windows.Forms.Label();
this.lbl_nd = new System.Windows.Forms.Label();
this.lbl_stlx = new System.Windows.Forms.Label();
this.pnl_st3 = new System.Windows.Forms.Panel();
this.btn_qx = new System.Windows.Forms.Button();
this.btn_qrtj = new System.Windows.Forms.Button();
this.btn_fjtp = new System.Windows.Forms.Button();
this.btn_xg = new System.Windows.Forms.Button();
this.btn_sc = new System.Windows.Forms.Button();
this.btn_tj = new System.Windows.Forms.Button();
this.btn_mjl = new System.Windows.Forms.Button();
this.btn_hyjl = new System.Windows.Forms.Button();
this.btn_qyjl = new System.Windows.Forms.Button();
this.btn_sjl = new System.Windows.Forms.Button();
this.dgd_st = new System.Windows.Forms.DataGrid();
this.sqldpt_st = new System.Data.SqlClient.SqlDataAdapter();
this.dst_st = new System.Data.DataSet();
this.ofd_fjtp = new System.Windows.Forms.OpenFileDialog();
this.pnl_st1.SuspendLayout();
this.pnl_st2.SuspendLayout();
this.pnl_st3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgd_st)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dst_st)).BeginInit();
this.SuspendLayout();
//
// pnl_st1
//
this.pnl_st1.Controls.Add(this.btn_cx);
this.pnl_st1.Controls.Add(this.cbb_jxdy);
this.pnl_st1.Controls.Add(this.cbb_kc);
this.pnl_st1.Controls.Add(this.lbl_jxdy);
this.pnl_st1.Controls.Add(this.lbl_kc);
this.pnl_st1.Location = new System.Drawing.Point(16, 16);
this.pnl_st1.Name = "pnl_st1";
this.pnl_st1.Size = new System.Drawing.Size(760, 100);
this.pnl_st1.TabIndex = 0;
//
// btn_cx
//
this.btn_cx.Location = new System.Drawing.Point(416, 64);
this.btn_cx.Name = "btn_cx";
this.btn_cx.TabIndex = 5;
this.btn_cx.Text = "查询";
this.btn_cx.Click += new System.EventHandler(this.btn_cx_Click);
//
// cbb_jxdy
//
this.cbb_jxdy.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbb_jxdy.Location = new System.Drawing.Point(96, 64);
this.cbb_jxdy.Name = "cbb_jxdy";
this.cbb_jxdy.Size = new System.Drawing.Size(264, 20);
this.cbb_jxdy.TabIndex = 4;
this.cbb_jxdy.SelectionChangeCommitted += new System.EventHandler(this.cbb_jxdy_SelectionChange);
//
// cbb_kc
//
this.cbb_kc.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbb_kc.Location = new System.Drawing.Point(96, 16);
this.cbb_kc.Name = "cbb_kc";
this.cbb_kc.Size = new System.Drawing.Size(264, 20);
this.cbb_kc.Sorted = true;
this.cbb_kc.TabIndex = 3;
this.cbb_kc.SelectionChangeCommitted += new System.EventHandler(this.cbb_kc_SelectionChange);
//
// lbl_jxdy
//
this.lbl_jxdy.Location = new System.Drawing.Point(32, 64);
this.lbl_jxdy.Name = "lbl_jxdy";
this.lbl_jxdy.Size = new System.Drawing.Size(64, 16);
this.lbl_jxdy.TabIndex = 2;
this.lbl_jxdy.Text = "教学单元";
//
// lbl_kc
//
this.lbl_kc.Location = new System.Drawing.Point(32, 24);
this.lbl_kc.Name = "lbl_kc";
this.lbl_kc.Size = new System.Drawing.Size(64, 16);
this.lbl_kc.TabIndex = 1;
this.lbl_kc.Text = "课程";
//
// pnl_st2
//
this.pnl_st2.Controls.Add(this.cbb_nd);
this.pnl_st2.Controls.Add(this.cbb_stlx);
this.pnl_st2.Controls.Add(this.pcb_yltp);
this.pnl_st2.Controls.Add(this.txt_stnr);
this.pnl_st2.Controls.Add(this.txt_gtfz);
this.pnl_st2.Controls.Add(this.lbl_yltp);
this.pnl_st2.Controls.Add(this.lbl_stnr);
this.pnl_st2.Controls.Add(this.lbl_gtfz);
this.pnl_st2.Controls.Add(this.lbl_nd);
this.pnl_st2.Controls.Add(this.lbl_stlx);
this.pnl_st2.Location = new System.Drawing.Point(16, 336);
this.pnl_st2.Name = "pnl_st2";
this.pnl_st2.Size = new System.Drawing.Size(760, 160);
this.pnl_st2.TabIndex = 1;
//
// cbb_nd
//
this.cbb_nd.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbb_nd.Items.AddRange(new object[] {
"易",
"中",
"难"});
this.cbb_nd.Location = new System.Drawing.Point(128, 72);
this.cbb_nd.Name = "cbb_nd";
this.cbb_nd.Size = new System.Drawing.Size(128, 20);
this.cbb_nd.TabIndex = 11;
this.cbb_nd.SelectionChangeCommitted += new System.EventHandler(this.cbb_nd_SelectionChange);
//
// cbb_stlx
//
this.cbb_stlx.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbb_stlx.Items.AddRange(new object[] {
"单选",
"多选"});
this.cbb_stlx.Location = new System.Drawing.Point(128, 24);
this.cbb_stlx.Name = "cbb_stlx";
this.cbb_stlx.Size = new System.Drawing.Size(128, 20);
this.cbb_stlx.TabIndex = 10;
this.cbb_stlx.SelectionChangeCommitted += new System.EventHandler(this.cbb_stlx_Selectionchange);
//
// pcb_yltp
//
this.pcb_yltp.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.pcb_yltp.Location = new System.Drawing.Point(608, 40);
this.pcb_yltp.Name = "pcb_yltp";
this.pcb_yltp.Size = new System.Drawing.Size(120, 96);
this.pcb_yltp.TabIndex = 9;
this.pcb_yltp.TabStop = false;
//
// txt_stnr
//
this.txt_stnr.AcceptsReturn = true;
this.txt_stnr.Enabled = false;
this.txt_stnr.Location = new System.Drawing.Point(288, 40);
this.txt_stnr.Multiline = true;
this.txt_stnr.Name = "txt_stnr";
this.txt_stnr.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.txt_stnr.Size = new System.Drawing.Size(288, 96);
this.txt_stnr.TabIndex = 8;
this.txt_stnr.Text = "";
//
// txt_gtfz
//
this.txt_gtfz.Enabled = false;
this.txt_gtfz.Location = new System.Drawing.Point(128, 120);
this.txt_gtfz.Multiline = true;
this.txt_gtfz.Name = "txt_gtfz";
this.txt_gtfz.Size = new System.Drawing.Size(128, 21);
this.txt_gtfz.TabIndex = 7;
this.txt_gtfz.Text = "";
//
// lbl_yltp
//
this.lbl_yltp.Location = new System.Drawing.Point(600, 16);
this.lbl_yltp.Name = "lbl_yltp";
this.lbl_yltp.Size = new System.Drawing.Size(64, 16);
this.lbl_yltp.TabIndex = 4;
this.lbl_yltp.Text = "预览图片";
//
// lbl_stnr
//
this.lbl_stnr.Location = new System.Drawing.Point(288, 16);
this.lbl_stnr.Name = "lbl_stnr";
this.lbl_stnr.Size = new System.Drawing.Size(56, 16);
this.lbl_stnr.TabIndex = 3;
this.lbl_stnr.Text = "试题内容";
//
// lbl_gtfz
//
this.lbl_gtfz.Location = new System.Drawing.Point(24, 120);
this.lbl_gtfz.Name = "lbl_gtfz";
this.lbl_gtfz.Size = new System.Drawing.Size(56, 16);
this.lbl_gtfz.TabIndex = 2;
this.lbl_gtfz.Text = "各题分值 ";
//
// lbl_nd
//
this.lbl_nd.Location = new System.Drawing.Point(24, 72);
this.lbl_nd.Name = "lbl_nd";
this.lbl_nd.Size = new System.Drawing.Size(64, 16);
this.lbl_nd.TabIndex = 1;
this.lbl_nd.Text = "难度";
//
// lbl_stlx
//
this.lbl_stlx.Location = new System.Drawing.Point(24, 24);
this.lbl_stlx.Name = "lbl_stlx";
this.lbl_stlx.Size = new System.Drawing.Size(64, 16);
this.lbl_stlx.TabIndex = 0;
this.lbl_stlx.Text = "试题类型";
//
// pnl_st3
//
this.pnl_st3.Controls.Add(this.btn_qx);
this.pnl_st3.Controls.Add(this.btn_qrtj);
this.pnl_st3.Controls.Add(this.btn_fjtp);
this.pnl_st3.Controls.Add(this.btn_xg);
this.pnl_st3.Controls.Add(this.btn_sc);
this.pnl_st3.Controls.Add(this.btn_tj);
this.pnl_st3.Controls.Add(this.btn_mjl);
this.pnl_st3.Controls.Add(this.btn_hyjl);
this.pnl_st3.Controls.Add(this.btn_qyjl);
this.pnl_st3.Controls.Add(this.btn_sjl);
this.pnl_st3.Location = new System.Drawing.Point(16, 504);
this.pnl_st3.Name = "pnl_st3";
this.pnl_st3.Size = new System.Drawing.Size(760, 40);
this.pnl_st3.TabIndex = 2;
//
// btn_qx
//
this.btn_qx.Location = new System.Drawing.Point(664, 8);
this.btn_qx.Name = "btn_qx";
this.btn_qx.Size = new System.Drawing.Size(64, 23);
this.btn_qx.TabIndex = 9;
this.btn_qx.Text = "取消";
this.btn_qx.Click += new System.EventHandler(this.btn_qx_Click);
//
// btn_qrtj
//
this.btn_qrtj.Location = new System.Drawing.Point(592, 8);
this.btn_qrtj.Name = "btn_qrtj";
this.btn_qrtj.Size = new System.Drawing.Size(64, 23);
this.btn_qrtj.TabIndex = 8;
this.btn_qrtj.Text = "确认提交";
this.btn_qrtj.Click += new System.EventHandler(this.btn_qrtj_Click);
//
// btn_fjtp
//
this.btn_fjtp.Location = new System.Drawing.Point(520, 8);
this.btn_fjtp.Name = "btn_fjtp";
this.btn_fjtp.Size = new System.Drawing.Size(64, 23);
this.btn_fjtp.TabIndex = 7;
this.btn_fjtp.Text = "附加图片";
this.btn_fjtp.Click += new System.EventHandler(this.btn_fjtp_Click);
//
// btn_xg
//
this.btn_xg.Location = new System.Drawing.Point(448, 8);
this.btn_xg.Name = "btn_xg";
this.btn_xg.Size = new System.Drawing.Size(64, 23);
this.btn_xg.TabIndex = 6;
this.btn_xg.Text = "修改";
this.btn_xg.Click += new System.EventHandler(this.btn_xg_Click);
//
// btn_sc
//
this.btn_sc.Location = new System.Drawing.Point(376, 8);
this.btn_sc.Name = "btn_sc";
this.btn_sc.Size = new System.Drawing.Size(64, 23);
this.btn_sc.TabIndex = 5;
this.btn_sc.Text = "删除";
this.btn_sc.Click += new System.EventHandler(this.btn_sc_Click);
//
// btn_tj
//
this.btn_tj.Location = new System.Drawing.Point(304, 8);
this.btn_tj.Name = "btn_tj";
this.btn_tj.Size = new System.Drawing.Size(64, 23);
this.btn_tj.TabIndex = 4;
this.btn_tj.Text = "添加 ";
this.btn_tj.Click += new System.EventHandler(this.btn_tj_Click);
//
// btn_mjl
//
this.btn_mjl.Location = new System.Drawing.Point(232, 8);
this.btn_mjl.Name = "btn_mjl";
this.btn_mjl.Size = new System.Drawing.Size(64, 23);
this.btn_mjl.TabIndex = 3;
this.btn_mjl.Text = "末记录 ";
this.btn_mjl.Click += new System.EventHandler(this.btn_mjl_Click);
//
// btn_hyjl
//
this.btn_hyjl.Location = new System.Drawing.Point(160, 8);
this.btn_hyjl.Name = "btn_hyjl";
this.btn_hyjl.Size = new System.Drawing.Size(64, 23);
this.btn_hyjl.TabIndex = 2;
this.btn_hyjl.Text = "后一记录 ";
this.btn_hyjl.Click += new System.EventHandler(this.btn_hyjl_Click);
//
// btn_qyjl
//
this.btn_qyjl.Location = new System.Drawing.Point(88, 8);
this.btn_qyjl.Name = "btn_qyjl";
this.btn_qyjl.Size = new System.Drawing.Size(64, 23);
this.btn_qyjl.TabIndex = 1;
this.btn_qyjl.Text = "前一记录 ";
this.btn_qyjl.Click += new System.EventHandler(this.btn_qyjl_Click);
//
// btn_sjl
//
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -