📄 frmreturn.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>
public class frmReturn : System.Windows.Forms.Form
{
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.ComboBox cboDateCriteria;
private System.Windows.Forms.Button btnSearch;
private System.Windows.Forms.DateTimePicker dtpBillDate;
private System.Windows.Forms.TextBox txtBillId;
private System.Windows.Forms.CheckedListBox chlProductList;
private System.Windows.Forms.Button btnReturn;
private System.Windows.Forms.Button btnShowRetLog;
private System.Windows.Forms.Button btnExit;
private System.ComponentModel.IContainer components;
private System.Windows.Forms.Label lblBillDate;
private System.Windows.Forms.Label lblBillNo;
//other variables
private string[] searchValue;
private System.Windows.Forms.DataGrid dbgBillInfo;
private string [] prodId;
private string [,] productInfo;
private string logFilePath;
private bool flag;
private System.Windows.Forms.Label lblDateCriteria;
private System.Windows.Forms.HelpProvider hlpReturns;
private System.Windows.Forms.ToolTip tipReturns;
private int billNo;
private System.Windows.Forms.GroupBox grpReturn;
private bool dateSelected=false;
private Settings settings;
public frmReturn()
{
searchValue = new string[3];
productInfo = new string[100,100];
InitializeComponent();
settings = new Settings();
this.hlpReturns.HelpNamespace=settings.uiDirectory+ @"\HELP\SupermarketHelp.chm";
//
//
}
/// <summary>
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.grpReturn = new System.Windows.Forms.GroupBox();
this.lblDateCriteria = new System.Windows.Forms.Label();
this.cboDateCriteria = new System.Windows.Forms.ComboBox();
this.btnSearch = new System.Windows.Forms.Button();
this.dtpBillDate = new System.Windows.Forms.DateTimePicker();
this.lblBillDate = new System.Windows.Forms.Label();
this.txtBillId = new System.Windows.Forms.TextBox();
this.lblBillNo = new System.Windows.Forms.Label();
this.dbgBillInfo = new System.Windows.Forms.DataGrid();
this.chlProductList = new System.Windows.Forms.CheckedListBox();
this.btnReturn = new System.Windows.Forms.Button();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.btnExit = new System.Windows.Forms.Button();
this.btnShowRetLog = new System.Windows.Forms.Button();
this.hlpReturns = new System.Windows.Forms.HelpProvider();
this.tipReturns = new System.Windows.Forms.ToolTip(this.components);
this.grpReturn.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dbgBillInfo)).BeginInit();
this.SuspendLayout();
//
// grpReturn
//
this.grpReturn.Controls.Add(this.lblDateCriteria);
this.grpReturn.Controls.Add(this.cboDateCriteria);
this.grpReturn.Controls.Add(this.btnSearch);
this.grpReturn.Controls.Add(this.dtpBillDate);
this.grpReturn.Controls.Add(this.lblBillDate);
this.grpReturn.Controls.Add(this.txtBillId);
this.grpReturn.Controls.Add(this.lblBillNo);
this.grpReturn.Location = new System.Drawing.Point(4, 6);
this.grpReturn.Name = "grpReturn";
this.grpReturn.Size = new System.Drawing.Size(788, 46);
this.grpReturn.TabIndex = 0;
this.grpReturn.TabStop = false;
this.grpReturn.Text = "选择任何一个参数进行搜索";
//
// lblDateCriteria
//
this.lblDateCriteria.Location = new System.Drawing.Point(472, 17);
this.lblDateCriteria.Name = "lblDateCriteria";
this.lblDateCriteria.Size = new System.Drawing.Size(88, 23);
this.lblDateCriteria.TabIndex = 4;
this.lblDateCriteria.Text = "日期标准";
//
// cboDateCriteria
//
this.cboDateCriteria.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.hlpReturns.SetHelpKeyword(this.cboDateCriteria, "search");
this.cboDateCriteria.Items.AddRange(new object[] {
"Today",
"This Week",
"This Month",
"This Year"});
this.cboDateCriteria.Location = new System.Drawing.Point(560, 16);
this.cboDateCriteria.Name = "cboDateCriteria";
this.hlpReturns.SetShowHelp(this.cboDateCriteria, true);
this.cboDateCriteria.Size = new System.Drawing.Size(112, 23);
this.cboDateCriteria.TabIndex = 5;
this.cboDateCriteria.DropDown += new System.EventHandler(this.cboDateCriteria_DropDown);
this.cboDateCriteria.MouseHover += new System.EventHandler(this.cboDateCriteria_MouseHover);
//
// btnSearch
//
this.btnSearch.Location = new System.Drawing.Point(688, 16);
this.btnSearch.Name = "btnSearch";
this.btnSearch.Size = new System.Drawing.Size(68, 22);
this.btnSearch.TabIndex = 6;
this.btnSearch.Text = "搜索(&S)...";
this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
//
// dtpBillDate
//
this.hlpReturns.SetHelpKeyword(this.dtpBillDate, "search");
this.dtpBillDate.Location = new System.Drawing.Point(264, 16);
this.dtpBillDate.Name = "dtpBillDate";
this.hlpReturns.SetShowHelp(this.dtpBillDate, true);
this.dtpBillDate.TabIndex = 3;
this.dtpBillDate.MouseHover += new System.EventHandler(this.dtpBillDate_MouseHover);
this.dtpBillDate.ValueChanged += new System.EventHandler(this.dtpBillDate_ValueChanged);
//
// lblBillDate
//
this.lblBillDate.Location = new System.Drawing.Point(202, 16);
this.lblBillDate.Name = "lblBillDate";
this.lblBillDate.Size = new System.Drawing.Size(64, 16);
this.lblBillDate.TabIndex = 2;
this.lblBillDate.Text = "帐单日期";
//
// txtBillId
//
this.hlpReturns.SetHelpKeyword(this.txtBillId, "search");
this.txtBillId.Location = new System.Drawing.Point(66, 16);
this.txtBillId.Name = "txtBillId";
this.hlpReturns.SetShowHelp(this.txtBillId, true);
this.txtBillId.Size = new System.Drawing.Size(134, 21);
this.txtBillId.TabIndex = 1;
this.txtBillId.Text = "";
this.txtBillId.MouseHover += new System.EventHandler(this.txtBillId_MouseHover);
this.txtBillId.TextChanged += new System.EventHandler(this.txtBillId_TextChanged);
//
// lblBillNo
//
this.lblBillNo.Location = new System.Drawing.Point(8, 20);
this.lblBillNo.Name = "lblBillNo";
this.lblBillNo.Size = new System.Drawing.Size(60, 12);
this.lblBillNo.TabIndex = 0;
this.lblBillNo.Text = "帐单编号";
//
// dbgBillInfo
//
this.dbgBillInfo.DataMember = "";
this.dbgBillInfo.HeaderForeColor = System.Drawing.SystemColors.ControlText;
this.dbgBillInfo.Location = new System.Drawing.Point(8, 58);
this.dbgBillInfo.Name = "dbgBillInfo";
this.dbgBillInfo.ReadOnly = true;
this.dbgBillInfo.Size = new System.Drawing.Size(386, 256);
this.dbgBillInfo.TabIndex = 1;
this.dbgBillInfo.CurrentCellChanged += new System.EventHandler(this.dbgBillInfo_CurrentCellChanged);
//
// chlProductList
//
this.chlProductList.Location = new System.Drawing.Point(408, 64);
this.chlProductList.MultiColumn = true;
this.chlProductList.Name = "chlProductList";
this.chlProductList.Size = new System.Drawing.Size(368, 196);
this.chlProductList.TabIndex = 2;
this.chlProductList.MouseHover += new System.EventHandler(this.chlProductList_MouseHover);
//
// btnReturn
//
this.btnReturn.Enabled = false;
this.btnReturn.Location = new System.Drawing.Point(582, 272);
this.btnReturn.Name = "btnReturn";
this.btnReturn.Size = new System.Drawing.Size(164, 40);
this.btnReturn.TabIndex = 3;
this.btnReturn.Text = "退回选定产品(&R)...";
this.btnReturn.Click += new System.EventHandler(this.btnReturn_Click);
this.btnReturn.MouseHover += new System.EventHandler(this.btnReturn_MouseHover);
//
// groupBox2
//
this.groupBox2.Location = new System.Drawing.Point(4, 318);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(750, 6);
this.groupBox2.TabIndex = 6;
this.groupBox2.TabStop = false;
//
// btnExit
//
this.btnExit.Location = new System.Drawing.Point(662, 330);
this.btnExit.Name = "btnExit";
this.btnExit.Size = new System.Drawing.Size(84, 38);
this.btnExit.TabIndex = 5;
this.btnExit.Text = "退出(&E)";
this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
//
// btnShowRetLog
//
this.btnShowRetLog.Enabled = false;
this.btnShowRetLog.Location = new System.Drawing.Point(492, 330);
this.btnShowRetLog.Name = "btnShowRetLog";
this.btnShowRetLog.Size = new System.Drawing.Size(162, 38);
this.btnShowRetLog.TabIndex = 4;
this.btnShowRetLog.Text = "显示退货日志(&L)...";
this.btnShowRetLog.Click += new System.EventHandler(this.btnShowRetLog_Click);
this.btnShowRetLog.MouseHover += new System.EventHandler(this.btnShowRetLog_MouseHover);
//
// hlpReturns
//
this.hlpReturns.HelpNamespace = "D:\\Project10102004\\HTM_FILES_FOR_HELP\\SUPERMARKETHELP.CHM";
//
// tipReturns
//
this.tipReturns.AutomaticDelay = 150;
//
// frmReturn
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -