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

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

?? scorequery.cs

?? C#編寫的學籍管理系統
?? CS
字號:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data.OleDb;
using System.Data;

namespace WindowsApplication1
{
	/// <summary>
	/// ScoreQuery 的摘要說明。
	/// </summary>
	public class ScoreQuery : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.TextBox textBox1;
		private System.Windows.Forms.Button button1;
		private System.Windows.Forms.GroupBox groupBox1;
		private System.Windows.Forms.Label label3;
		private System.Windows.Forms.NumericUpDown numericUpDown1;
		private System.Windows.Forms.NumericUpDown numericUpDown2;
		private System.Windows.Forms.TextBox textBox2;
		private System.Windows.Forms.TextBox textBox3;
		private System.Windows.Forms.DataGrid dataGrid1;
		private System.Data.OleDb.OleDbConnection oleDbConnection1;
		private System.Windows.Forms.DataGrid dataGrid2;
		/// <summary>
		/// 必需的設計器變量。
		/// </summary>
		private System.ComponentModel.Container components = null;

		public ScoreQuery()
		{
			//
			// 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.label2 = new System.Windows.Forms.Label();
			this.textBox1 = new System.Windows.Forms.TextBox();
			this.button1 = new System.Windows.Forms.Button();
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.textBox3 = new System.Windows.Forms.TextBox();
			this.numericUpDown2 = new System.Windows.Forms.NumericUpDown();
			this.label3 = new System.Windows.Forms.Label();
			this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
			this.textBox2 = new System.Windows.Forms.TextBox();
			this.dataGrid1 = new System.Windows.Forms.DataGrid();
			this.oleDbConnection1 = new System.Data.OleDb.OleDbConnection();
			this.dataGrid2 = new System.Windows.Forms.DataGrid();
			this.groupBox1.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.dataGrid2)).BeginInit();
			this.SuspendLayout();
			// 
			// label1
			// 
			this.label1.AutoSize = true;
			this.label1.Location = new System.Drawing.Point(24, 24);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(36, 21);
			this.label1.TabIndex = 0;
			this.label1.Text = "學號";
			// 
			// label2
			// 
			this.label2.AutoSize = true;
			this.label2.Location = new System.Drawing.Point(181, 31);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(67, 21);
			this.label2.TabIndex = 1;
			this.label2.Text = "學期范圍";
			// 
			// textBox1
			// 
			this.textBox1.Location = new System.Drawing.Point(75, 21);
			this.textBox1.Name = "textBox1";
			this.textBox1.Size = new System.Drawing.Size(96, 25);
			this.textBox1.TabIndex = 2;
			this.textBox1.Text = "007";
			// 
			// button1
			// 
			this.button1.Location = new System.Drawing.Point(536, 16);
			this.button1.Name = "button1";
			this.button1.Size = new System.Drawing.Size(54, 31);
			this.button1.TabIndex = 4;
			this.button1.Text = "查詢";
			this.button1.Click += new System.EventHandler(this.button1_Click);
			// 
			// groupBox1
			// 
			this.groupBox1.Controls.Add(this.textBox3);
			this.groupBox1.Controls.Add(this.numericUpDown2);
			this.groupBox1.Controls.Add(this.label3);
			this.groupBox1.Controls.Add(this.label1);
			this.groupBox1.Controls.Add(this.textBox1);
			this.groupBox1.Controls.Add(this.label2);
			this.groupBox1.Controls.Add(this.numericUpDown1);
			this.groupBox1.Controls.Add(this.textBox2);
			this.groupBox1.Controls.Add(this.button1);
			this.groupBox1.Location = new System.Drawing.Point(11, 10);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(621, 62);
			this.groupBox1.TabIndex = 5;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "查詢條件";
			// 
			// textBox3
			// 
			this.textBox3.Location = new System.Drawing.Point(405, 21);
			this.textBox3.Name = "textBox3";
			this.textBox3.Size = new System.Drawing.Size(54, 25);
			this.textBox3.TabIndex = 9;
			this.textBox3.Text = "2006";
			// 
			// numericUpDown2
			// 
			this.numericUpDown2.Location = new System.Drawing.Point(459, 21);
			this.numericUpDown2.Maximum = new System.Decimal(new int[] {
																		   2,
																		   0,
																		   0,
																		   0});
			this.numericUpDown2.Minimum = new System.Decimal(new int[] {
																		   1,
																		   0,
																		   0,
																		   0});
			this.numericUpDown2.Name = "numericUpDown2";
			this.numericUpDown2.Size = new System.Drawing.Size(42, 25);
			this.numericUpDown2.TabIndex = 7;
			this.numericUpDown2.Value = new System.Decimal(new int[] {
																		 1,
																		 0,
																		 0,
																		 0});
			// 
			// label3
			// 
			this.label3.AutoSize = true;
			this.label3.Location = new System.Drawing.Point(373, 21);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(21, 21);
			this.label3.TabIndex = 4;
			this.label3.Text = "至";
			// 
			// numericUpDown1
			// 
			this.numericUpDown1.Location = new System.Drawing.Point(320, 21);
			this.numericUpDown1.Maximum = new System.Decimal(new int[] {
																		   2,
																		   0,
																		   0,
																		   0});
			this.numericUpDown1.Minimum = new System.Decimal(new int[] {
																		   1,
																		   0,
																		   0,
																		   0});
			this.numericUpDown1.Name = "numericUpDown1";
			this.numericUpDown1.Size = new System.Drawing.Size(43, 25);
			this.numericUpDown1.TabIndex = 6;
			this.numericUpDown1.Value = new System.Decimal(new int[] {
																		 1,
																		 0,
																		 0,
																		 0});
			// 
			// textBox2
			// 
			this.textBox2.Location = new System.Drawing.Point(267, 21);
			this.textBox2.Name = "textBox2";
			this.textBox2.Size = new System.Drawing.Size(53, 25);
			this.textBox2.TabIndex = 8;
			this.textBox2.Text = "2002";
			// 
			// dataGrid1
			// 
			this.dataGrid1.AllowSorting = false;
			this.dataGrid1.BackgroundColor = System.Drawing.SystemColors.Control;
			this.dataGrid1.CaptionBackColor = System.Drawing.SystemColors.ActiveCaptionText;
			this.dataGrid1.CaptionFont = new System.Drawing.Font("宋體", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.dataGrid1.CaptionForeColor = System.Drawing.SystemColors.ControlText;
			this.dataGrid1.CaptionText = "成績列表";
			this.dataGrid1.DataMember = "";
			this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.dataGrid1.Location = new System.Drawing.Point(11, 82);
			this.dataGrid1.Name = "dataGrid1";
			this.dataGrid1.PreferredColumnWidth = 100;
			this.dataGrid1.ReadOnly = true;
			this.dataGrid1.Size = new System.Drawing.Size(618, 196);
			this.dataGrid1.TabIndex = 6;
			// 
			// oleDbConnection1
			// 
			this.oleDbConnection1.ConnectionString = "Data Source=xsxxdb.mdb;Jet OLEDB:Engine Type=5;Provider=Microsoft.Jet." +
				"OLEDB.4.0;";
			// 
			// dataGrid2
			// 
			this.dataGrid2.AllowSorting = false;
			this.dataGrid2.BackgroundColor = System.Drawing.SystemColors.Control;
			this.dataGrid2.CaptionBackColor = System.Drawing.SystemColors.ActiveCaptionText;
			this.dataGrid2.CaptionFont = new System.Drawing.Font("宋體", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.dataGrid2.CaptionForeColor = System.Drawing.SystemColors.ControlText;
			this.dataGrid2.CaptionText = "成績統計";
			this.dataGrid2.DataMember = "";
			this.dataGrid2.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.dataGrid2.Location = new System.Drawing.Point(11, 288);
			this.dataGrid2.Name = "dataGrid2";
			this.dataGrid2.PreferredColumnWidth = 100;
			this.dataGrid2.ReadOnly = true;
			this.dataGrid2.Size = new System.Drawing.Size(618, 144);
			this.dataGrid2.TabIndex = 7;
			// 
			// ScoreQuery
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(8, 18);
			this.ClientSize = new System.Drawing.Size(640, 446);
			this.Controls.Add(this.dataGrid2);
			this.Controls.Add(this.dataGrid1);
			this.Controls.Add(this.groupBox1);
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
			this.Name = "ScoreQuery";
			this.Text = "學生成績查詢";
			this.groupBox1.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.dataGrid2)).EndInit();
			this.ResumeLayout(false);

		}
		#endregion
		public bool strisyear(string s)
		{
			if (s.Trim().Length!=4)
				return (false);
			else
			{
				int n=1;
				for (int i=0;i<=s.Length-1;i++)
				{
					if (!System.Char.IsNumber(s[i]))
					{
						n=-1;
						break;
					}
				}
				if (n==1)
					return (true);
				else
					return (false);
			}
		}

		private void button1_Click(object sender, System.EventArgs e)
		{
			if (!strisyear(textBox2.Text.Trim()) || !strisyear(textBox3.Text.Trim()))
				MessageBox.Show("年份輸入非法");
			else if (textBox1.Text.Trim()=="")
			{
                MessageBox.Show("學號不能為空");
			}
			else if ( int.Parse(textBox2.Text.Trim())<= int.Parse(textBox3.Text.Trim()) && numericUpDown1.Value<=numericUpDown2.Value   )
			{
				string sql,xq1,xq2;
				xq1=textBox2.Text.Trim()+numericUpDown1.Value.ToString();
				xq2=textBox3.Text.Trim()+numericUpDown2.Value.ToString();
				sql="select ScoreId as 編號,Course as 課程,Score as 成績,cstr(cint(Semester/10))+'-'+cstr(cint(Semester/10)+1)+'年度第'+cstr(Semester mod 10)+'學期' as 學期 from ScoreInfo where StudentNumber='"+textBox1.Text.Trim()+"' and Semester between '"+xq1+"'and '"+xq2+"' order by Semester desc";
				OleDbDataAdapter adp=new OleDbDataAdapter(sql,oleDbConnection1);
				DataSet ds=new DataSet();
				adp.Fill(ds,"score");
				if (ds.Tables["score"].Rows.Count!=0)
				{
					dataGrid1.DataSource=ds.Tables["score"].DefaultView;
					dataGrid1.CaptionText="共檢索出"+ds.Tables["score"].Rows.Count+"門課程";
					for (int i=0;i<=ds.Tables["score"].Rows.Count-1;i++)
						dataGrid1[i,0]=i+1;

					sql="select cstr(cint(Semester/10))+'-'+cstr(cint(Semester/10)+1)+'年度第'+cstr(Semester mod 10)+'學期' as 學期,avg(Score) as 平均成績,sum(Score) as 總成績,count(ScoreId) as 課程數量  from ScoreInfo where StudentNumber='"+textBox1.Text.Trim()+"'and Semester between '"+xq1+"'and '"+xq2+"' group by Semester";
				    adp.SelectCommand.CommandText=sql;
					DataSet ds2=new DataSet();
					adp.Fill(ds,"tj");
					dataGrid2.DataSource=ds.Tables["tj"].DefaultView;
				}
				else
				{
					dataGrid1.DataSource=null;
					dataGrid1.CaptionText="暫時無紀錄";
				}
			}
			else
			{
				MessageBox.Show("請在左邊輸入較小的學期數值");
			}
		}
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区成人在线视频| 韩日欧美一区二区三区| 男男成人高潮片免费网站| 国产老妇另类xxxxx| 色婷婷久久一区二区三区麻豆| 欧美一区二区二区| 国产精品网友自拍| 久草精品在线观看| 色先锋aa成人| 国产日韩欧美一区二区三区乱码 | 99精品在线免费| 91麻豆精品国产91久久久使用方法| 中文字幕国产一区| 国产综合久久久久久久久久久久| 欧美日韩视频在线一区二区| 中文字幕日韩av资源站| 美女高潮久久久| 在线91免费看| 午夜av一区二区三区| 99视频精品全部免费在线| 国产日韩欧美精品一区| 激情综合五月婷婷| 精品视频1区2区| 亚洲激情在线播放| 91福利视频久久久久| 一区二区三区久久| 91一区一区三区| 亚洲女人的天堂| 99久久精品国产精品久久| 欧美激情艳妇裸体舞| 国产成都精品91一区二区三| 欧美激情一区二区三区蜜桃视频| 国产一区二区三区四区五区入口| 欧美电影免费观看高清完整版在线 | 日韩高清中文字幕一区| 在线观看中文字幕不卡| 亚洲男人天堂一区| 色综合天天综合狠狠| 国产精品国产三级国产普通话蜜臀 | 午夜精品久久久久影视| 欧美日韩国产系列| 午夜精品久久久久久久蜜桃app| 欧美午夜电影网| 亚洲一级在线观看| 6080亚洲精品一区二区| 麻豆视频观看网址久久| 精品动漫一区二区三区在线观看| 久久精品国产第一区二区三区| 日韩欧美一区二区在线视频| 久久电影国产免费久久电影| 精品国产露脸精彩对白| 丁香婷婷综合五月| 亚洲欧美日韩国产综合在线| 欧美精选在线播放| 国内精品在线播放| 自拍偷拍国产亚洲| 欧美日韩精品系列| 精品亚洲国产成人av制服丝袜 | 午夜精品福利在线| 日韩免费观看高清完整版| 国产精品一区二区在线播放 | 狠狠色狠狠色综合| 欧美国产日韩亚洲一区| 日本精品一级二级| 开心九九激情九九欧美日韩精美视频电影| 精品美女在线播放| 97se狠狠狠综合亚洲狠狠| 亚洲成a人片在线不卡一二三区| 欧美成人性福生活免费看| 亚洲一级二级在线| 91久久精品一区二区三| 久久亚洲一级片| 91一区二区在线| 男男视频亚洲欧美| 亚洲女同一区二区| 久久视频一区二区| 欧美日韩在线播放三区四区| 国产一区二区精品在线观看| 亚洲精品久久久蜜桃| 久久综合国产精品| 欧洲av一区二区嗯嗯嗯啊| 国内精品久久久久影院薰衣草| 亚洲女人****多毛耸耸8| 欧美成人综合网站| 欧美性生活一区| 成人av网站在线观看| 免费看精品久久片| 亚洲综合色噜噜狠狠| 久久新电视剧免费观看| 欧美视频中文字幕| 91免费在线看| 国产成人久久精品77777最新版本| 一区二区三区中文在线观看| 国产亚洲一二三区| 日韩精品一区二区三区视频| 欧美三级视频在线观看| 99精品偷自拍| 高清beeg欧美| 国产麻豆精品在线观看| 日韩精品一二区| 亚洲3atv精品一区二区三区| 亚洲免费资源在线播放| 国产欧美1区2区3区| 欧美精品一区二区三| 欧美一区二区三区电影| 欧美精品乱码久久久久久| 欧美午夜精品一区二区蜜桃| 色av一区二区| 在线中文字幕不卡| 在线观看免费亚洲| 一本色道久久综合亚洲精品按摩| 国产成人免费视频一区| 国产一区二区主播在线| 国内精品在线播放| 国产在线精品免费| 国产一区二区三区观看| 韩国av一区二区| 高清不卡一区二区| 99re热视频精品| 91麻豆国产福利在线观看| 色综合天天综合网天天看片| 色88888久久久久久影院按摩| 色婷婷精品久久二区二区蜜臀av| 91免费观看视频在线| 91蜜桃免费观看视频| 色网站国产精品| 欧美精品一二三| 日韩一二在线观看| 久久午夜国产精品| 国产精品久久影院| 一区二区三区日韩欧美| 亚洲一区二区视频在线观看| 丝袜美腿成人在线| 久久精品国产99| 成人av影视在线观看| 欧美在线观看一二区| 欧美一区欧美二区| 国产亚洲精品bt天堂精选| 国产精品美女久久久久久久久| 亚洲欧美色综合| 日本视频一区二区三区| 国产成人8x视频一区二区 | 欧美一区二区在线播放| 欧美岛国在线观看| 综合久久国产九一剧情麻豆| 亚洲mv在线观看| 国产成人亚洲综合a∨婷婷图片| 91在线观看成人| 欧美大片在线观看一区| 亚洲日本中文字幕区| 蜜桃久久精品一区二区| 成人毛片视频在线观看| 欧美日韩精品久久久| 国产无人区一区二区三区| 一区二区三区蜜桃| 国产精品99久久久久久似苏梦涵 | 国产精品久久久久天堂| 亚洲第一搞黄网站| 国产福利一区在线观看| 精品视频在线免费观看| 国产午夜精品久久久久久免费视 | 天使萌一区二区三区免费观看| 国产精品99久| 欧美电影在哪看比较好| 国产精品短视频| 精品亚洲成a人在线观看| 在线中文字幕一区二区| 中文字幕欧美区| 免费xxxx性欧美18vr| 日本韩国一区二区三区视频| 久久久噜噜噜久久中文字幕色伊伊 | 久久久久久久精| 日韩福利电影在线| 日本精品一区二区三区高清| 国产丝袜美腿一区二区三区| 日本亚洲最大的色成网站www| 91在线观看一区二区| 国产亚洲欧美一区在线观看| 日本成人超碰在线观看| 97se亚洲国产综合自在线不卡 | 成人黄色大片在线观看| 日韩欧美激情在线| 亚洲成人黄色影院| va亚洲va日韩不卡在线观看| 欧美精品一区视频| 久久99精品国产.久久久久| 欧美日韩精品免费观看视频| 一区二区三区欧美日韩| 99久久国产免费看| 中文字幕亚洲电影| www.在线成人| 国产精品视频一区二区三区不卡| 精品在线播放免费| 欧美xxxxxxxxx| 老汉av免费一区二区三区| 欧美精品在线一区二区| 日韩精品一二三四| 欧美一区二区三区免费在线看| 天天影视色香欲综合网老头| 欧美高清激情brazzers|