📄 prosell.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
using Sale.DataLevel;
namespace Sale.UILevel
{
/// <summary>
/// ProSell 的摘要说明。
/// </summary>
public class ProSell : System.Windows.Forms.Form
{
private System.Windows.Forms.Button btnApply;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.TextBox textPeople;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.TextBox textRemark;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Button btnExit;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.TextBox textProNumber;
private System.Windows.Forms.TextBox textProPrice;
private System.Windows.Forms.TextBox textClientID;
private System.Windows.Forms.TextBox textProID;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.ComboBox combUnit;
private System.Windows.Forms.DateTimePicker dateTimePicker1;
private System.Windows.Forms.DataGrid dataGrid1;
private System.Windows.Forms.Button btnAdd;
private System.Data.SqlClient.SqlConnection sqlConnection1;
private System.Data.SqlClient.SqlDataAdapter sqlDataAdapter1;
private System.Windows.Forms.DataGridTableStyle dataGridTableStyle1;
private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn1;
private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn2;
private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn5;
private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn6;
private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn7;
private System.Windows.Forms.Button btnModify;
private System.Windows.Forms.TextBox textProSellID;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn9;
private System.Windows.Forms.Button btnDelete;
private System.Windows.Forms.TextBox textClientName;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.TextBox textProName;
private System.Windows.Forms.Label label10;
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.DataLevel.DataSetProSell objDataSetProSell;
private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn3;
private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn4;
private Sale.BussinessRule.AddName addName;
private Sale.BussinessRule.ModifyProStock modifyProStock;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public ProSell()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
addName=new Sale.BussinessRule.AddName();
modifyProStock=new Sale.BussinessRule.ModifyProStock();
//
// 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(ProSell));
this.btnApply = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.textProName = new System.Windows.Forms.TextBox();
this.objDataSetProSell = new Sale.DataLevel.DataSetProSell();
this.label10 = new System.Windows.Forms.Label();
this.textClientName = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
this.textProSellID = new System.Windows.Forms.TextBox();
this.label8 = new System.Windows.Forms.Label();
this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
this.combUnit = new System.Windows.Forms.ComboBox();
this.textProID = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.textProNumber = new System.Windows.Forms.TextBox();
this.textProPrice = new System.Windows.Forms.TextBox();
this.textPeople = new System.Windows.Forms.TextBox();
this.textClientID = new System.Windows.Forms.TextBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.textRemark = new System.Windows.Forms.TextBox();
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.btnExit = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.dataGrid1 = new System.Windows.Forms.DataGrid();
this.dataGridTableStyle1 = new System.Windows.Forms.DataGridTableStyle();
this.dataGridTextBoxColumn9 = new System.Windows.Forms.DataGridTextBoxColumn();
this.dataGridTextBoxColumn1 = new System.Windows.Forms.DataGridTextBoxColumn();
this.dataGridTextBoxColumn2 = new System.Windows.Forms.DataGridTextBoxColumn();
this.dataGridTextBoxColumn3 = new System.Windows.Forms.DataGridTextBoxColumn();
this.dataGridTextBoxColumn4 = new System.Windows.Forms.DataGridTextBoxColumn();
this.dataGridTextBoxColumn5 = new System.Windows.Forms.DataGridTextBoxColumn();
this.dataGridTextBoxColumn6 = new System.Windows.Forms.DataGridTextBoxColumn();
this.dataGridTextBoxColumn7 = new System.Windows.Forms.DataGridTextBoxColumn();
this.btnAdd = new System.Windows.Forms.Button();
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.btnModify = new System.Windows.Forms.Button();
this.btnDelete = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.objDataSetProSell)).BeginInit();
this.groupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
this.SuspendLayout();
//
// 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(312, 240);
this.btnApply.Name = "btnApply";
this.btnApply.Size = new System.Drawing.Size(56, 24);
this.btnApply.TabIndex = 37;
this.btnApply.Text = "确定";
this.btnApply.Click += new System.EventHandler(this.btnApply_Click);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.textProName);
this.groupBox1.Controls.Add(this.label10);
this.groupBox1.Controls.Add(this.textClientName);
this.groupBox1.Controls.Add(this.label9);
this.groupBox1.Controls.Add(this.textProSellID);
this.groupBox1.Controls.Add(this.label8);
this.groupBox1.Controls.Add(this.dateTimePicker1);
this.groupBox1.Controls.Add(this.combUnit);
this.groupBox1.Controls.Add(this.textProID);
this.groupBox1.Controls.Add(this.label7);
this.groupBox1.Controls.Add(this.textProNumber);
this.groupBox1.Controls.Add(this.textProPrice);
this.groupBox1.Controls.Add(this.textPeople);
this.groupBox1.Controls.Add(this.textClientID);
this.groupBox1.Controls.Add(this.groupBox2);
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.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(8, 24);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(480, 208);
this.groupBox1.TabIndex = 30;
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.objDataSetProSell, "ProSell.ProductName"));
this.textProName.Location = new System.Drawing.Point(72, 80);
this.textProName.Name = "textProName";
this.textProName.Size = new System.Drawing.Size(120, 23);
this.textProName.TabIndex = 27;
this.textProName.Text = "";
//
// objDataSetProSell
//
this.objDataSetProSell.DataSetName = "DataSetProSell";
this.objDataSetProSell.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(8, 88);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(56, 23);
this.label10.TabIndex = 26;
this.label10.Text = "商品名称";
//
// textClientName
//
this.textClientName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textClientName.Cursor = System.Windows.Forms.Cursors.Arrow;
this.textClientName.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.objDataSetProSell, "ProSell.ClientName"));
this.textClientName.Location = new System.Drawing.Point(72, 144);
this.textClientName.Name = "textClientName";
this.textClientName.Size = new System.Drawing.Size(120, 23);
this.textClientName.TabIndex = 25;
this.textClientName.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, 144);
this.label9.Name = "label9";
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -