📄 form_da.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Data;
namespace bizdb
{
/// <summary>
/// Form_da 的摘要说明。
/// </summary>
public class Form_da : System.Windows.Forms.Form
{
private System.Windows.Forms.Panel pnl_da1;
private System.Windows.Forms.Panel pnl_da2;
private System.Windows.Forms.Panel pnl_da3;
private System.Windows.Forms.Label lbl_kc;
private System.Windows.Forms.Label lbl_jxdy;
private System.Windows.Forms.ComboBox cbb_kc;
private System.Windows.Forms.ComboBox cbb_jxdy;
private System.Windows.Forms.Button btn_cx;
private System.Windows.Forms.Label lbl_yltp;
private System.Windows.Forms.PictureBox pcb_yltp;
private System.Windows.Forms.Button btn_sjl;
private System.Windows.Forms.Button btn_qyjl;
private System.Windows.Forms.Button btn_hyjl;
private System.Windows.Forms.Button btn_mjl;
private System.Windows.Forms.Button btn_tj;
private System.Windows.Forms.Button btn_sc;
private System.Windows.Forms.Button btn_xg;
private System.Windows.Forms.Button btn_fjtp;
private System.Windows.Forms.Button btn_qrtj;
private System.Windows.Forms.Button btn_qx;
private System.Windows.Forms.DataGrid dgd_st;
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.SqlClient.SqlCommand sqlcmd_sts;
private System.Data.DataSet dst_st = new System.Data.DataSet();
private System.Windows.Forms.DataGrid dgd_da;
private System.Windows.Forms.OpenFileDialog ofd_fjtp;
private byte bl_qx = 0;
private string cno;
private string jno;
private string stno;
private string tno = "";
private System.Windows.Forms.TextBox txt_danr;
private System.Windows.Forms.Label lbl_danr;
private System.Windows.Forms.CheckBox ckb_zqda;
private System.Windows.Forms.Label lbl_daxx;
private System.Windows.Forms.TextBox txt_daxx;
private System.Windows.Forms.Panel panel1;
private dbAccess db = new dbAccess();
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public Form_da()
{
//
// 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_da1 = 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_da2 = new System.Windows.Forms.Panel();
this.txt_daxx = new System.Windows.Forms.TextBox();
this.lbl_daxx = new System.Windows.Forms.Label();
this.ckb_zqda = new System.Windows.Forms.CheckBox();
this.txt_danr = new System.Windows.Forms.TextBox();
this.pcb_yltp = new System.Windows.Forms.PictureBox();
this.lbl_yltp = new System.Windows.Forms.Label();
this.lbl_danr = new System.Windows.Forms.Label();
this.pnl_da3 = 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.dgd_da = new System.Windows.Forms.DataGrid();
this.ofd_fjtp = new System.Windows.Forms.OpenFileDialog();
this.panel1 = new System.Windows.Forms.Panel();
this.pnl_da1.SuspendLayout();
this.pnl_da2.SuspendLayout();
this.pnl_da3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgd_st)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dgd_da)).BeginInit();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// pnl_da1
//
this.pnl_da1.Controls.Add(this.btn_cx);
this.pnl_da1.Controls.Add(this.cbb_jxdy);
this.pnl_da1.Controls.Add(this.cbb_kc);
this.pnl_da1.Controls.Add(this.lbl_jxdy);
this.pnl_da1.Controls.Add(this.lbl_kc);
this.pnl_da1.Location = new System.Drawing.Point(16, 16);
this.pnl_da1.Name = "pnl_da1";
this.pnl_da1.Size = new System.Drawing.Size(760, 104);
this.pnl_da1.TabIndex = 0;
//
// btn_cx
//
this.btn_cx.Location = new System.Drawing.Point(432, 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(80, 64);
this.cbb_jxdy.Name = "cbb_jxdy";
this.cbb_jxdy.Size = new System.Drawing.Size(256, 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(80, 16);
this.cbb_kc.Name = "cbb_kc";
this.cbb_kc.Size = new System.Drawing.Size(256, 20);
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(24, 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(24, 24);
this.lbl_kc.Name = "lbl_kc";
this.lbl_kc.Size = new System.Drawing.Size(56, 16);
this.lbl_kc.TabIndex = 1;
this.lbl_kc.Text = "课程";
//
// pnl_da2
//
this.pnl_da2.Controls.Add(this.txt_daxx);
this.pnl_da2.Controls.Add(this.lbl_daxx);
this.pnl_da2.Controls.Add(this.ckb_zqda);
this.pnl_da2.Controls.Add(this.txt_danr);
this.pnl_da2.Controls.Add(this.pcb_yltp);
this.pnl_da2.Controls.Add(this.lbl_yltp);
this.pnl_da2.Controls.Add(this.lbl_danr);
this.pnl_da2.Location = new System.Drawing.Point(16, 360);
this.pnl_da2.Name = "pnl_da2";
this.pnl_da2.Size = new System.Drawing.Size(760, 136);
this.pnl_da2.TabIndex = 1;
//
// txt_daxx
//
this.txt_daxx.Location = new System.Drawing.Point(424, 40);
this.txt_daxx.MaxLength = 1;
this.txt_daxx.Name = "txt_daxx";
this.txt_daxx.Size = new System.Drawing.Size(56, 21);
this.txt_daxx.TabIndex = 6;
this.txt_daxx.Text = "";
//
// lbl_daxx
//
this.lbl_daxx.Location = new System.Drawing.Point(424, 16);
this.lbl_daxx.Name = "lbl_daxx";
this.lbl_daxx.Size = new System.Drawing.Size(56, 16);
this.lbl_daxx.TabIndex = 5;
this.lbl_daxx.Text = "答案选项";
//
// ckb_zqda
//
this.ckb_zqda.Location = new System.Drawing.Point(424, 96);
this.ckb_zqda.Name = "ckb_zqda";
this.ckb_zqda.Size = new System.Drawing.Size(80, 24);
this.ckb_zqda.TabIndex = 4;
this.ckb_zqda.Text = "正确答案";
//
// txt_danr
//
this.txt_danr.AcceptsReturn = true;
this.txt_danr.Location = new System.Drawing.Point(96, 16);
this.txt_danr.Multiline = true;
this.txt_danr.Name = "txt_danr";
this.txt_danr.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.txt_danr.Size = new System.Drawing.Size(304, 104);
this.txt_danr.TabIndex = 3;
this.txt_danr.Text = "";
//
// pcb_yltp
//
this.pcb_yltp.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.pcb_yltp.Location = new System.Drawing.Point(608, 16);
this.pcb_yltp.Name = "pcb_yltp";
this.pcb_yltp.Size = new System.Drawing.Size(120, 104);
this.pcb_yltp.TabIndex = 2;
this.pcb_yltp.TabStop = false;
//
// lbl_yltp
//
this.lbl_yltp.Location = new System.Drawing.Point(520, 16);
this.lbl_yltp.Name = "lbl_yltp";
this.lbl_yltp.Size = new System.Drawing.Size(72, 23);
this.lbl_yltp.TabIndex = 1;
this.lbl_yltp.Text = "预览图片";
//
// lbl_danr
//
this.lbl_danr.Location = new System.Drawing.Point(24, 16);
this.lbl_danr.Name = "lbl_danr";
this.lbl_danr.Size = new System.Drawing.Size(56, 23);
this.lbl_danr.TabIndex = 0;
this.lbl_danr.Text = "答案内容";
//
// pnl_da3
//
this.pnl_da3.Controls.Add(this.btn_qx);
this.pnl_da3.Controls.Add(this.btn_qrtj);
this.pnl_da3.Controls.Add(this.btn_fjtp);
this.pnl_da3.Controls.Add(this.btn_xg);
this.pnl_da3.Controls.Add(this.btn_sc);
this.pnl_da3.Controls.Add(this.btn_tj);
this.pnl_da3.Controls.Add(this.btn_mjl);
this.pnl_da3.Controls.Add(this.btn_hyjl);
this.pnl_da3.Controls.Add(this.btn_qyjl);
this.pnl_da3.Controls.Add(this.btn_sjl);
this.pnl_da3.Location = new System.Drawing.Point(16, 504);
this.pnl_da3.Name = "pnl_da3";
this.pnl_da3.Size = new System.Drawing.Size(760, 40);
this.pnl_da3.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
//
this.btn_sjl.Location = new System.Drawing.Point(16, 8);
this.btn_sjl.Name = "btn_sjl";
this.btn_sjl.Size = new System.Drawing.Size(64, 23);
this.btn_sjl.TabIndex = 0;
this.btn_sjl.Text = "首记录 ";
this.btn_sjl.Click += new System.EventHandler(this.btn_sjl_Click);
//
// dgd_st
//
this.dgd_st.DataMember = "";
this.dgd_st.HeaderForeColor = System.Drawing.SystemColors.ControlText;
this.dgd_st.Location = new System.Drawing.Point(8, 8);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -