📄 frmdiscountmgmt.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.OleDb;
namespace SupermarketProject
{
/// <summary>
/// Summary description for frmDiscountMgmt.
/// </summary>
public class frmDiscountMgmt : System.Windows.Forms.Form
{
private System.Windows.Forms.Label lblStockId;
private System.Windows.Forms.ListView lvwStkId;
private System.Windows.Forms.Label lblDiscount;
private System.Windows.Forms.Label lblFrmDate;
private System.Windows.Forms.Label lblTodate;
private System.Windows.Forms.NumericUpDown updDiscount;
private System.Windows.Forms.DateTimePicker dtpFrmDate;
private System.Windows.Forms.DateTimePicker dtpToDate;
private System.Windows.Forms.Button btnAdd;
private System.Windows.Forms.Button btnUpdate;
private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.Label lblProductName;
private System.Windows.Forms.ListView lvwPrdName;
public string prodName;
public int stockId;
public stDiscount stDiscnt;
private System.Windows.Forms.GroupBox grpAddDiscount;
private System.Windows.Forms.GroupBox grpModDiscount;
private System.Windows.Forms.NumericUpDown updModDiscount;
private System.Windows.Forms.Label lblModToDate;
private System.Windows.Forms.Label lblModFrmDate;
private System.Windows.Forms.Label lblmodDiscount;
private System.Windows.Forms.DateTimePicker dtpModToDate;
private System.Windows.Forms.DateTimePicker dtpModFrmDate;
private System.Windows.Forms.HelpProvider hlpDiscountMgmt;
private System.Windows.Forms.ToolTip tipDiscountMgmt;
private System.ComponentModel.IContainer components;
private Settings settings;
public frmDiscountMgmt()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
settings = new Settings();
this.hlpDiscountMgmt.HelpNamespace = settings.uiDirectory+ @"\HELP\SupermarketHelp.chm";
//
// TODO: Add any constructor code after InitializeComponent call
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
/* [STAThread]
static void Main()
{
Application.Run(new frmDiscountMgmt());
}*/
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.lblProductName = new System.Windows.Forms.Label();
this.lblStockId = new System.Windows.Forms.Label();
this.lvwStkId = new System.Windows.Forms.ListView();
this.lvwPrdName = new System.Windows.Forms.ListView();
this.grpAddDiscount = new System.Windows.Forms.GroupBox();
this.dtpToDate = new System.Windows.Forms.DateTimePicker();
this.dtpFrmDate = new System.Windows.Forms.DateTimePicker();
this.updDiscount = new System.Windows.Forms.NumericUpDown();
this.lblTodate = new System.Windows.Forms.Label();
this.lblFrmDate = new System.Windows.Forms.Label();
this.lblDiscount = new System.Windows.Forms.Label();
this.btnAdd = new System.Windows.Forms.Button();
this.btnUpdate = new System.Windows.Forms.Button();
this.btnClose = new System.Windows.Forms.Button();
this.grpModDiscount = new System.Windows.Forms.GroupBox();
this.dtpModToDate = new System.Windows.Forms.DateTimePicker();
this.dtpModFrmDate = new System.Windows.Forms.DateTimePicker();
this.updModDiscount = new System.Windows.Forms.NumericUpDown();
this.lblModToDate = new System.Windows.Forms.Label();
this.lblModFrmDate = new System.Windows.Forms.Label();
this.lblmodDiscount = new System.Windows.Forms.Label();
this.hlpDiscountMgmt = new System.Windows.Forms.HelpProvider();
this.tipDiscountMgmt = new System.Windows.Forms.ToolTip(this.components);
this.grpAddDiscount.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.updDiscount)).BeginInit();
this.grpModDiscount.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.updModDiscount)).BeginInit();
this.SuspendLayout();
//
// lblProductName
//
this.lblProductName.Location = new System.Drawing.Point(19, 9);
this.lblProductName.Name = "lblProductName";
this.lblProductName.Size = new System.Drawing.Size(183, 24);
this.lblProductName.TabIndex = 0;
this.lblProductName.Text = "选择产品";
this.lblProductName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// lblStockId
//
this.lblStockId.Location = new System.Drawing.Point(394, 9);
this.lblStockId.Name = "lblStockId";
this.lblStockId.Size = new System.Drawing.Size(120, 24);
this.lblStockId.TabIndex = 2;
this.lblStockId.Text = "选择库存标识";
this.lblStockId.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// lvwStkId
//
this.lvwStkId.Location = new System.Drawing.Point(394, 34);
this.lvwStkId.Name = "lvwStkId";
this.lvwStkId.Size = new System.Drawing.Size(278, 147);
this.lvwStkId.TabIndex = 3;
this.lvwStkId.View = System.Windows.Forms.View.List;
this.lvwStkId.Click += new System.EventHandler(this.lvwStkId_Click);
this.lvwStkId.MouseHover += new System.EventHandler(this.lvwStkId_MouseHover);
this.lvwStkId.Enter += new System.EventHandler(this.lvwStkId_Enter);
//
// lvwPrdName
//
this.lvwPrdName.Alignment = System.Windows.Forms.ListViewAlignment.Left;
this.lvwPrdName.Location = new System.Drawing.Point(19, 34);
this.lvwPrdName.Name = "lvwPrdName";
this.lvwPrdName.Size = new System.Drawing.Size(279, 147);
this.lvwPrdName.TabIndex = 1;
this.lvwPrdName.View = System.Windows.Forms.View.List;
this.lvwPrdName.Click += new System.EventHandler(this.lvwPrdName_Click);
this.lvwPrdName.MouseHover += new System.EventHandler(this.lvwPrdName_MouseHover);
this.lvwPrdName.Enter += new System.EventHandler(this.lvwPrdName_Enter);
//
// grpAddDiscount
//
this.grpAddDiscount.Controls.Add(this.dtpToDate);
this.grpAddDiscount.Controls.Add(this.dtpFrmDate);
this.grpAddDiscount.Controls.Add(this.updDiscount);
this.grpAddDiscount.Controls.Add(this.lblTodate);
this.grpAddDiscount.Controls.Add(this.lblFrmDate);
this.grpAddDiscount.Controls.Add(this.lblDiscount);
this.grpAddDiscount.Location = new System.Drawing.Point(10, 190);
this.grpAddDiscount.Name = "grpAddDiscount";
this.grpAddDiscount.Size = new System.Drawing.Size(806, 68);
this.grpAddDiscount.TabIndex = 4;
this.grpAddDiscount.TabStop = false;
this.grpAddDiscount.Text = "添加选定库存的折扣";
//
// dtpToDate
//
this.dtpToDate.Location = new System.Drawing.Point(576, 34);
this.dtpToDate.Name = "dtpToDate";
this.dtpToDate.Size = new System.Drawing.Size(221, 21);
this.dtpToDate.TabIndex = 5;
//
// dtpFrmDate
//
this.dtpFrmDate.Location = new System.Drawing.Point(269, 34);
this.dtpFrmDate.Name = "dtpFrmDate";
this.dtpFrmDate.Size = new System.Drawing.Size(221, 21);
this.dtpFrmDate.TabIndex = 3;
//
// updDiscount
//
this.updDiscount.Location = new System.Drawing.Point(86, 34);
this.updDiscount.Name = "updDiscount";
this.updDiscount.Size = new System.Drawing.Size(77, 21);
this.updDiscount.TabIndex = 1;
this.updDiscount.Enter += new System.EventHandler(this.updDiscount_Enter);
//
// lblTodate
//
this.lblTodate.Location = new System.Drawing.Point(509, 34);
this.lblTodate.Name = "lblTodate";
this.lblTodate.Size = new System.Drawing.Size(67, 25);
this.lblTodate.TabIndex = 4;
this.lblTodate.Text = "终止日期";
this.lblTodate.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// lblFrmDate
//
this.lblFrmDate.Location = new System.Drawing.Point(182, 34);
this.lblFrmDate.Name = "lblFrmDate";
this.lblFrmDate.Size = new System.Drawing.Size(87, 25);
this.lblFrmDate.TabIndex = 2;
this.lblFrmDate.Text = "起始日期";
this.lblFrmDate.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// lblDiscount
//
this.lblDiscount.Location = new System.Drawing.Point(10, 34);
this.lblDiscount.Name = "lblDiscount";
this.lblDiscount.Size = new System.Drawing.Size(67, 25);
this.lblDiscount.TabIndex = 0;
this.lblDiscount.Text = "折扣";
this.lblDiscount.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// btnAdd
//
this.btnAdd.Location = new System.Drawing.Point(288, 370);
this.btnAdd.Name = "btnAdd";
this.btnAdd.Size = new System.Drawing.Size(90, 35);
this.btnAdd.TabIndex = 6;
this.btnAdd.Text = "添加(&A)";
this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
this.btnAdd.Enter += new System.EventHandler(this.btnAdd_Enter);
this.btnAdd.MouseHover += new System.EventHandler(this.btnAdd_MouseHover);
//
// btnUpdate
//
this.btnUpdate.Location = new System.Drawing.Point(403, 370);
this.btnUpdate.Name = "btnUpdate";
this.btnUpdate.Size = new System.Drawing.Size(90, 34);
this.btnUpdate.TabIndex = 7;
this.btnUpdate.Text = "更新(&U)";
this.btnUpdate.Click += new System.EventHandler(this.btnUpdate_Click);
this.btnUpdate.Enter += new System.EventHandler(this.btnUpdate_Enter);
this.btnUpdate.MouseHover += new System.EventHandler(this.btnUpdate_MouseHover);
//
// btnClose
//
this.btnClose.Location = new System.Drawing.Point(518, 370);
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(90, 34);
this.btnClose.TabIndex = 8;
this.btnClose.Text = "关闭(&C)";
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// grpModDiscount
//
this.grpModDiscount.Controls.Add(this.dtpModToDate);
this.grpModDiscount.Controls.Add(this.dtpModFrmDate);
this.grpModDiscount.Controls.Add(this.updModDiscount);
this.grpModDiscount.Controls.Add(this.lblModToDate);
this.grpModDiscount.Controls.Add(this.lblModFrmDate);
this.grpModDiscount.Controls.Add(this.lblmodDiscount);
this.grpModDiscount.Location = new System.Drawing.Point(10, 267);
this.grpModDiscount.Name = "grpModDiscount";
this.grpModDiscount.Size = new System.Drawing.Size(806, 69);
this.grpModDiscount.TabIndex = 5;
this.grpModDiscount.TabStop = false;
this.grpModDiscount.Text = "修改选定库存的折扣";
//
// dtpModToDate
//
this.dtpModToDate.Location = new System.Drawing.Point(576, 34);
this.dtpModToDate.Name = "dtpModToDate";
this.dtpModToDate.Size = new System.Drawing.Size(221, 21);
this.dtpModToDate.TabIndex = 5;
//
// dtpModFrmDate
//
this.dtpModFrmDate.Location = new System.Drawing.Point(269, 34);
this.dtpModFrmDate.Name = "dtpModFrmDate";
this.dtpModFrmDate.Size = new System.Drawing.Size(221, 21);
this.dtpModFrmDate.TabIndex = 3;
//
// updModDiscount
//
this.updModDiscount.Location = new System.Drawing.Point(86, 34);
this.updModDiscount.Name = "updModDiscount";
this.updModDiscount.Size = new System.Drawing.Size(77, 21);
this.updModDiscount.TabIndex = 1;
this.updModDiscount.Enter += new System.EventHandler(this.updModDiscount_Enter);
//
// lblModToDate
//
this.lblModToDate.Location = new System.Drawing.Point(509, 34);
this.lblModToDate.Name = "lblModToDate";
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -