📄 clientcheck.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace HotelManage.UILevel
{
/// <summary>
/// ClientCheck 的摘要说明。
/// </summary>
public class ClientCheck : System.Windows.Forms.Form
{
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button btnSave;
private System.Windows.Forms.Button btnExit;
private System.Windows.Forms.TextBox textTotalMoney;
private System.Windows.Forms.TextBox textFactMoney;
private float TotalMoney;
public float FactTotalMoney;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public ClientCheck(float totalmoney)
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
this.textTotalMoney.Text=Convert.ToString(totalmoney);
this.TotalMoney=totalmoney;
this.FactTotalMoney=this.TotalMoney;
//
// 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(ClientCheck));
this.textTotalMoney = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.textFactMoney = new System.Windows.Forms.TextBox();
this.panel1 = new System.Windows.Forms.Panel();
this.label2 = new System.Windows.Forms.Label();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.btnSave = new System.Windows.Forms.Button();
this.btnExit = new System.Windows.Forms.Button();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// textTotalMoney
//
this.textTotalMoney.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textTotalMoney.Location = new System.Drawing.Point(80, 32);
this.textTotalMoney.Multiline = true;
this.textTotalMoney.Name = "textTotalMoney";
this.textTotalMoney.Size = new System.Drawing.Size(56, 20);
this.textTotalMoney.TabIndex = 18;
this.textTotalMoney.Text = "";
//
// label5
//
this.label5.BackColor = System.Drawing.Color.White;
this.label5.Location = new System.Drawing.Point(24, 32);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(56, 25);
this.label5.TabIndex = 11;
this.label5.Text = "应收金额";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label1
//
this.label1.BackColor = System.Drawing.Color.White;
this.label1.Location = new System.Drawing.Point(144, 32);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(32, 25);
this.label1.TabIndex = 1;
this.label1.Text = "打折";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// textFactMoney
//
this.textFactMoney.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textFactMoney.Location = new System.Drawing.Point(328, 32);
this.textFactMoney.Multiline = true;
this.textFactMoney.Name = "textFactMoney";
this.textFactMoney.Size = new System.Drawing.Size(72, 20);
this.textFactMoney.TabIndex = 0;
this.textFactMoney.Text = "";
//
// panel1
//
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.comboBox1);
this.panel1.Controls.Add(this.label5);
this.panel1.Controls.Add(this.textTotalMoney);
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.textFactMoney);
this.panel1.ForeColor = System.Drawing.SystemColors.Desktop;
this.panel1.Location = new System.Drawing.Point(0, 16);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(632, 88);
this.panel1.TabIndex = 19;
//
// label2
//
this.label2.BackColor = System.Drawing.Color.White;
this.label2.Location = new System.Drawing.Point(272, 32);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(56, 25);
this.label2.TabIndex = 20;
this.label2.Text = "实收金额";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// comboBox1
//
this.comboBox1.Items.AddRange(new object[] {
"95",
"90",
"85",
"80",
"75",
"70",
""});
this.comboBox1.Location = new System.Drawing.Point(176, 32);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(88, 20);
this.comboBox1.TabIndex = 19;
this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
//
// btnSave
//
this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSave.Image = ((System.Drawing.Image)(resources.GetObject("btnSave.Image")));
this.btnSave.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnSave.Location = new System.Drawing.Point(328, 136);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(56, 24);
this.btnSave.TabIndex = 21;
this.btnSave.Text = "确定";
this.btnSave.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// btnExit
//
this.btnExit.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnExit.Image = ((System.Drawing.Image)(resources.GetObject("btnExit.Image")));
this.btnExit.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnExit.Location = new System.Drawing.Point(416, 136);
this.btnExit.Name = "btnExit";
this.btnExit.Size = new System.Drawing.Size(56, 23);
this.btnExit.TabIndex = 20;
this.btnExit.Text = "退出";
this.btnExit.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
//
// ClientCheck
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.BackColor = System.Drawing.SystemColors.Window;
this.ClientSize = new System.Drawing.Size(642, 181);
this.Controls.Add(this.btnSave);
this.Controls.Add(this.btnExit);
this.Controls.Add(this.panel1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "ClientCheck";
this.Text = "客户结帐";
this.Load += new System.EventHandler(this.ClientCheck_Load);
this.panel1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private void btnExit_Click(object sender, System.EventArgs e)
{
this.Close();
}
private void btnSave_Click(object sender, System.EventArgs e)
{
this.Close();
}
private void ClientCheck_Load(object sender, System.EventArgs e)
{
this.textFactMoney.Text=this.textTotalMoney.Text;
this.FactTotalMoney=this.TotalMoney;
}
private void comboBox1_SelectedIndexChanged(object sender, System.EventArgs e)
{
this.FactTotalMoney=this.TotalMoney*Convert.ToInt16(this.comboBox1.Text)/100;
this.textFactMoney.Text=this.FactTotalMoney.ToString();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -