📄 stock.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace Sale
{
/// <summary>
/// Form6 的摘要说明。
/// </summary>
public class Stock : 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.GroupBox groupBox2;
private System.Windows.Forms.Label label5;
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 btnQuery;
private System.Windows.Forms.Button btnModify;
private System.Windows.Forms.Button btnPrint;
private System.Windows.Forms.Button btnExit;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.TextBox textProviderId;
private System.Windows.Forms.TextBox textStockDate;
private System.Windows.Forms.TextBox textProviderName;
private System.Windows.Forms.TextBox textProductSpecity;
private System.Windows.Forms.TextBox textProductName;
private System.Windows.Forms.TextBox textProductId;
private System.Windows.Forms.TextBox textStockRemark;
private System.Windows.Forms.TextBox textStockId;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox textProductUnit;
private System.Data.SqlClient.SqlConnection sqlConnection1;
private System.Data.SqlClient.SqlDataAdapter sqlDataAdapterStock;
private System.Data.SqlClient.SqlDataAdapter sqlDataAdapterProvider;
private System.Data.SqlClient.SqlDataAdapter sqlDataAdapterProduct;
private System.Data.SqlClient.SqlCommand sqlSelectCommand3;
private System.Data.SqlClient.SqlCommand sqlInsertCommand3;
private System.Data.SqlClient.SqlCommand sqlUpdateCommand3;
private System.Data.SqlClient.SqlCommand sqlDeleteCommand3;
private Sale.DataSetStock objDataSetStock;
private System.Windows.Forms.TextBox textStockPrice;
private System.Windows.Forms.TextBox textStockAmount;
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 System.Data.SqlClient.SqlCommand sqlSelectCommand2;
private System.Data.SqlClient.SqlCommand sqlInsertCommand2;
private System.Data.SqlClient.SqlCommand sqlUpdateCommand2;
private System.Data.SqlClient.SqlCommand sqlDeleteCommand2;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public Stock()
{
//
// 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(Stock));
this.btnApply = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.textStockId = new System.Windows.Forms.TextBox();
this.objDataSetStock = new Sale.DataSetStock();
this.label10 = new System.Windows.Forms.Label();
this.textStockDate = new System.Windows.Forms.TextBox();
this.textStockPrice = new System.Windows.Forms.TextBox();
this.textStockAmount = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.textProviderName = new System.Windows.Forms.TextBox();
this.textProviderId = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
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.textProductUnit = new System.Windows.Forms.TextBox();
this.textProductSpecity = new System.Windows.Forms.TextBox();
this.textProductName = new System.Windows.Forms.TextBox();
this.textProductId = new System.Windows.Forms.TextBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.textStockRemark = new System.Windows.Forms.TextBox();
this.label5 = 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.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.btnExit = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.sqlConnection1 = new System.Data.SqlClient.SqlConnection();
this.sqlDataAdapterStock = new System.Data.SqlClient.SqlDataAdapter();
this.sqlDataAdapterProvider = new System.Data.SqlClient.SqlDataAdapter();
this.sqlDataAdapterProduct = new System.Data.SqlClient.SqlDataAdapter();
this.sqlDeleteCommand3 = new System.Data.SqlClient.SqlCommand();
this.sqlInsertCommand3 = new System.Data.SqlClient.SqlCommand();
this.sqlSelectCommand3 = new System.Data.SqlClient.SqlCommand();
this.sqlUpdateCommand3 = new System.Data.SqlClient.SqlCommand();
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.sqlSelectCommand2 = new System.Data.SqlClient.SqlCommand();
this.sqlInsertCommand2 = new System.Data.SqlClient.SqlCommand();
this.sqlUpdateCommand2 = new System.Data.SqlClient.SqlCommand();
this.sqlDeleteCommand2 = new System.Data.SqlClient.SqlCommand();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.objDataSetStock)).BeginInit();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
//
// btnApply
//
this.btnApply.Location = new System.Drawing.Point(464, 384);
this.btnApply.Name = "btnApply";
this.btnApply.Size = new System.Drawing.Size(72, 24);
this.btnApply.TabIndex = 38;
this.btnApply.Text = "应用";
this.btnApply.Click += new System.EventHandler(this.btnApply_Click);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.textStockId);
this.groupBox1.Controls.Add(this.label10);
this.groupBox1.Controls.Add(this.textStockDate);
this.groupBox1.Controls.Add(this.textStockPrice);
this.groupBox1.Controls.Add(this.textStockAmount);
this.groupBox1.Controls.Add(this.label7);
this.groupBox1.Controls.Add(this.label8);
this.groupBox1.Controls.Add(this.label9);
this.groupBox1.Controls.Add(this.textProviderName);
this.groupBox1.Controls.Add(this.textProviderId);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.label6);
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.textProductUnit);
this.groupBox1.Controls.Add(this.textProductSpecity);
this.groupBox1.Controls.Add(this.textProductName);
this.groupBox1.Controls.Add(this.textProductId);
this.groupBox1.Controls.Add(this.groupBox2);
this.groupBox1.Controls.Add(this.label5);
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(36, 16);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(576, 312);
this.groupBox1.TabIndex = 30;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "商品信息";
//
// textStockId
//
this.textStockId.Cursor = System.Windows.Forms.Cursors.Arrow;
this.textStockId.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.objDataSetStock, "Stock.StockId"));
this.textStockId.Location = new System.Drawing.Point(96, 64);
this.textStockId.Name = "textStockId";
this.textStockId.Size = new System.Drawing.Size(120, 23);
this.textStockId.TabIndex = 37;
this.textStockId.Text = "";
//
// objDataSetStock
//
this.objDataSetStock.DataSetName = "DataSetStock";
this.objDataSetStock.Locale = new System.Globalization.CultureInfo("zh-CN");
//
// label10
//
this.label10.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label10.Location = new System.Drawing.Point(16, 72);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(72, 23);
this.label10.TabIndex = 36;
this.label10.Text = "进货编号";
//
// textStockDate
//
this.textStockDate.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.objDataSetStock, "Stock.StockDate"));
this.textStockDate.Location = new System.Drawing.Point(400, 160);
this.textStockDate.Name = "textStockDate";
this.textStockDate.Size = new System.Drawing.Size(120, 23);
this.textStockDate.TabIndex = 35;
this.textStockDate.Text = "";
//
// textStockPrice
//
this.textStockPrice.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.objDataSetStock, "Stock.ProductPrice"));
this.textStockPrice.Location = new System.Drawing.Point(400, 120);
this.textStockPrice.Name = "textStockPrice";
this.textStockPrice.Size = new System.Drawing.Size(120, 23);
this.textStockPrice.TabIndex = 34;
this.textStockPrice.Text = "";
//
// textStockAmount
//
this.textStockAmount.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.objDataSetStock, "Stock.ProductAmount"));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -