📄 procheck.cs
字号:
this.dataGridTextBoxColumn4.HeaderText = "商品数量";
this.dataGridTextBoxColumn4.MappingName = "ProStockNumber";
this.dataGridTextBoxColumn4.Width = 75;
//
// btnApply
//
this.btnApply.Image = ((System.Drawing.Image)(resources.GetObject("btnApply.Image")));
this.btnApply.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnApply.Location = new System.Drawing.Point(320, 176);
this.btnApply.Name = "btnApply";
this.btnApply.Size = new System.Drawing.Size(56, 24);
this.btnApply.TabIndex = 53;
this.btnApply.Text = "确定";
this.btnApply.Click += new System.EventHandler(this.btnApply_Click);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.textProName);
this.groupBox1.Controls.Add(this.label9);
this.groupBox1.Controls.Add(this.comboUnit);
this.groupBox1.Controls.Add(this.textProID);
this.groupBox1.Controls.Add(this.label7);
this.groupBox1.Controls.Add(this.textProNumber);
this.groupBox1.Controls.Add(this.groupBox2);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.label2);
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, 8);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(456, 160);
this.groupBox1.TabIndex = 50;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "商品盘点";
//
// textProName
//
this.textProName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textProName.Cursor = System.Windows.Forms.Cursors.Arrow;
this.textProName.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.objDataSetProStock, "ProStock.ProductName"));
this.textProName.Location = new System.Drawing.Point(80, 56);
this.textProName.Name = "textProName";
this.textProName.Size = new System.Drawing.Size(120, 23);
this.textProName.TabIndex = 25;
this.textProName.Text = "";
//
// label9
//
this.label9.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label9.Location = new System.Drawing.Point(8, 64);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(56, 23);
this.label9.TabIndex = 24;
this.label9.Text = "商品名称";
//
// comboUnit
//
this.comboUnit.DataBindings.Add(new System.Windows.Forms.Binding("SelectedItem", this.objDataSetProStock, "ProStock.ProductUnit"));
this.comboUnit.Items.AddRange(new object[] {
"-请选择-",
"千克",
"吨",
"台",
"箱",
"袋",
"套",
"件",
"辆"});
this.comboUnit.Location = new System.Drawing.Point(80, 104);
this.comboUnit.Name = "comboUnit";
this.comboUnit.Size = new System.Drawing.Size(121, 22);
this.comboUnit.TabIndex = 20;
this.comboUnit.Text = "-请选择-";
//
// textProID
//
this.textProID.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textProID.Cursor = System.Windows.Forms.Cursors.Arrow;
this.textProID.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.objDataSetProStock, "ProStock.ProductID"));
this.textProID.Location = new System.Drawing.Point(80, 24);
this.textProID.Name = "textProID";
this.textProID.Size = new System.Drawing.Size(120, 23);
this.textProID.TabIndex = 18;
this.textProID.Text = "";
//
// label7
//
this.label7.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label7.Location = new System.Drawing.Point(8, 24);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(72, 23);
this.label7.TabIndex = 17;
this.label7.Text = "商品编号";
//
// textProNumber
//
this.textProNumber.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textProNumber.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.objDataSetProStock, "ProStock.ProStockNumber"));
this.textProNumber.Location = new System.Drawing.Point(312, 16);
this.textProNumber.Name = "textProNumber";
this.textProNumber.Size = new System.Drawing.Size(128, 23);
this.textProNumber.TabIndex = 15;
this.textProNumber.Text = "";
//
// groupBox2
//
this.groupBox2.Controls.Add(this.textRemark);
this.groupBox2.Location = new System.Drawing.Point(248, 48);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(184, 104);
this.groupBox2.TabIndex = 9;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "信息备注";
//
// textRemark
//
this.textRemark.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textRemark.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.objDataSetProStock, "ProStock.ProStockRemark"));
this.textRemark.Location = new System.Drawing.Point(16, 24);
this.textRemark.Multiline = true;
this.textRemark.Name = "textRemark";
this.textRemark.Size = new System.Drawing.Size(152, 64);
this.textRemark.TabIndex = 0;
this.textRemark.Text = "";
//
// label4
//
this.label4.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label4.Location = new System.Drawing.Point(240, 24);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(56, 23);
this.label4.TabIndex = 3;
this.label4.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(8, 112);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(56, 23);
this.label2.TabIndex = 1;
this.label2.Text = "商品单位";
//
// btnExit
//
this.btnExit.Image = ((System.Drawing.Image)(resources.GetObject("btnExit.Image")));
this.btnExit.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnExit.Location = new System.Drawing.Point(408, 176);
this.btnExit.Name = "btnExit";
this.btnExit.Size = new System.Drawing.Size(64, 24);
this.btnExit.TabIndex = 51;
this.btnExit.Text = "退出";
this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
//
// btnCancel
//
this.btnCancel.Image = ((System.Drawing.Image)(resources.GetObject("btnCancel.Image")));
this.btnCancel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnCancel.Location = new System.Drawing.Point(240, 176);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(64, 24);
this.btnCancel.TabIndex = 52;
this.btnCancel.Text = "取消";
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// sqlConnection1
//
this.sqlConnection1.ConnectionString = "packet size=4096;integrated security=SSPI;data source=localhost;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", "ProStock", new System.Data.Common.DataColumnMapping[] {
new System.Data.Common.DataColumnMapping("ProductID", "ProductID"),
new System.Data.Common.DataColumnMapping("ProductName", "ProductName"),
new System.Data.Common.DataColumnMapping("ProductUnit", "ProductUnit"),
new System.Data.Common.DataColumnMapping("ProStockNumber", "ProStockNumber"),
new System.Data.Common.DataColumnMapping("ProStockRemark", "ProStockRemark")})});
this.sqlDataAdapter1.UpdateCommand = this.sqlUpdateCommand1;
//
// sqlDeleteCommand1
//
this.sqlDeleteCommand1.CommandText = @"DELETE FROM ProStock WHERE (ProductID = @Original_ProductID) AND (ProStockNumber = @Original_ProStockNumber OR @Original_ProStockNumber IS NULL AND ProStockNumber IS NULL) AND (ProStockRemark = @Original_ProStockRemark OR @Original_ProStockRemark IS NULL AND ProStockRemark IS NULL) AND (ProductName = @Original_ProductName OR @Original_ProductName IS NULL AND ProductName IS NULL) AND (ProductUnit = @Original_ProductUnit OR @Original_ProductUnit IS NULL AND ProductUnit IS NULL)";
this.sqlDeleteCommand1.Connection = this.sqlConnection1;
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductID", System.Data.SqlDbType.VarChar, 5, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ProductID", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProStockNumber", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ProStockNumber", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProStockRemark", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ProStockRemark", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductName", System.Data.SqlDbType.VarChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ProductName", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductUnit", System.Data.SqlDbType.VarChar, 5, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ProductUnit", System.Data.DataRowVersion.Original, null));
//
// sqlInsertCommand1
//
this.sqlInsertCommand1.CommandText = @"INSERT INTO ProStock(ProductID, ProductName, ProductUnit, ProStockNumber, ProStockRemark) VALUES (@ProductID, @ProductName, @ProductUnit, @ProStockNumber, @ProStockRemark); SELECT ProductID, ProductName, ProductUnit, ProStockNumber, ProStockRemark FROM ProStock WHERE (ProductID = @ProductID)";
this.sqlInsertCommand1.Connection = this.sqlConnection1;
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductID", System.Data.SqlDbType.VarChar, 5, "ProductID"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductName", System.Data.SqlDbType.VarChar, 20, "ProductName"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductUnit", System.Data.SqlDbType.VarChar, 5, "ProductUnit"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProStockNumber", System.Data.SqlDbType.Int, 4, "ProStockNumber"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProStockRemark", System.Data.SqlDbType.VarChar, 50, "ProStockRemark"));
//
// sqlSelectCommand1
//
this.sqlSelectCommand1.CommandText = "SELECT ProductID, ProductName, ProductUnit, ProStockNumber, ProStockRemark FROM P" +
"roStock";
this.sqlSelectCommand1.Connection = this.sqlConnection1;
//
// sqlUpdateCommand1
//
this.sqlUpdateCommand1.CommandText = @"UPDATE ProStock SET ProductID = @ProductID, ProductName = @ProductName, ProductUnit = @ProductUnit, ProStockNumber = @ProStockNumber, ProStockRemark = @ProStockRemark WHERE (ProductID = @Original_ProductID) AND (ProStockNumber = @Original_ProStockNumber OR @Original_ProStockNumber IS NULL AND ProStockNumber IS NULL) AND (ProStockRemark = @Original_ProStockRemark OR @Original_ProStockRemark IS NULL AND ProStockRemark IS NULL) AND (ProductName = @Original_ProductName OR @Original_ProductName IS NULL AND ProductName IS NULL) AND (ProductUnit = @Original_ProductUnit OR @Original_ProductUnit IS NULL AND ProductUnit IS NULL); SELECT ProductID, ProductName, ProductUnit, ProStockNumber, ProStockRemark FROM ProStock WHERE (ProductID = @ProductID)";
this.sqlUpdateCommand1.Connection = this.sqlConnection1;
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductID", System.Data.SqlDbType.VarChar, 5, "ProductID"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductName", System.Data.SqlDbType.VarChar, 20, "ProductName"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductUnit", System.Data.SqlDbType.VarChar, 5, "ProductUnit"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProStockNumber", System.Data.SqlDbType.Int, 4, "ProStockNumber"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProStockRemark", System.Data.SqlDbType.VarChar, 50, "ProStockRemark"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductID", System.Data.SqlDbType.VarChar, 5, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ProductID", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProStockNumber", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ProStockNumber", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProStockRemark", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ProStockRemark", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductName", System.Data.SqlDbType.VarChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ProductName", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductUnit", System.Data.SqlDbType.VarChar, 5, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ProductUnit", System.Data.DataRowVersion.Original, null));
//
// ProCheck
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(504, 397);
this.Controls.Add(this.btnDelete);
this.Controls.Add(this.btnModify);
this.Controls.Add(this.btnAdd);
this.Controls.Add(this.dataGrid1);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -