📄 user.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace Sale
{
/// <summary>
/// Form5 的摘要说明。
/// </summary>
public class User : System.Windows.Forms.Form
{
private System.Windows.Forms.Button btnApply;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label lblDatasetPosition;
private System.Windows.Forms.Button btnLast;
private System.Windows.Forms.Button btnNext;
private System.Windows.Forms.Button btnPrevious;
private System.Windows.Forms.Button btnFirst;
private System.Windows.Forms.TextBox textSpecity;
private System.Windows.Forms.TextBox textName;
private System.Windows.Forms.TextBox textId;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.TextBox textRemark;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnAdd;
private System.Windows.Forms.Button btnDelete;
private System.Windows.Forms.Button btnModify;
private System.Windows.Forms.Button btnExit;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnPrint;
private System.Windows.Forms.Button btnQuery;
private System.Data.SqlClient.SqlConnection sqlConnection1;
private System.Data.SqlClient.SqlDataAdapter sqlDataAdapter1;
private System.Data.SqlClient.SqlCommand sqlSelectCommand1;
private System.Data.SqlClient.SqlCommand sqlInsertCommand1;
private System.Data.SqlClient.SqlCommand sqlUpdateCommand1;
private System.Data.SqlClient.SqlCommand sqlDeleteCommand1;
private Sale.DataSetUser objDataSetUser;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public User()
{
//
// 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()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(User));
this.btnApply = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.lblDatasetPosition = new System.Windows.Forms.Label();
this.btnLast = new System.Windows.Forms.Button();
this.btnNext = new System.Windows.Forms.Button();
this.btnPrevious = new System.Windows.Forms.Button();
this.btnFirst = new System.Windows.Forms.Button();
this.textSpecity = new System.Windows.Forms.TextBox();
this.textName = new System.Windows.Forms.TextBox();
this.textId = new System.Windows.Forms.TextBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.textRemark = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.btnAdd = new System.Windows.Forms.Button();
this.btnDelete = new System.Windows.Forms.Button();
this.btnModify = new System.Windows.Forms.Button();
this.btnExit = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.btnPrint = new System.Windows.Forms.Button();
this.btnQuery = new System.Windows.Forms.Button();
this.sqlConnection1 = new System.Data.SqlClient.SqlConnection();
this.sqlDataAdapter1 = new System.Data.SqlClient.SqlDataAdapter();
this.sqlSelectCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlInsertCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlUpdateCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlDeleteCommand1 = new System.Data.SqlClient.SqlCommand();
this.objDataSetUser = new Sale.DataSetUser();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.objDataSetUser)).BeginInit();
this.SuspendLayout();
//
// btnApply
//
this.btnApply.Location = new System.Drawing.Point(408, 304);
this.btnApply.Name = "btnApply";
this.btnApply.Size = new System.Drawing.Size(72, 32);
this.btnApply.TabIndex = 38;
this.btnApply.Text = "应用";
this.btnApply.Click += new System.EventHandler(this.btnApply_Click);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.lblDatasetPosition);
this.groupBox1.Controls.Add(this.btnLast);
this.groupBox1.Controls.Add(this.btnNext);
this.groupBox1.Controls.Add(this.btnPrevious);
this.groupBox1.Controls.Add(this.btnFirst);
this.groupBox1.Controls.Add(this.textSpecity);
this.groupBox1.Controls.Add(this.textName);
this.groupBox1.Controls.Add(this.textId);
this.groupBox1.Controls.Add(this.groupBox2);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.groupBox1.Location = new System.Drawing.Point(16, 16);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(488, 266);
this.groupBox1.TabIndex = 30;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "用户信息";
//
// lblDatasetPosition
//
this.lblDatasetPosition.BackColor = System.Drawing.Color.White;
this.lblDatasetPosition.Location = new System.Drawing.Point(104, 24);
this.lblDatasetPosition.Name = "lblDatasetPosition";
this.lblDatasetPosition.Size = new System.Drawing.Size(64, 23);
this.lblDatasetPosition.TabIndex = 25;
this.lblDatasetPosition.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// btnLast
//
this.btnLast.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLast.Image = ((System.Drawing.Image)(resources.GetObject("btnLast.Image")));
this.btnLast.Location = new System.Drawing.Point(224, 24);
this.btnLast.Name = "btnLast";
this.btnLast.Size = new System.Drawing.Size(40, 24);
this.btnLast.TabIndex = 23;
this.btnLast.Click += new System.EventHandler(this.btnLast_Click);
//
// btnNext
//
this.btnNext.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnNext.Image = ((System.Drawing.Image)(resources.GetObject("btnNext.Image")));
this.btnNext.Location = new System.Drawing.Point(176, 24);
this.btnNext.Name = "btnNext";
this.btnNext.Size = new System.Drawing.Size(40, 24);
this.btnNext.TabIndex = 22;
this.btnNext.Click += new System.EventHandler(this.btnNext_Click);
//
// btnPrevious
//
this.btnPrevious.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnPrevious.Image = ((System.Drawing.Image)(resources.GetObject("btnPrevious.Image")));
this.btnPrevious.Location = new System.Drawing.Point(56, 24);
this.btnPrevious.Name = "btnPrevious";
this.btnPrevious.Size = new System.Drawing.Size(40, 24);
this.btnPrevious.TabIndex = 21;
this.btnPrevious.Click += new System.EventHandler(this.btnPrevious_Click);
//
// btnFirst
//
this.btnFirst.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnFirst.Image = ((System.Drawing.Image)(resources.GetObject("btnFirst.Image")));
this.btnFirst.Location = new System.Drawing.Point(8, 24);
this.btnFirst.Name = "btnFirst";
this.btnFirst.Size = new System.Drawing.Size(40, 24);
this.btnFirst.TabIndex = 20;
this.btnFirst.Click += new System.EventHandler(this.btnFirst_Click);
//
// textSpecity
//
this.textSpecity.Location = new System.Drawing.Point(96, 168);
this.textSpecity.Name = "textSpecity";
this.textSpecity.Size = new System.Drawing.Size(120, 23);
this.textSpecity.TabIndex = 12;
this.textSpecity.Text = "";
//
// textName
//
this.textName.Location = new System.Drawing.Point(96, 120);
this.textName.Name = "textName";
this.textName.Size = new System.Drawing.Size(120, 23);
this.textName.TabIndex = 11;
this.textName.Text = "";
//
// textId
//
this.textId.Cursor = System.Windows.Forms.Cursors.Arrow;
this.textId.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.objDataSetUser, "User.UserId"));
this.textId.Location = new System.Drawing.Point(96, 80);
this.textId.Name = "textId";
this.textId.Size = new System.Drawing.Size(120, 23);
this.textId.TabIndex = 10;
this.textId.Text = "";
//
// groupBox2
//
this.groupBox2.Controls.Add(this.textRemark);
this.groupBox2.Location = new System.Drawing.Point(232, 64);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(240, 160);
this.groupBox2.TabIndex = 9;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "信息备注";
//
// textRemark
//
this.textRemark.Location = new System.Drawing.Point(16, 24);
this.textRemark.Multiline = true;
this.textRemark.Name = "textRemark";
this.textRemark.Size = new System.Drawing.Size(208, 120);
this.textRemark.TabIndex = 0;
this.textRemark.Text = "";
//
// label3
//
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(16, 176);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(72, 23);
this.label3.TabIndex = 2;
this.label3.Text = "用户权限";
//
// label2
//
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(16, 128);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(72, 23);
this.label2.TabIndex = 1;
this.label2.Text = "用户姓名";
//
// label1
//
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(16, 88);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(72, 23);
this.label1.TabIndex = 0;
this.label1.Text = "用户编号";
//
// btnAdd
//
this.btnAdd.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAdd.Location = new System.Drawing.Point(520, 24);
this.btnAdd.Name = "btnAdd";
this.btnAdd.Size = new System.Drawing.Size(56, 24);
this.btnAdd.TabIndex = 31;
this.btnAdd.Text = "添加";
this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
//
// btnDelete
//
this.btnDelete.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnDelete.Location = new System.Drawing.Point(520, 64);
this.btnDelete.Name = "btnDelete";
this.btnDelete.Size = new System.Drawing.Size(56, 24);
this.btnDelete.TabIndex = 32;
this.btnDelete.Text = "删除";
this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click);
//
// btnModify
//
this.btnModify.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnModify.Location = new System.Drawing.Point(520, 112);
this.btnModify.Name = "btnModify";
this.btnModify.Size = new System.Drawing.Size(56, 24);
this.btnModify.TabIndex = 34;
this.btnModify.Text = "修改";
this.btnModify.Click += new System.EventHandler(this.btnModify_Click);
//
// btnExit
//
this.btnExit.Location = new System.Drawing.Point(488, 304);
this.btnExit.Name = "btnExit";
this.btnExit.Size = new System.Drawing.Size(72, 32);
this.btnExit.TabIndex = 36;
this.btnExit.Text = "退出";
this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
//
// btnCancel
//
this.btnCancel.Location = new System.Drawing.Point(328, 304);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(72, 32);
this.btnCancel.TabIndex = 37;
this.btnCancel.Text = "取消";
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// btnPrint
//
this.btnPrint.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnPrint.Location = new System.Drawing.Point(520, 152);
this.btnPrint.Name = "btnPrint";
this.btnPrint.Size = new System.Drawing.Size(56, 24);
this.btnPrint.TabIndex = 40;
this.btnPrint.Text = "报表";
//
// btnQuery
//
this.btnQuery.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnQuery.Location = new System.Drawing.Point(520, 192);
this.btnQuery.Name = "btnQuery";
this.btnQuery.Size = new System.Drawing.Size(56, 24);
this.btnQuery.TabIndex = 39;
this.btnQuery.Text = "查询";
this.btnQuery.Click += new System.EventHandler(this.btnQuery_Click);
//
// sqlConnection1
//
this.sqlConnection1.ConnectionString = "workstation id=\"TSINGHUA-AEBBD5\";packet size=4096;integrated security=SSPI;data s" +
"ource=\"TSINGHUA-AEBBD5\";persist security info=False;initial catalog=Sell";
//
// sqlDataAdapter1
//
this.sqlDataAdapter1.DeleteCommand = this.sqlDeleteCommand1;
this.sqlDataAdapter1.InsertCommand = this.sqlInsertCommand1;
this.sqlDataAdapter1.SelectCommand = this.sqlSelectCommand1;
this.sqlDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
new System.Data.Common.DataTableMapping("Table", "User", new System.Data.Common.DataColumnMapping[] {
new System.Data.Common.DataColumnMapping("UserId", "UserId"),
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -