📄 provider.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace Sale
{
/// <summary>
/// Form2 的摘要说明。
/// </summary>
public class Provider : System.Windows.Forms.Form
{
private System.Windows.Forms.MainMenu mainMenu1;
private System.Windows.Forms.MenuItem menuItem1;
private System.Windows.Forms.MenuItem menuItem2;
private System.Windows.Forms.MenuItem menuItem3;
private System.Windows.Forms.MenuItem menuItem4;
private System.Windows.Forms.MenuItem menuItem5;
private System.Windows.Forms.MenuItem menuItem6;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.GroupBox groupBox2;
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.Label lblDatasetPosition;
private System.Windows.Forms.Button btnAdd;
private System.Windows.Forms.Button btnDelete;
private System.Windows.Forms.Button btnQuery;
private System.Windows.Forms.Button btnModify;
private System.Windows.Forms.Button btnPrint;
private System.Windows.Forms.Button btnExit;
private System.Windows.Forms.MenuItem menuExit;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.TextBox textWebSite;
private System.Windows.Forms.TextBox textAddress;
private System.Windows.Forms.TextBox textFaxNo;
private System.Windows.Forms.TextBox textTelNo;
private System.Windows.Forms.TextBox textPeople;
private System.Windows.Forms.TextBox textName;
private System.Windows.Forms.TextBox textId;
private System.Windows.Forms.TextBox textRemark;
private System.Windows.Forms.TextBox textPostalCode;
private System.Windows.Forms.Button btnApply;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.RadioButton rbtnId;
private System.Windows.Forms.RadioButton rbtnName;
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.DataSetProvider objDataSetProvider;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public Provider()
{
//
// 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(Provider));
this.mainMenu1 = new System.Windows.Forms.MainMenu();
this.menuItem6 = new System.Windows.Forms.MenuItem();
this.menuExit = new System.Windows.Forms.MenuItem();
this.menuItem1 = new System.Windows.Forms.MenuItem();
this.menuItem2 = new System.Windows.Forms.MenuItem();
this.menuItem3 = new System.Windows.Forms.MenuItem();
this.menuItem4 = new System.Windows.Forms.MenuItem();
this.menuItem5 = new System.Windows.Forms.MenuItem();
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.textWebSite = new System.Windows.Forms.TextBox();
this.textAddress = new System.Windows.Forms.TextBox();
this.textFaxNo = new System.Windows.Forms.TextBox();
this.textTelNo = new System.Windows.Forms.TextBox();
this.textPeople = new System.Windows.Forms.TextBox();
this.textName = new System.Windows.Forms.TextBox();
this.textId = new System.Windows.Forms.TextBox();
this.objDataSetProvider = new Sale.DataSetProvider();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.textRemark = new System.Windows.Forms.TextBox();
this.label8 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.textPostalCode = new System.Windows.Forms.TextBox();
this.btnCancel = new System.Windows.Forms.Button();
this.btnExit = new System.Windows.Forms.Button();
this.btnAdd = new System.Windows.Forms.Button();
this.btnDelete = new System.Windows.Forms.Button();
this.btnQuery = new System.Windows.Forms.Button();
this.btnModify = new System.Windows.Forms.Button();
this.btnPrint = new System.Windows.Forms.Button();
this.btnApply = new System.Windows.Forms.Button();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.rbtnName = new System.Windows.Forms.RadioButton();
this.rbtnId = new System.Windows.Forms.RadioButton();
this.sqlConnection1 = new System.Data.SqlClient.SqlConnection();
this.sqlDataAdapter1 = new System.Data.SqlClient.SqlDataAdapter();
this.sqlDeleteCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlInsertCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlSelectCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlUpdateCommand1 = new System.Data.SqlClient.SqlCommand();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.objDataSetProvider)).BeginInit();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
this.groupBox4.SuspendLayout();
this.SuspendLayout();
//
// mainMenu1
//
this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem6,
this.menuItem1});
//
// menuItem6
//
this.menuItem6.Index = 0;
this.menuItem6.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuExit});
this.menuItem6.Text = "文件(&F)";
//
// menuExit
//
this.menuExit.Index = 0;
this.menuExit.Text = "退出(&x)";
this.menuExit.Click += new System.EventHandler(this.menuItem7_Click);
//
// menuItem1
//
this.menuItem1.Index = 1;
this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem2,
this.menuItem3,
this.menuItem4,
this.menuItem5});
this.menuItem1.Text = "编辑(&E)";
//
// menuItem2
//
this.menuItem2.Index = 0;
this.menuItem2.Text = "添加供应商";
//
// menuItem3
//
this.menuItem3.Index = 1;
this.menuItem3.Text = "删除供应商";
//
// menuItem4
//
this.menuItem4.Index = 2;
this.menuItem4.Text = "编辑供应商";
//
// menuItem5
//
this.menuItem5.Index = 3;
this.menuItem5.Text = "查询供应商";
//
// 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.textWebSite);
this.groupBox1.Controls.Add(this.textAddress);
this.groupBox1.Controls.Add(this.textFaxNo);
this.groupBox1.Controls.Add(this.textTelNo);
this.groupBox1.Controls.Add(this.textPeople);
this.groupBox1.Controls.Add(this.textName);
this.groupBox1.Controls.Add(this.textId);
this.groupBox1.Controls.Add(this.groupBox2);
this.groupBox1.Controls.Add(this.label8);
this.groupBox1.Controls.Add(this.label7);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Controls.Add(this.textPostalCode);
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(24, 16);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(576, 304);
this.groupBox1.TabIndex = 1;
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 = 24;
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);
//
// textWebSite
//
this.textWebSite.Location = new System.Drawing.Point(88, 272);
this.textWebSite.Name = "textWebSite";
this.textWebSite.Size = new System.Drawing.Size(120, 23);
this.textWebSite.TabIndex = 17;
this.textWebSite.Text = "";
//
// textAddress
//
this.textAddress.Location = new System.Drawing.Point(376, 16);
this.textAddress.Name = "textAddress";
this.textAddress.Size = new System.Drawing.Size(120, 23);
this.textAddress.TabIndex = 15;
this.textAddress.Text = "";
//
// textFaxNo
//
this.textFaxNo.Location = new System.Drawing.Point(88, 232);
this.textFaxNo.Name = "textFaxNo";
this.textFaxNo.Size = new System.Drawing.Size(120, 23);
this.textFaxNo.TabIndex = 14;
this.textFaxNo.Text = "";
//
// textTelNo
//
this.textTelNo.Location = new System.Drawing.Point(88, 184);
this.textTelNo.Name = "textTelNo";
this.textTelNo.Size = new System.Drawing.Size(120, 23);
this.textTelNo.TabIndex = 13;
this.textTelNo.Text = "";
//
// textPeople
//
this.textPeople.Location = new System.Drawing.Point(88, 144);
this.textPeople.Name = "textPeople";
this.textPeople.Size = new System.Drawing.Size(120, 23);
this.textPeople.TabIndex = 12;
this.textPeople.Text = "";
//
// textName
//
this.textName.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.objDataSetProvider, "Provider.ProviderName"));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -