亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? 充值.cs

?? 管理學(xué)院機(jī)房計費(fèi)系統(tǒng),VISUAL STUDIO .NET 2003 c# 語言實現(xiàn),SQL SERVER 2000數(shù)據(jù)庫. 現(xiàn)運(yùn)行正常.
?? CS
?? 第 1 頁 / 共 2 頁
字號:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
using System.Text;
using System.Data.SqlTypes;

namespace 機(jī)房計費(fèi)系統(tǒng)
{
	/// <summary>
	/// Form1 的摘要說明。
	/// </summary>
	public class frmAddMoney : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.TextBox textBox1;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.TextBox textBox2;
		private System.Windows.Forms.Label label3;
		private System.Windows.Forms.TextBox textBox3;
		private System.Windows.Forms.Label label4;
		private System.Windows.Forms.TextBox textBox4;
		private System.Windows.Forms.Button button1;
		private System.Data.SqlClient.SqlConnection sqlConnection1;
		private String sql;
		private int numAff;
		private Decimal balance;
		private System.Windows.Forms.Label label5;
		private System.Windows.Forms.TextBox textBox5;
		private System.Windows.Forms.Label label6;
		/// <summary>
		/// 必需的設(shè)計器變量。
		/// </summary>
		private System.ComponentModel.Container components = null;

		public frmAddMoney()
		{
			//
			// Windows 窗體設(shè)計器支持所必需的
			//
			InitializeComponent();

			//
			// TODO: 在 InitializeComponent 調(diào)用后添加任何構(gòu)造函數(shù)代碼
			//
		}

		/// <summary>
		/// 清理所有正在使用的資源。
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows 窗體設(shè)計器生成的代碼
		/// <summary>
		/// 設(shè)計器支持所需的方法 - 不要使用代碼編輯器修改
		/// 此方法的內(nèi)容。
		/// </summary>
		private void InitializeComponent()
		{
			this.label1 = new System.Windows.Forms.Label();
			this.textBox1 = new System.Windows.Forms.TextBox();
			this.label2 = new System.Windows.Forms.Label();
			this.textBox2 = new System.Windows.Forms.TextBox();
			this.label3 = new System.Windows.Forms.Label();
			this.textBox3 = new System.Windows.Forms.TextBox();
			this.label4 = new System.Windows.Forms.Label();
			this.textBox4 = new System.Windows.Forms.TextBox();
			this.button1 = new System.Windows.Forms.Button();
			this.sqlConnection1 = new System.Data.SqlClient.SqlConnection();
			this.label5 = new System.Windows.Forms.Label();
			this.textBox5 = new System.Windows.Forms.TextBox();
			this.label6 = new System.Windows.Forms.Label();
			this.SuspendLayout();
			// 
			// label1
			// 
			this.label1.Font = new System.Drawing.Font("宋體", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.label1.Location = new System.Drawing.Point(24, 40);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(72, 23);
			this.label1.TabIndex = 0;
			this.label1.Text = "條形碼";
			this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			// 
			// textBox1
			// 
			this.textBox1.Font = new System.Drawing.Font("宋體", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.textBox1.Location = new System.Drawing.Point(120, 32);
			this.textBox1.Name = "textBox1";
			this.textBox1.Size = new System.Drawing.Size(272, 26);
			this.textBox1.TabIndex = 1;
			this.textBox1.Text = "";
			this.textBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox1_KeyPress);
			this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
			this.textBox1.Leave += new System.EventHandler(this.textBox1_Leave);
			// 
			// label2
			// 
			this.label2.Font = new System.Drawing.Font("宋體", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.label2.Location = new System.Drawing.Point(24, 88);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(72, 23);
			this.label2.TabIndex = 2;
			this.label2.Text = "姓名";
			this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			// 
			// textBox2
			// 
			this.textBox2.Enabled = false;
			this.textBox2.Font = new System.Drawing.Font("宋體", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.textBox2.Location = new System.Drawing.Point(120, 80);
			this.textBox2.Name = "textBox2";
			this.textBox2.Size = new System.Drawing.Size(112, 26);
			this.textBox2.TabIndex = 4;
			this.textBox2.Text = "";
			// 
			// label3
			// 
			this.label3.Font = new System.Drawing.Font("宋體", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.label3.Location = new System.Drawing.Point(24, 136);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(72, 23);
			this.label3.TabIndex = 4;
			this.label3.Text = "班級";
			this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			// 
			// textBox3
			// 
			this.textBox3.Enabled = false;
			this.textBox3.Font = new System.Drawing.Font("宋體", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.textBox3.Location = new System.Drawing.Point(120, 128);
			this.textBox3.Name = "textBox3";
			this.textBox3.Size = new System.Drawing.Size(112, 26);
			this.textBox3.TabIndex = 5;
			this.textBox3.Text = "";
			// 
			// label4
			// 
			this.label4.Font = new System.Drawing.Font("宋體", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.label4.Location = new System.Drawing.Point(24, 184);
			this.label4.Name = "label4";
			this.label4.Size = new System.Drawing.Size(72, 23);
			this.label4.TabIndex = 6;
			this.label4.Text = "余額";
			this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			// 
			// textBox4
			// 
			this.textBox4.Enabled = false;
			this.textBox4.Font = new System.Drawing.Font("宋體", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.textBox4.Location = new System.Drawing.Point(120, 176);
			this.textBox4.Name = "textBox4";
			this.textBox4.Size = new System.Drawing.Size(112, 26);
			this.textBox4.TabIndex = 7;
			this.textBox4.Text = "";
			// 
			// button1
			// 
			this.button1.Font = new System.Drawing.Font("宋體", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.button1.Location = new System.Drawing.Point(176, 280);
			this.button1.Name = "button1";
			this.button1.Size = new System.Drawing.Size(88, 23);
			this.button1.TabIndex = 3;
			this.button1.Text = "確認(rèn)";
			this.button1.Click += new System.EventHandler(this.button1_Click);
			// 
			// sqlConnection1
			// 
			this.sqlConnection1.ConnectionString = "workstation id=XU;packet size=4096;integrated security=SSPI;data source=XU;persis" +
				"t security info=False;initial catalog=jifei";
			// 
			// label5
			// 
			this.label5.Font = new System.Drawing.Font("宋體", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.label5.Location = new System.Drawing.Point(32, 232);
			this.label5.Name = "label5";
			this.label5.Size = new System.Drawing.Size(64, 23);
			this.label5.TabIndex = 9;
			this.label5.Text = "繳費(fèi)";
			this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			// 
			// textBox5
			// 
			this.textBox5.Font = new System.Drawing.Font("宋體", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.textBox5.Location = new System.Drawing.Point(120, 224);
			this.textBox5.MaxLength = 3;
			this.textBox5.Name = "textBox5";
			this.textBox5.Size = new System.Drawing.Size(112, 26);
			this.textBox5.TabIndex = 2;
			this.textBox5.Text = "";
			this.textBox5.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox5_KeyPress);
			// 
			// label6
			// 
			this.label6.Font = new System.Drawing.Font("宋體", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.label6.Location = new System.Drawing.Point(240, 232);
			this.label6.Name = "label6";
			this.label6.TabIndex = 11;
			this.label6.Text = "元";
			// 
			// frmAddMoney
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(464, 326);
			this.Controls.Add(this.label6);
			this.Controls.Add(this.textBox5);
			this.Controls.Add(this.textBox4);
			this.Controls.Add(this.textBox3);
			this.Controls.Add(this.textBox2);
			this.Controls.Add(this.textBox1);
			this.Controls.Add(this.label5);
			this.Controls.Add(this.button1);
			this.Controls.Add(this.label4);
			this.Controls.Add(this.label3);
			this.Controls.Add(this.label2);
			this.Controls.Add(this.label1);
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
			this.MaximizeBox = false;
			this.MinimizeBox = false;
			this.Name = "frmAddMoney";
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
			this.Text = "充值";
			this.Load += new System.EventHandler(this.frmAddMoney_Load);
			this.Closed += new System.EventHandler(this.frmAddMoney_Closed);
			this.ResumeLayout(false);

		}
		#endregion

		private void textBox1_TextChanged(object sender, System.EventArgs e)
		{
			/*
			sql="select * from 帳戶表 where 條形碼='"+ this.textBox1.Text +"'";
			SqlCommand cmd=new SqlCommand(sql,this.sqlConnection1);
			this.sqlConnection1.Open();
			SqlDataReader reader=cmd.ExecuteReader();
			try
			{
			    
				if(reader.Read())
				{
					this.textBox2.Text=reader.GetString(2);
					this.textBox3.Text=reader.GetString(1);
					this.balance=(Decimal)reader.GetSqlDecimal(3);
					this.textBox4.Text=this.balance.ToString();
				}
				else
					MessageBox.Show("無此用戶!","充值",MessageBoxButtons.OK,MessageBoxIcon.Exclamation);
				
			}
			catch(SqlException exe)
			{
				MessageBox.Show("出現(xiàn)錯誤!","充值",MessageBoxButtons.OK,MessageBoxIcon.Error);
				this.textBox1.Text="";
				this.textBox2.Text="";
				this.textBox3.Text="";
				this.textBox4.Text="";
				this.textBox5.Text="";
			}
			finally
			{
				reader.Close();
				this.sqlConnection1.Close();
			} */
		}

		private void frmAddMoney_Load(object sender, System.EventArgs e)
		{
		
		}

		
		private void button1_Click(object sender, System.EventArgs e)
		{

			try
			{
				Decimal money=Decimal.Parse(this.textBox5.Text);
				float floMoney=(float)money;
				//添加優(yōu)惠額
				
				sql="select * from 優(yōu)惠表 order by 金額限 desc";
				SqlCommand cmdYh=new SqlCommand(sql,this.sqlConnection1);
				this.sqlConnection1.Open();
				SqlDataReader readerYh=cmdYh.ExecuteReader();
				readerYh.Read();
				float intYh1=float.Parse(readerYh.GetString(0));
				float intPower1=float.Parse(readerYh.GetString(1));
				readerYh.Read();
				float intYh2=float.Parse(readerYh.GetString(0));
				float intPower2=float.Parse(readerYh.GetString(1));
				readerYh.Close();
				this.sqlConnection1.Close();

				//計算優(yōu)惠額 
				if(IsMaster(this.textBox3.Text))
				{
					floMoney*=2;						
				}
				else
				{
					if(floMoney>=intYh1 && floMoney<intYh2)
					{
						floMoney*=(1+intPower1/100);
					}
					if(floMoney>=intYh2)
					{
						floMoney*=(1+intPower2/100);			
					}
				}
				
				//充值
				balance=balance+(Decimal)floMoney;
				sql="update 帳戶表 set 余額='"+ this.balance.ToString() +"',鎖定= '0' where 條形碼='"+ this.textBox1.Text +"'";
				SqlCommand cmd=new SqlCommand(sql,this.sqlConnection1);
				this.sqlConnection1.Open();
				try
				{
					this.numAff=cmd.ExecuteNonQuery();
					if(numAff==0)
					{
						MessageBox.Show("充值失敗,帳戶錯!","充值",MessageBoxButtons.OK,MessageBoxIcon.Error);
						//MessageBox.Show("充值成功!","充值",MessageBoxButtons.OK,MessageBoxIcon.Information);
						goto finish;		
					}
				}
				catch(SqlException exe)
				{
					MessageBox.Show("充值失敗!","充值",MessageBoxButtons.OK,MessageBoxIcon.Error);
					goto finish;
				}
				finally
				{
					this.sqlConnection1.Close();
					
					//寫充值流水表
					DateTime dtNow=DateTime.Now;
					sql="insert into 收費(fèi)流水表 (時間,條形碼,值班教師,收費(fèi),充值) values('"+ dtNow.ToString() +"','"+ this.textBox1.Text +"','"+ frmMain.strTeacher +"','"+ this.textBox5.Text +"','"+ floMoney.ToString() +"')";
					SqlCommand cmdCzls=new SqlCommand(sql,this.sqlConnection1);
					try
					{

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久99精品国产麻豆婷婷| 亚洲欧美综合在线精品| 韩国一区二区三区| 欧美国产精品一区二区| 成人精品gif动图一区| 亚洲欧美在线aaa| 欧美在线观看一区| 日韩av一区二| 国产日韩av一区| 在线亚洲高清视频| 日韩av电影免费观看高清完整版| 欧美va亚洲va香蕉在线 | 亚洲一线二线三线视频| 欧美乱妇15p| 精品一区二区免费在线观看| 久久午夜老司机| 色呦呦一区二区三区| 图片区小说区国产精品视频| 26uuu精品一区二区| 不卡的av中国片| 天使萌一区二区三区免费观看| 久久久www免费人成精品| 91免费看片在线观看| 日韩av不卡一区二区| 国产日产欧美一区二区三区| 欧美中文字幕一区二区三区| 激情另类小说区图片区视频区| 国产精品视频九色porn| 欧美美女视频在线观看| 懂色av中文一区二区三区 | 一区二区三区 在线观看视频| 欧美一级久久久久久久大片| k8久久久一区二区三区| 人妖欧美一区二区| 亚洲欧美综合色| 日韩亚洲欧美高清| 色婷婷久久一区二区三区麻豆| 九九精品一区二区| 亚洲国产一区视频| 中文字幕免费在线观看视频一区| 91精品国产免费| 色综合一个色综合亚洲| 国产激情一区二区三区四区| 亚洲成人激情av| 亚洲欧美在线视频观看| 久久久综合视频| 91精品国产综合久久小美女| 日本二三区不卡| thepron国产精品| 国产精品一二三在| 久久爱另类一区二区小说| 亚洲福利一区二区三区| 亚洲日本va午夜在线影院| 国产欧美综合在线| 精品不卡在线视频| 91精品欧美综合在线观看最新| 欧美综合色免费| 97精品久久久午夜一区二区三区| 国产一区二区精品久久| 老司机午夜精品| 蜜桃视频在线观看一区| 日韩电影免费一区| 五月天亚洲婷婷| 亚洲成人精品一区二区| 亚洲综合一区二区精品导航| 亚洲精品久久久蜜桃| 自拍av一区二区三区| 中文字幕一区二区在线播放| 国产欧美综合在线观看第十页| 久久综合av免费| 久久这里只有精品首页| 精品不卡在线视频| 久久久精品综合| 国产亚洲欧美日韩俺去了| 久久久久国产精品厨房| 国产欧美精品一区aⅴ影院| 久久久精品国产免大香伊| 久久久精品免费免费| 欧美国产国产综合| 国产精品灌醉下药二区| 中文字幕亚洲成人| 亚洲精品成人悠悠色影视| 亚洲伦理在线精品| 亚洲一区二区三区中文字幕| 亚洲国产精品天堂| 肉色丝袜一区二区| 久久国内精品自在自线400部| 国内精品久久久久影院色| 国产精选一区二区三区| 丁香婷婷综合网| 色综合色综合色综合色综合色综合| 91麻豆国产在线观看| 欧美亚洲日本国产| 欧美疯狂性受xxxxx喷水图片| 在线不卡中文字幕| 久久一区二区三区国产精品| 中文无字幕一区二区三区| 亚洲免费在线观看视频| 丝袜美腿亚洲一区| 韩日欧美一区二区三区| 成人app软件下载大全免费| 欧美在线播放高清精品| 日韩欧美在线不卡| 中日韩av电影| 午夜久久久影院| 国产一区二区三区黄视频 | 国产盗摄视频一区二区三区| www..com久久爱| 欧美一卡在线观看| 亚洲国产精品ⅴa在线观看| 一区二区三区精品| 精品一区二区三区视频在线观看 | 国产精品国产三级国产aⅴ无密码| 亚洲精品国产品国语在线app| 日产精品久久久久久久性色| 国产suv精品一区二区三区| 欧美日韩五月天| 日本一区二区在线不卡| 午夜欧美2019年伦理| 成人伦理片在线| 4438x成人网最大色成网站| 国产精品理论片在线观看| 日本视频免费一区| 91极品视觉盛宴| 国产天堂亚洲国产碰碰| 日韩激情在线观看| 91毛片在线观看| 国产色产综合产在线视频| 丝瓜av网站精品一区二区| 成人国产亚洲欧美成人综合网| 欧美一级一区二区| 亚洲综合久久久久| 成人av资源在线| 2024国产精品| 日本aⅴ免费视频一区二区三区 | 国产精品毛片大码女人| 麻豆精品在线观看| 欧美日韩中文一区| 亚洲人成网站影音先锋播放| 久久不见久久见免费视频1| 欧美视频在线观看一区| 国产精品久久久久一区二区三区 | 国产高清久久久| 日韩一级高清毛片| 午夜a成v人精品| 在线看国产一区| 亚洲色图都市小说| 粉嫩蜜臀av国产精品网站| 日韩欧美亚洲另类制服综合在线| 一级特黄大欧美久久久| 91麻豆成人久久精品二区三区| 久久久久久黄色| 久久精品国产一区二区三 | 亚洲成在线观看| 在线免费观看日本欧美| 亚洲免费伊人电影| 丁香一区二区三区| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 久久久噜噜噜久噜久久综合| 日韩高清不卡一区二区| 欧美男人的天堂一二区| 亚洲韩国一区二区三区| 欧美日韩一级二级| 午夜日韩在线观看| 91精品蜜臀在线一区尤物| 人人超碰91尤物精品国产| 欧美老女人第四色| 午夜一区二区三区在线观看| 欧洲一区二区av| 日韩国产欧美在线播放| 91精品国产欧美一区二区| 青青青爽久久午夜综合久久午夜| 日韩欧美色综合网站| 毛片av一区二区| 精品福利二区三区| 国产成人亚洲综合a∨婷婷| 国产精品国产三级国产aⅴ原创| 成人蜜臀av电影| 一区二区三区日韩欧美精品| 久久久青草青青国产亚洲免观| 国产精品亚洲一区二区三区妖精 | 欧美一区三区二区| 久久99久国产精品黄毛片色诱| 日韩欧美黄色影院| 国产99久久精品| 亚洲精品国产高清久久伦理二区| 在线观看日韩av先锋影音电影院| 天堂一区二区在线免费观看| 精品国产一区二区三区四区四 | 精品电影一区二区三区| 成人深夜福利app| 一区二区三区四区激情| 3d动漫精品啪啪| 国产jizzjizz一区二区| 悠悠色在线精品| 精品1区2区在线观看| jlzzjlzz欧美大全| 日韩 欧美一区二区三区| 久久久久久免费| 欧美亚洲国产一区二区三区va|