📄 stock.cs
字号:
this.btnPrint.Name = "btnPrint";
this.btnPrint.Size = new System.Drawing.Size(56, 24);
this.btnPrint.TabIndex = 35;
this.btnPrint.Text = "报表";
//
// btnExit
//
this.btnExit.Location = new System.Drawing.Point(560, 371);
this.btnExit.Name = "btnExit";
this.btnExit.Size = new System.Drawing.Size(72, 24);
this.btnExit.TabIndex = 36;
this.btnExit.Text = "退出";
this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
//
// btnCancel
//
this.btnCancel.Location = new System.Drawing.Point(464, 344);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(72, 24);
this.btnCancel.TabIndex = 37;
this.btnCancel.Text = "取消";
this.btnCancel.Click += new System.EventHandler(this.btnCancel_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";
//
// sqlDataAdapterStock
//
this.sqlDataAdapterStock.DeleteCommand = this.sqlDeleteCommand1;
this.sqlDataAdapterStock.InsertCommand = this.sqlInsertCommand1;
this.sqlDataAdapterStock.SelectCommand = this.sqlSelectCommand1;
this.sqlDataAdapterStock.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
new System.Data.Common.DataTableMapping("Table", "Stock", new System.Data.Common.DataColumnMapping[] {
new System.Data.Common.DataColumnMapping("StockId", "StockId"),
new System.Data.Common.DataColumnMapping("ProviderId", "ProviderId"),
new System.Data.Common.DataColumnMapping("ProductId", "ProductId"),
new System.Data.Common.DataColumnMapping("ProductAmount", "ProductAmount"),
new System.Data.Common.DataColumnMapping("ProductPrice", "ProductPrice"),
new System.Data.Common.DataColumnMapping("StockDate", "StockDate"),
new System.Data.Common.DataColumnMapping("StockRemark", "StockRemark")})});
this.sqlDataAdapterStock.UpdateCommand = this.sqlUpdateCommand1;
//
// sqlDataAdapterProvider
//
this.sqlDataAdapterProvider.DeleteCommand = this.sqlDeleteCommand2;
this.sqlDataAdapterProvider.InsertCommand = this.sqlInsertCommand2;
this.sqlDataAdapterProvider.SelectCommand = this.sqlSelectCommand2;
this.sqlDataAdapterProvider.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
new System.Data.Common.DataTableMapping("Table", "Provider", new System.Data.Common.DataColumnMapping[] {
new System.Data.Common.DataColumnMapping("ProviderId", "ProviderId"),
new System.Data.Common.DataColumnMapping("ProviderName", "ProviderName")})});
this.sqlDataAdapterProvider.UpdateCommand = this.sqlUpdateCommand2;
//
// sqlDataAdapterProduct
//
this.sqlDataAdapterProduct.DeleteCommand = this.sqlDeleteCommand3;
this.sqlDataAdapterProduct.InsertCommand = this.sqlInsertCommand3;
this.sqlDataAdapterProduct.SelectCommand = this.sqlSelectCommand3;
this.sqlDataAdapterProduct.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
new System.Data.Common.DataTableMapping("Table", "Product", new System.Data.Common.DataColumnMapping[] {
new System.Data.Common.DataColumnMapping("ProductId", "ProductId"),
new System.Data.Common.DataColumnMapping("ProductName", "ProductName"),
new System.Data.Common.DataColumnMapping("ProductSpecity", "ProductSpecity"),
new System.Data.Common.DataColumnMapping("ProductUnit", "ProductUnit")})});
this.sqlDataAdapterProduct.UpdateCommand = this.sqlUpdateCommand3;
//
// sqlDeleteCommand3
//
this.sqlDeleteCommand3.CommandText = @"DELETE FROM Product WHERE (ProductId = @Original_ProductId) AND (ProductName = @Original_ProductName OR @Original_ProductName IS NULL AND ProductName IS NULL) AND (ProductSpecity = @Original_ProductSpecity OR @Original_ProductSpecity IS NULL AND ProductSpecity IS NULL) AND (ProductUnit = @Original_ProductUnit OR @Original_ProductUnit IS NULL AND ProductUnit IS NULL)";
this.sqlDeleteCommand3.Connection = this.sqlConnection1;
this.sqlDeleteCommand3.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductId", System.Data.SqlDbType.VarChar, 3, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ProductId", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand3.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.sqlDeleteCommand3.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductSpecity", System.Data.SqlDbType.VarChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ProductSpecity", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand3.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductUnit", System.Data.SqlDbType.VarChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ProductUnit", System.Data.DataRowVersion.Original, null));
//
// sqlInsertCommand3
//
this.sqlInsertCommand3.CommandText = "INSERT INTO Product(ProductId, ProductName, ProductSpecity, ProductUnit) VALUES (" +
"@ProductId, @ProductName, @ProductSpecity, @ProductUnit); SELECT ProductId, Prod" +
"uctName, ProductSpecity, ProductUnit FROM Product WHERE (ProductId = @ProductId)" +
"";
this.sqlInsertCommand3.Connection = this.sqlConnection1;
this.sqlInsertCommand3.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductId", System.Data.SqlDbType.VarChar, 3, "ProductId"));
this.sqlInsertCommand3.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductName", System.Data.SqlDbType.VarChar, 20, "ProductName"));
this.sqlInsertCommand3.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductSpecity", System.Data.SqlDbType.VarChar, 20, "ProductSpecity"));
this.sqlInsertCommand3.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductUnit", System.Data.SqlDbType.VarChar, 10, "ProductUnit"));
//
// sqlSelectCommand3
//
this.sqlSelectCommand3.CommandText = "SELECT ProductId, ProductName, ProductSpecity, ProductUnit FROM Product";
this.sqlSelectCommand3.Connection = this.sqlConnection1;
//
// sqlUpdateCommand3
//
this.sqlUpdateCommand3.CommandText = @"UPDATE Product SET ProductId = @ProductId, ProductName = @ProductName, ProductSpecity = @ProductSpecity, ProductUnit = @ProductUnit WHERE (ProductId = @Original_ProductId) AND (ProductName = @Original_ProductName OR @Original_ProductName IS NULL AND ProductName IS NULL) AND (ProductSpecity = @Original_ProductSpecity OR @Original_ProductSpecity IS NULL AND ProductSpecity IS NULL) AND (ProductUnit = @Original_ProductUnit OR @Original_ProductUnit IS NULL AND ProductUnit IS NULL); SELECT ProductId, ProductName, ProductSpecity, ProductUnit FROM Product WHERE (ProductId = @ProductId)";
this.sqlUpdateCommand3.Connection = this.sqlConnection1;
this.sqlUpdateCommand3.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductId", System.Data.SqlDbType.VarChar, 3, "ProductId"));
this.sqlUpdateCommand3.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductName", System.Data.SqlDbType.VarChar, 20, "ProductName"));
this.sqlUpdateCommand3.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductSpecity", System.Data.SqlDbType.VarChar, 20, "ProductSpecity"));
this.sqlUpdateCommand3.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductUnit", System.Data.SqlDbType.VarChar, 10, "ProductUnit"));
this.sqlUpdateCommand3.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductId", System.Data.SqlDbType.VarChar, 3, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ProductId", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand3.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.sqlUpdateCommand3.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductSpecity", System.Data.SqlDbType.VarChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ProductSpecity", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand3.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductUnit", System.Data.SqlDbType.VarChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ProductUnit", System.Data.DataRowVersion.Original, null));
//
// sqlSelectCommand1
//
this.sqlSelectCommand1.CommandText = "SELECT StockId, ProviderId, ProductId, ProductAmount, ProductPrice, StockDate, St" +
"ockRemark FROM Stock";
this.sqlSelectCommand1.Connection = this.sqlConnection1;
//
// sqlInsertCommand1
//
this.sqlInsertCommand1.CommandText = @"INSERT INTO Stock(StockId, ProviderId, ProductId, ProductAmount, ProductPrice, StockDate, StockRemark) VALUES (@StockId, @ProviderId, @ProductId, @ProductAmount, @ProductPrice, @StockDate, @StockRemark); SELECT StockId, ProviderId, ProductId, ProductAmount, ProductPrice, StockDate, StockRemark FROM Stock WHERE (StockId = @StockId)";
this.sqlInsertCommand1.Connection = this.sqlConnection1;
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StockId", System.Data.SqlDbType.VarChar, 10, "StockId"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProviderId", System.Data.SqlDbType.VarChar, 3, "ProviderId"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductId", System.Data.SqlDbType.VarChar, 3, "ProductId"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductAmount", System.Data.SqlDbType.Int, 4, "ProductAmount"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductPrice", System.Data.SqlDbType.Float, 8, "ProductPrice"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StockDate", System.Data.SqlDbType.DateTime, 8, "StockDate"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StockRemark", System.Data.SqlDbType.VarChar, 50, "StockRemark"));
//
// sqlUpdateCommand1
//
this.sqlUpdateCommand1.CommandText = @"UPDATE Stock SET StockId = @StockId, ProviderId = @ProviderId, ProductId = @ProductId, ProductAmount = @ProductAmount, ProductPrice = @ProductPrice, StockDate = @StockDate, StockRemark = @StockRemark WHERE (StockId = @Original_StockId) AND (ProductAmount = @Original_ProductAmount OR @Original_ProductAmount IS NULL AND ProductAmount IS NULL) AND (ProductId = @Original_ProductId OR @Original_ProductId IS NULL AND ProductId IS NULL) AND (ProductPrice = @Original_ProductPrice OR @Original_ProductPrice IS NULL AND ProductPrice IS NULL) AND (ProviderId = @Original_ProviderId OR @Original_ProviderId IS NULL AND ProviderId IS NULL) AND (StockDate = @Original_StockDate OR @Original_StockDate IS NULL AND StockDate IS NULL) AND (StockRemark = @Original_StockRemark OR @Original_StockRemark IS NULL AND StockRemark IS NULL); SELECT StockId, ProviderId, ProductId, ProductAmount, ProductPrice, StockDate, StockRemark FROM Stock WHERE (StockId = @StockId)";
this.sqlUpdateCommand1.Connection = this.sqlConnection1;
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StockId", System.Data.SqlDbType.VarChar, 10, "StockId"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProviderId", System.Data.SqlDbType.VarChar, 3, "ProviderId"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductId", System.Data.SqlDbType.VarChar, 3, "ProductId"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductAmount", System.Data.SqlDbType.Int, 4, "ProductAmount"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductPrice", System.Data.SqlDbType.Float, 8, "ProductPrice"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StockDate", System.Data.SqlDbType.DateTime, 8, "StockDate"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StockRemark", System.Data.SqlDbType.VarChar, 50, "StockRemark"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StockId", System.Data.SqlDbType.VarChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "StockId", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductAmount", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ProductAmount", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductId", System.Data.SqlDbType.VarChar, 3, 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_ProductPrice", System.Data.SqlDbType.Float, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ProductPrice", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProviderId", System.Data.SqlDbType.VarChar, 3, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ProviderId", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StockDate", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "StockDate", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StockRemark", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "StockRemark", System.Data.DataRowVersion.Original, null));
//
// sqlDeleteCommand1
//
this.sqlDeleteCommand1.CommandText = @"DELETE FROM Stock WHERE (StockId = @Original_StockId) AND (ProductAmount = @Original_ProductAmount OR @Original_ProductAmount IS NULL AND ProductAmount IS NULL) AND (ProductId = @Original_ProductId OR @Original_ProductId IS NULL AND ProductId IS NULL) AND (ProductPrice = @Original_ProductPrice OR @Original_ProductPrice IS NULL AND ProductPrice IS NULL) AND (ProviderId = @Original_ProviderId OR @Original_ProviderId IS NULL AND ProviderId IS NULL) AND (StockDate = @Original_StockDate OR @Original_StockDate IS NULL AND StockDate IS NULL) AND (StockRemark = @Original_StockRemark OR @Original_StockRemark IS NULL AND StockRemark IS NULL)";
this.sqlDeleteCommand1.Connection = this.sqlConnection1;
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StockId", System.Data.SqlDbType.VarChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "StockId", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductAmount", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ProductAmount", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductId", System.Data.SqlDbType.VarChar, 3, 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_ProductPrice", System.Data.SqlDbType.Float, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ProductPrice", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProviderId", System.Data.SqlDbType.VarChar, 3, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ProviderId", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StockDate", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "StockDate", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StockRemark", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "StockRemark", System.Data.DataRowVersion.Original, null));
//
// sqlSelectCommand2
//
this.sqlSelectCommand2.CommandText = "SELECT ProviderId, ProviderName FROM Provider";
this.sqlSelectCommand2.Connection = this.sqlConnection1;
//
// sqlInsertCommand2
//
this.sqlInsertCommand2.CommandText = "INSERT INTO Provider(ProviderId, ProviderName) VALUES (@ProviderId, @ProviderName" +
"); SELECT ProviderId, ProviderName FROM Provider WHERE (ProviderId = @ProviderId" +
")";
this.sqlInsertCommand2.Connection = this.sqlConnection1;
this.sqlInsertCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProviderId", System.Data.SqlDbType.VarChar, 3, "ProviderId"));
this.sqlInsertCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProviderName", System.Data.SqlDbType.VarChar, 20, "ProviderName"));
//
// sqlUpdateCommand2
//
this.sqlUpdateCommand2.CommandText = @"UPDATE Provider SET ProviderId = @ProviderId, ProviderName = @ProviderName WHERE (ProviderId = @Original_ProviderId) AND (ProviderName = @Original_ProviderName OR @Original_ProviderName IS NULL AND ProviderName IS NULL); SELECT ProviderId, ProviderName FROM Provider WHERE (ProviderId = @ProviderId)";
this.sqlUpdateCommand2.Connection = this.sqlConnection1;
this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProviderId", System.Data.SqlDbType.VarChar, 3, "ProviderId"));
this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProviderName", System.Data.SqlDbType.VarChar, 20, "ProviderName"));
this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProviderId", System.Data.SqlDbType.VarChar, 3, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ProviderId", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProviderName", System.Data.SqlDbType.VarChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ProviderName", System.Data.DataRowVersion.Original, null));
//
// sqlDeleteCommand2
//
this.sqlDeleteCommand2.CommandText = "DELETE FROM Provider WHERE (ProviderId = @Original_ProviderId) AND (ProviderName " +
"= @Original_ProviderName OR @Original_ProviderName IS NULL AND ProviderName IS N" +
"ULL)";
this.sqlDeleteCommand2.Connection = this.sqlConnection1;
this.sqlDeleteCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProviderId", System.Data.SqlDbType.VarChar, 3, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ProviderId", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProviderName", System.Data.SqlDbType.VarChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ProviderName", System.Data.DataRowVersion.Original, null));
//
// Stock
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(648, 421);
this.Controls.Add(this.btnApply);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.btnAdd);
this.Controls.Add(this.btnDelete);
this.Controls.Add(this.btnQuery);
this.Controls.Add(this.btnModify);
this.Controls.Add(this.btnPrint);
this.Controls.Add(this.btnExit);
this.Controls.Add(this.btnCancel);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "Stock";
this.Text = "进货信息维护";
this.Load += new System.EventHandler(this.Stock_Load);
this.groupBox1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.objDataSetStock)).EndInit();
this.groupBox2.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
public void ErrorHandle(System.Exception E)
{
MessageBox.Show(E.ToString());
}
private void ButtonPositonChange()
{
this.btnPrevious.Enabled=true;
this.btnNext.Enabled=true;
this.btnFirst.Enabled=true;
this.btnLast.Enabled=true;
if(this.BindingContext[this.objDataSetStock,"Stock"].Position==0)
{
this.btnFirst.Enabled=false;
this.btnPrevious.Enabled=false;
}
if(this.BindingContext[this.objDataSetStock,"Stock"].Position==this.BindingContext[this.objDataSetStock,"Stock"].Count-1)
{
this.btnNext.Enabled=false;
this.btnLast.Enabled=false;
}
}
private void DatasetPostionChange()
{
this.lblDatasetPosition.Text=(this.BindingContext[this.objDataSetStock,"Stock"].Position+1)+"的"+
(this.BindingContext[this.objDataSetStock,"Stock"].Count);
}
private void TextEnableControl(bool valid)
{
if(valid)
{
this.textStockId.Enabled=true;
this.textProviderId.Enabled=true;
this.textProductId.Enabled=true;
this.textProductName.Enabled=true;
this.textProviderName.Enabled=true;
this.textProductSpecity.Enabled=true;
this.textProductUnit.Enabled=true;
this.textStockAmount.Enabled=true;
this.textStockDate.Enabled=true;;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -