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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? 添加用戶.cs

?? 管理學院機房計費系統,VISUAL STUDIO .NET 2003 c# 語言實現,SQL SERVER 2000數據庫. 現運行正常.
?? CS
字號:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;

namespace 機房計費系統
{
	/// <summary>
	/// Form2 的摘要說明。
	/// </summary>
	public class frmAddUser : 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.Button button1;
		private System.Data.SqlClient.SqlConnection sqlConnection1;
		private int numAff;
		private String sql;
		private System.Windows.Forms.Label label4;
		private System.Windows.Forms.TextBox textBox4;
		private System.Windows.Forms.Button button2;
		private System.Windows.Forms.Label label5;
		private System.Windows.Forms.CheckBox checkBox1;
		private System.Windows.Forms.Label label6;
		/// <summary>
		/// 必需的設計器變量。
		/// </summary>
		private System.ComponentModel.Container components = null;

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

			//
			// 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()
		{
			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.button1 = new System.Windows.Forms.Button();
			this.sqlConnection1 = new System.Data.SqlClient.SqlConnection();
			this.label4 = new System.Windows.Forms.Label();
			this.textBox4 = new System.Windows.Forms.TextBox();
			this.button2 = new System.Windows.Forms.Button();
			this.label5 = new System.Windows.Forms.Label();
			this.checkBox1 = new System.Windows.Forms.CheckBox();
			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(56, 48);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(56, 23);
			this.label1.TabIndex = 0;
			this.label1.Text = "條形碼";
			this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			this.label1.Click += new System.EventHandler(this.label1_Click);
			// 
			// 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(136, 40);
			this.textBox1.Name = "textBox1";
			this.textBox1.Size = new System.Drawing.Size(264, 26);
			this.textBox1.TabIndex = 1;
			this.textBox1.Text = "";
			// 
			// 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(56, 96);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(56, 24);
			this.label2.TabIndex = 2;
			this.label2.Text = "班級";
			this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			// 
			// textBox2
			// 
			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(136, 88);
			this.textBox2.Name = "textBox2";
			this.textBox2.Size = new System.Drawing.Size(104, 26);
			this.textBox2.TabIndex = 2;
			this.textBox2.Text = "";
			this.textBox2.TextChanged += new System.EventHandler(this.textBox2_TextChanged);
			// 
			// 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(56, 144);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(56, 23);
			this.label3.TabIndex = 4;
			this.label3.Text = "姓名";
			this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			// 
			// textBox3
			// 
			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(136, 136);
			this.textBox3.Name = "textBox3";
			this.textBox3.Size = new System.Drawing.Size(104, 26);
			this.textBox3.TabIndex = 3;
			this.textBox3.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(112, 232);
			this.button1.Name = "button1";
			this.button1.Size = new System.Drawing.Size(88, 24);
			this.button1.TabIndex = 6;
			this.button1.Text = "添加";
			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";
			// 
			// 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(56, 184);
			this.label4.Name = "label4";
			this.label4.Size = new System.Drawing.Size(56, 23);
			this.label4.TabIndex = 7;
			this.label4.Text = "繳費額";
			this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			// 
			// textBox4
			// 
			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(136, 176);
			this.textBox4.Name = "textBox4";
			this.textBox4.Size = new System.Drawing.Size(104, 26);
			this.textBox4.TabIndex = 4;
			this.textBox4.Text = "";
			// 
			// button2
			// 
			this.button2.Location = new System.Drawing.Point(280, 232);
			this.button2.Name = "button2";
			this.button2.Size = new System.Drawing.Size(88, 23);
			this.button2.TabIndex = 9;
			this.button2.Text = "關閉";
			this.button2.Click += new System.EventHandler(this.button2_Click);
			// 
			// label5
			// 
			this.label5.Font = new System.Drawing.Font("宋體", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.label5.ImageAlign = System.Drawing.ContentAlignment.BottomLeft;
			this.label5.Location = new System.Drawing.Point(248, 184);
			this.label5.Name = "label5";
			this.label5.Size = new System.Drawing.Size(24, 23);
			this.label5.TabIndex = 10;
			this.label5.Text = "元";
			// 
			// checkBox1
			// 
			this.checkBox1.Font = new System.Drawing.Font("宋體", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.checkBox1.Location = new System.Drawing.Point(296, 176);
			this.checkBox1.Name = "checkBox1";
			this.checkBox1.Size = new System.Drawing.Size(112, 24);
			this.checkBox1.TabIndex = 11;
			this.checkBox1.Text = "研究生賬戶";
			this.checkBox1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			// 
			// 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(264, 96);
			this.label6.Name = "label6";
			this.label6.Size = new System.Drawing.Size(168, 23);
			this.label6.TabIndex = 12;
			this.label6.Text = "(與借閱證班級一致)";
			// 
			// frmAddUser
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(480, 278);
			this.Controls.Add(this.label6);
			this.Controls.Add(this.checkBox1);
			this.Controls.Add(this.label5);
			this.Controls.Add(this.button2);
			this.Controls.Add(this.textBox4);
			this.Controls.Add(this.label4);
			this.Controls.Add(this.button1);
			this.Controls.Add(this.textBox3);
			this.Controls.Add(this.label3);
			this.Controls.Add(this.textBox2);
			this.Controls.Add(this.label2);
			this.Controls.Add(this.textBox1);
			this.Controls.Add(this.label1);
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
			this.MaximizeBox = false;
			this.MinimizeBox = false;
			this.Name = "frmAddUser";
			this.ShowInTaskbar = false;
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
			this.Text = "新建賬戶";
			this.Load += new System.EventHandler(this.frmAddUser_Load);
			this.ResumeLayout(false);

		}
		#endregion

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

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

		private void button1_Click(object sender, System.EventArgs e)
		{
			//MessageBox.Show(IsMaster(this.textBox2.Text).ToString());
			string strMsg="";
			if(this.textBox1.TextLength==0)
			{
				MessageBox.Show("新用戶添加失敗,條碼掃描出錯!","新建賬戶",MessageBoxButtons.OK,MessageBoxIcon.Error);
				goto finish;
			}
			if(IsMaster(this.textBox2.Text) & !this.checkBox1.Checked)
			{
				MessageBox.Show("請檢查是否正確輸入研究生賬戶信息!","新建賬戶",MessageBoxButtons.OK,MessageBoxIcon.Error);	
				goto finish;
			}
			if(!IsMaster(this.textBox2.Text) & this.checkBox1.Checked)
			{
				MessageBox.Show("請檢查是否正確輸入研究生賬戶信息!","新建賬戶",MessageBoxButtons.OK,MessageBoxIcon.Error);	
				goto finish;
			}
			try
			{
				Decimal money=Decimal.Parse(this.textBox4.Text);
				float floMoney=(float)money;

				//添加優惠額
				
				sql="select * from 優惠表 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();

				//計算優惠額 

				if(IsMaster(this.textBox2.Text) & this.checkBox1.Checked)
				{
					floMoney*=2;
					strMsg="研究生賬戶添加成功";
				}
				else
				{
					if(floMoney>=intYh1 && floMoney<intYh2)
					{
						floMoney*=(1+intPower1/100);
					}
					if(floMoney>=intYh2)
					{
						floMoney*=(1+intPower2/100);			
					}
					strMsg="新賬戶添加成功";
				}
				
				sql="insert 帳戶表 values ('"+ this.textBox1.Text +"','"+ this.textBox2.Text +"','"+ this.textBox3.Text +"','"+ floMoney.ToString() +"','0','0')";
				SqlCommand cmd=new SqlCommand(this.sql,this.sqlConnection1);
				this.sqlConnection1.Open();
				try
				{
					numAff=cmd.ExecuteNonQuery();
					MessageBox.Show(strMsg+"!實際繳費"+ this.textBox4.Text +"元,充值"+ floMoney.ToString() +"元","新建賬戶",MessageBoxButtons.OK,MessageBoxIcon.Information);
				}

				catch(SqlException exe)
				{
					MessageBox.Show("新賬戶添加失敗請檢查輸入!","新建賬戶",MessageBoxButtons.OK,MessageBoxIcon.Error);	
					goto finish;
				}

				finally
				{
					this.sqlConnection1.Close();
				}

				//寫充值表
				DateTime dtNow=DateTime.Now;
				sql="insert into 收費流水表 (時間,條形碼,值班教師,收費,充值) values('"+ dtNow.ToString() +"','"+ this.textBox1.Text +"','"+ frmMain.strTeacher +"','"+ this.textBox4.Text +"','"+ floMoney.ToString() +"')";
				SqlCommand cmdCzls=new SqlCommand(sql,this.sqlConnection1);
				try
				{
					this.sqlConnection1.Open();
					cmdCzls.ExecuteNonQuery();
				}
				catch(SqlException exe)
				{
					MessageBox.Show("寫充值流水表出現錯誤!","新建賬戶",MessageBoxButtons.OK,MessageBoxIcon.Error);
				}
				finally
				{
					this.sqlConnection1.Close();
				}

				//

			}
			catch(FormatException exe)
			{
				MessageBox.Show("輸入金額無效!","新建賬戶",MessageBoxButtons.OK,MessageBoxIcon.Error);
				this.textBox4.Text="";
			}
			finally
			{
			
			}
			finish:
				this.textBox1.Clear();
				this.textBox2.Clear();
				this.textBox3.Clear();
				this.textBox4.Clear();
				this.textBox1.Focus();
				this.textBox1.SelectAll();
				this.checkBox1.Checked=false;
		}


		private void button2_Click(object sender, System.EventArgs e)
		{
			//this.textBox1.Text="";
			//this.textBox1.Focus();
			//this.textBox1.SelectAll();
			//this.textBox2.Text="";
			//this.textBox3.Text="";
			//this.textBox4.Text="";
			this.Close();

		}

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

		private bool IsMaster(string s)
		{
			if(s.IndexOf("研")==-1)
			{
				return false;
			}
			else
			{
				return true;
			}
		}
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91国在线观看| 国产精品你懂的在线欣赏| 久久久精品tv| 亚洲超碰精品一区二区| 国产伦精一区二区三区| 欧美久久免费观看| 亚洲一区二区三区在线播放| 国产91精品露脸国语对白| 欧美福利视频导航| 一区二区三区在线免费观看| 成人涩涩免费视频| 精品福利在线导航| 日产国产高清一区二区三区| 色一情一乱一乱一91av| 国产亚洲欧美中文| 狠狠色狠狠色综合| 精品国产乱码久久久久久蜜臀| 五月婷婷综合网| 欧美日韩一区二区三区不卡| 一区二区三区在线观看动漫| 欧美日韩免费电影| 亚洲欧洲日产国码二区| 丁香激情综合国产| 久久久www成人免费毛片麻豆| 精品在线观看视频| 精品国产91九色蝌蚪| 激情丁香综合五月| 日韩女优制服丝袜电影| 老司机午夜精品| 日韩视频123| 久久国产人妖系列| www国产精品av| 国产精品一线二线三线| 国产日产精品一区| 国产aⅴ综合色| 亚洲婷婷国产精品电影人久久| 91亚洲男人天堂| 亚洲精品五月天| 欧美日韩国产123区| 日本视频在线一区| 久久精品一区二区三区不卡牛牛| 国产乱子轮精品视频| 国产欧美一区二区三区在线看蜜臀| 国产精品 日产精品 欧美精品| 久久毛片高清国产| caoporn国产精品| 亚洲午夜视频在线| 精品蜜桃在线看| 国产69精品久久777的优势| 亚洲欧洲中文日韩久久av乱码| 欧美最猛性xxxxx直播| 日产国产高清一区二区三区| 久久综合一区二区| 99re6这里只有精品视频在线观看| 一区二区三区中文字幕精品精品| 欧美一级欧美一级在线播放| 国产河南妇女毛片精品久久久| 中文字幕在线免费不卡| 91.xcao| 极品销魂美女一区二区三区| 国产精品每日更新在线播放网址| 欧美图区在线视频| 国产一区欧美二区| 一区二区欧美视频| 久久久久久黄色| 欧美中文字幕久久| 韩国成人精品a∨在线观看| 成人免费在线观看入口| 91精品麻豆日日躁夜夜躁| 处破女av一区二区| 不卡av在线免费观看| 五月婷婷另类国产| 亚洲欧洲精品一区二区三区| 欧美日本不卡视频| 成人性生交大合| 麻豆国产精品一区二区三区| 亚洲视频香蕉人妖| 久久精品视频在线免费观看| 欧美亚洲动漫制服丝袜| 国产91富婆露脸刺激对白| 日本人妖一区二区| 亚洲一区电影777| 欧美国产日韩精品免费观看| 日韩免费视频线观看| 日本精品一区二区三区高清 | 亚洲特黄一级片| 欧美大片在线观看一区二区| 91黄视频在线| 成人av资源站| 国产精品性做久久久久久| 偷窥少妇高潮呻吟av久久免费| 国产精品国产精品国产专区不蜜| 精品精品国产高清一毛片一天堂| 欧美日韩色综合| 一本高清dvd不卡在线观看 | 欧美a一区二区| 亚洲免费伊人电影| 中文一区在线播放| 欧美精品一区男女天堂| 日韩欧美激情在线| 7777精品伊人久久久大香线蕉超级流畅 | 成人黄色在线看| 狠狠色综合日日| 久久99国产精品久久99果冻传媒| 亚洲第一av色| 亚洲小少妇裸体bbw| 亚洲综合男人的天堂| 亚洲视频在线一区| 亚洲私人黄色宅男| 亚洲桃色在线一区| 中文字幕亚洲电影| 国产精品久久久久影院老司| 国产欧美精品区一区二区三区| 久久久精品影视| 欧美激情一二三区| 中文字幕va一区二区三区| 国产清纯白嫩初高生在线观看91 | 夜夜亚洲天天久久| 亚洲日本中文字幕区| 亚洲欧美怡红院| 一区二区不卡在线播放| 亚洲愉拍自拍另类高清精品| 亚洲婷婷国产精品电影人久久| 国产精品高潮久久久久无| 中文字幕精品一区| 亚洲少妇最新在线视频| 亚洲综合成人网| 偷偷要91色婷婷| 韩日欧美一区二区三区| 国产一区二区看久久| 成人免费精品视频| 色激情天天射综合网| 欧美色网站导航| 日韩精品一区二区在线| 久久久久久久久久看片| 亚洲欧洲日韩av| 天天综合天天综合色| 精品在线视频一区| 成人av电影免费观看| 欧美三级欧美一级| 精品免费视频.| 中文字幕在线不卡一区| 波多野结衣中文字幕一区二区三区 | 91麻豆视频网站| 欧美日韩精品一二三区| 久久亚洲一区二区三区四区| 国产精品乱码一区二三区小蝌蚪| 亚洲综合色噜噜狠狠| 韩国v欧美v日本v亚洲v| 91网站最新网址| 精品国产a毛片| 一区av在线播放| 国产成人免费xxxxxxxx| 欧美日韩一区久久| 中文字幕欧美激情| 日本欧美大码aⅴ在线播放| 成人国产精品免费网站| 欧美精品99久久久**| 国产精品免费视频一区| 亚洲成av人综合在线观看| 国产成人精品免费| 欧美一区二区三区四区久久| 中文字幕一区二区三区四区不卡 | 一区二区三区国产精华| 久久99精品久久久久| 日本精品视频一区二区| 国产拍揄自揄精品视频麻豆| 日韩影视精彩在线| 色综合久久综合网97色综合| 久久综合国产精品| 青青草原综合久久大伊人精品 | 国产成人aaa| 日韩一区和二区| 亚洲精品久久7777| 成人美女在线视频| 精品日产卡一卡二卡麻豆| 亚洲一区二区三区四区在线免费观看| 国产丶欧美丶日本不卡视频| 日韩亚洲国产中文字幕欧美| 一级精品视频在线观看宜春院| 国产电影一区在线| 欧美精品一区视频| 精品一区二区三区视频 | 美腿丝袜亚洲一区| 色视频一区二区| 国产精品美女久久久久久久久久久| 麻豆久久久久久| 91精品国产综合久久蜜臀| 夜夜精品视频一区二区| 色综合久久久久久久久久久| 亚洲欧洲另类国产综合| 不卡电影一区二区三区| 中文字幕av一区二区三区| 从欧美一区二区三区| 久久久久久电影| 国产精品一区二区三区乱码| 精品国产免费一区二区三区香蕉| 麻豆成人av在线| 精品久久久久久久久久久久包黑料| 美国毛片一区二区三区|