📄 clientcheckfrom.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace HotelsManage.UILevel
{
/// <summary>
/// ClientCheckFrom 的摘要说明。
/// </summary>
public class ClientCheckFrom : System.Windows.Forms.Form
{
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ComboBox cmbpref;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox txtTotalMoney;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txtFactMoney;
private System.Windows.Forms.Button btnSave;
private System.Windows.Forms.Button btnExit;
/// <summary>
/// 必需的设计器变量。
/// </summary>
///
float totalmoney;
public float Factmoney;
private System.ComponentModel.Container components = null;
public ClientCheckFrom(float totalmoney)
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
this.totalmoney=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(ClientCheckFrom));
this.panel1 = new System.Windows.Forms.Panel();
this.label2 = new System.Windows.Forms.Label();
this.cmbpref = new System.Windows.Forms.ComboBox();
this.label5 = new System.Windows.Forms.Label();
this.txtTotalMoney = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.txtFactMoney = new System.Windows.Forms.TextBox();
this.btnSave = new System.Windows.Forms.Button();
this.btnExit = new System.Windows.Forms.Button();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.cmbpref);
this.panel1.Controls.Add(this.label5);
this.panel1.Controls.Add(this.txtTotalMoney);
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.txtFactMoney);
this.panel1.ForeColor = System.Drawing.SystemColors.Desktop;
this.panel1.Location = new System.Drawing.Point(24, 16);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(416, 80);
this.panel1.TabIndex = 20;
//
// 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;
//
// cmbpref
//
this.cmbpref.Items.AddRange(new object[] {
"95",
"90",
"85",
"80",
"75",
"70",
""});
this.cmbpref.Location = new System.Drawing.Point(176, 32);
this.cmbpref.Name = "cmbpref";
this.cmbpref.Size = new System.Drawing.Size(88, 20);
this.cmbpref.TabIndex = 19;
this.cmbpref.SelectedIndexChanged += new System.EventHandler(this.cmbpref_SelectedIndexChanged);
//
// 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;
//
// txtTotalMoney
//
this.txtTotalMoney.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtTotalMoney.Location = new System.Drawing.Point(80, 32);
this.txtTotalMoney.Multiline = true;
this.txtTotalMoney.Name = "txtTotalMoney";
this.txtTotalMoney.Size = new System.Drawing.Size(56, 20);
this.txtTotalMoney.TabIndex = 18;
this.txtTotalMoney.Text = "";
//
// 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;
//
// txtFactMoney
//
this.txtFactMoney.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtFactMoney.Location = new System.Drawing.Point(328, 32);
this.txtFactMoney.Multiline = true;
this.txtFactMoney.Name = "txtFactMoney";
this.txtFactMoney.Size = new System.Drawing.Size(72, 20);
this.txtFactMoney.TabIndex = 0;
this.txtFactMoney.Text = "";
//
// 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(152, 144);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(56, 24);
this.btnSave.TabIndex = 22;
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(256, 144);
this.btnExit.Name = "btnExit";
this.btnExit.Size = new System.Drawing.Size(56, 23);
this.btnExit.TabIndex = 23;
this.btnExit.Text = "退出";
this.btnExit.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
//
// ClientCheckFrom
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.ClientSize = new System.Drawing.Size(464, 190);
this.Controls.Add(this.btnExit);
this.Controls.Add(this.btnSave);
this.Controls.Add(this.panel1);
this.Name = "ClientCheckFrom";
this.Text = "结帐";
this.Load += new System.EventHandler(this.ClientCheckFrom_Load);
this.panel1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private void ClientCheckFrom_Load(object sender, System.EventArgs e)
{
this.txtTotalMoney.Text=this.totalmoney.ToString();
this.txtFactMoney.Text=this.txtTotalMoney.Text;
this.Factmoney=Convert.ToSingle(this.txtFactMoney.Text);
}
private void cmbpref_SelectedIndexChanged(object sender, System.EventArgs e)
{
if(this.cmbpref.Text=="")
{
return;
}
else
{
this.txtFactMoney.Text=Convert.ToString(this.totalmoney*Convert.ToInt32(this.cmbpref.Text)/100);
this.Factmoney=Convert.ToSingle(this.txtFactMoney.Text);
}
}
private void btnSave_Click(object sender, System.EventArgs e)
{
this.Close();
}
private void btnExit_Click(object sender, System.EventArgs e)
{
this.Close();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -