📄 mainform.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using WindowsApplication1;
using SupDataBase;
namespace AppSuperMarket
{
/// <summary>
/// Form1 的摘要说明。
/// </summary>
public class MainForm : System.Windows.Forms.Form
{
private static int FormCount=0;
private System.Windows.Forms.MainMenu mainMenu1;
private System.Windows.Forms.MenuItem menuItem4;
private System.Windows.Forms.MenuItem menuItem7;
private System.Windows.Forms.MenuItem menuItem11;
private System.Windows.Forms.StatusBar statusBar1;
private System.Windows.Forms.StatusBarPanel statusBarPanel1;
private System.Windows.Forms.StatusBarPanel statusBarPanel2;
private System.Windows.Forms.StatusBarPanel statusBarPanel3;
private System.Windows.Forms.MenuItem manageMenu;
private System.Windows.Forms.MenuItem customMenuItem;
private System.Windows.Forms.MenuItem employeeMenuItem;
private System.Windows.Forms.MenuItem databackupMenuItem;
private System.Windows.Forms.MenuItem LockUIMenuItem;
private System.Windows.Forms.MenuItem loginMenuItem;
private System.Windows.Forms.MenuItem logoffMenuItem;
private System.Windows.Forms.MenuItem passwordMenuItem;
private System.Windows.Forms.MenuItem exitMenuItem;
private System.Windows.Forms.MenuItem goodsMenu;
private System.Windows.Forms.MenuItem goodlistMenuItem;
private System.Windows.Forms.MenuItem pricedefMenuItem;
private System.Windows.Forms.MenuItem searchleftMenuItem;
private System.Windows.Forms.MenuItem saleMenu;
private System.Windows.Forms.MenuItem sellMenuItem;
private System.Windows.Forms.MenuItem refundMenuItem;
private System.Windows.Forms.MenuItem todaysaleMenuItem;
private System.Windows.Forms.MenuItem inputgoodsMenu;
private System.Windows.Forms.MenuItem inputMenuItem;
private System.Windows.Forms.MenuItem todayinputMenuItem;
private System.Windows.Forms.MenuItem queryMenu;
private System.Windows.Forms.MenuItem saleQueryMenuItem;
private System.Windows.Forms.MenuItem inputqueryMenuItem;
private System.Windows.Forms.MenuItem goodsqueryMenuItem;
private System.Windows.Forms.MenuItem qiandanMenuItem;
private System.Windows.Forms.MenuItem reportMenu;
private System.Windows.Forms.MenuItem salereportMenuItem;
private System.Windows.Forms.MenuItem inputreportMenuItem;
private System.Data.SqlClient.SqlDataAdapter sqlDataAdapter1;
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 System.Data.SqlClient.SqlConnection sqlConnection1;
private System.Windows.Forms.Splitter splitter1;
private System.Windows.Forms.MenuItem menuItem1;
private System.Data.Odbc.OdbcConnection odbcConnection1;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public MainForm()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//this.Visible = false;
//
// 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.Configuration.AppSettingsReader configurationAppSettings = new System.Configuration.AppSettingsReader();
this.mainMenu1 = new System.Windows.Forms.MainMenu();
this.manageMenu = new System.Windows.Forms.MenuItem();
this.customMenuItem = new System.Windows.Forms.MenuItem();
this.employeeMenuItem = new System.Windows.Forms.MenuItem();
this.menuItem4 = new System.Windows.Forms.MenuItem();
this.databackupMenuItem = new System.Windows.Forms.MenuItem();
this.LockUIMenuItem = new System.Windows.Forms.MenuItem();
this.menuItem7 = new System.Windows.Forms.MenuItem();
this.loginMenuItem = new System.Windows.Forms.MenuItem();
this.logoffMenuItem = new System.Windows.Forms.MenuItem();
this.passwordMenuItem = new System.Windows.Forms.MenuItem();
this.menuItem11 = new System.Windows.Forms.MenuItem();
this.exitMenuItem = new System.Windows.Forms.MenuItem();
this.goodsMenu = new System.Windows.Forms.MenuItem();
this.goodlistMenuItem = new System.Windows.Forms.MenuItem();
this.pricedefMenuItem = new System.Windows.Forms.MenuItem();
this.searchleftMenuItem = new System.Windows.Forms.MenuItem();
this.saleMenu = new System.Windows.Forms.MenuItem();
this.sellMenuItem = new System.Windows.Forms.MenuItem();
this.refundMenuItem = new System.Windows.Forms.MenuItem();
this.todaysaleMenuItem = new System.Windows.Forms.MenuItem();
this.inputgoodsMenu = new System.Windows.Forms.MenuItem();
this.inputMenuItem = new System.Windows.Forms.MenuItem();
this.todayinputMenuItem = new System.Windows.Forms.MenuItem();
this.queryMenu = new System.Windows.Forms.MenuItem();
this.saleQueryMenuItem = new System.Windows.Forms.MenuItem();
this.inputqueryMenuItem = new System.Windows.Forms.MenuItem();
this.goodsqueryMenuItem = new System.Windows.Forms.MenuItem();
this.qiandanMenuItem = new System.Windows.Forms.MenuItem();
this.reportMenu = new System.Windows.Forms.MenuItem();
this.salereportMenuItem = new System.Windows.Forms.MenuItem();
this.inputreportMenuItem = new System.Windows.Forms.MenuItem();
this.menuItem1 = new System.Windows.Forms.MenuItem();
this.statusBar1 = new System.Windows.Forms.StatusBar();
this.statusBarPanel1 = new System.Windows.Forms.StatusBarPanel();
this.statusBarPanel2 = new System.Windows.Forms.StatusBarPanel();
this.statusBarPanel3 = new System.Windows.Forms.StatusBarPanel();
this.sqlDataAdapter1 = new System.Data.SqlClient.SqlDataAdapter();
this.sqlDeleteCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlConnection1 = new System.Data.SqlClient.SqlConnection();
this.sqlInsertCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlSelectCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlUpdateCommand1 = new System.Data.SqlClient.SqlCommand();
this.splitter1 = new System.Windows.Forms.Splitter();
this.odbcConnection1 = new System.Data.Odbc.OdbcConnection();
((System.ComponentModel.ISupportInitialize)(this.statusBarPanel1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.statusBarPanel2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.statusBarPanel3)).BeginInit();
this.SuspendLayout();
//
// mainMenu1
//
this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.manageMenu,
this.goodsMenu,
this.saleMenu,
this.inputgoodsMenu,
this.queryMenu,
this.reportMenu,
this.menuItem1});
//
// manageMenu
//
this.manageMenu.Index = 0;
this.manageMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.customMenuItem,
this.employeeMenuItem,
this.menuItem4,
this.databackupMenuItem,
this.LockUIMenuItem,
this.menuItem7,
this.loginMenuItem,
this.logoffMenuItem,
this.passwordMenuItem,
this.menuItem11,
this.exitMenuItem});
this.manageMenu.Text = "管理";
//
// customMenuItem
//
this.customMenuItem.Index = 0;
this.customMenuItem.Text = "客户管理";
this.customMenuItem.Click += new System.EventHandler(this.customMenuItem_Click);
//
// employeeMenuItem
//
this.employeeMenuItem.Index = 1;
this.employeeMenuItem.Text = "员工管理";
this.employeeMenuItem.Click += new System.EventHandler(this.employeeMenuItem_Click);
//
// menuItem4
//
this.menuItem4.Index = 2;
this.menuItem4.Text = "-";
//
// databackupMenuItem
//
this.databackupMenuItem.Index = 3;
this.databackupMenuItem.Text = "数据备份";
//
// LockUIMenuItem
//
this.LockUIMenuItem.Index = 4;
this.LockUIMenuItem.Text = "界面锁定";
this.LockUIMenuItem.Click += new System.EventHandler(this.LockUIMenuItem_Click);
//
// menuItem7
//
this.menuItem7.Index = 5;
this.menuItem7.Text = "-";
//
// loginMenuItem
//
this.loginMenuItem.Index = 6;
this.loginMenuItem.Text = "登录";
//
// logoffMenuItem
//
this.logoffMenuItem.Index = 7;
this.logoffMenuItem.Text = "注销";
//
// passwordMenuItem
//
this.passwordMenuItem.Index = 8;
this.passwordMenuItem.Text = "修改密码";
this.passwordMenuItem.Click += new System.EventHandler(this.passwordMenuItem_Click);
//
// menuItem11
//
this.menuItem11.Index = 9;
this.menuItem11.Text = "-";
//
// exitMenuItem
//
this.exitMenuItem.Index = 10;
this.exitMenuItem.Text = "退出";
this.exitMenuItem.Click += new System.EventHandler(this.exitMenuItem_Click);
//
// goodsMenu
//
this.goodsMenu.Index = 1;
this.goodsMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.goodlistMenuItem,
this.pricedefMenuItem,
this.searchleftMenuItem});
this.goodsMenu.Text = "商品";
//
// goodlistMenuItem
//
this.goodlistMenuItem.Index = 0;
this.goodlistMenuItem.Text = "商品列表";
this.goodlistMenuItem.Click += new System.EventHandler(this.goodlistMenuItem_Click);
//
// pricedefMenuItem
//
this.pricedefMenuItem.Index = 1;
this.pricedefMenuItem.Text = "商品定价";
this.pricedefMenuItem.Click += new System.EventHandler(this.pricedefMenuItem_Click);
//
// searchleftMenuItem
//
this.searchleftMenuItem.Index = 2;
this.searchleftMenuItem.Text = "库存查询";
this.searchleftMenuItem.Click += new System.EventHandler(this.searchleftMenuItem_Click);
//
// saleMenu
//
this.saleMenu.Index = 2;
this.saleMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.sellMenuItem,
this.refundMenuItem,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -