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

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

?? booksstatistics.cs

?? 圖書館信息管理系統(tǒng) Library Information Management System
?? CS
字號(hào):
using System;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace Library
{
	/// <summary>
	/// BooksStatistics 的摘要說(shuō)明。
	/// </summary>
	public class BooksStatistics : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.ListView listView1;
		private System.Windows.Forms.GroupBox groupBox2;
		private System.Windows.Forms.Button button1;
		private System.Windows.Forms.Button btnClose;
		private System.Windows.Forms.Button button3;
		private System.Windows.Forms.GroupBox groupBox3;
		private System.Windows.Forms.ComboBox comboBox1;
		private System.Windows.Forms.RadioButton radioButton2;
		private System.Windows.Forms.RadioButton radioButton1;
		private System.Windows.Forms.Label label3;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.Button btnSearch;
		private System.Windows.Forms.TextBox textBox1;
		/// <summary>
		/// 必需的設(shè)計(jì)器變量。
		/// </summary>
		private System.ComponentModel.Container components = null;
		/// <summary>
		/// 臨時(shí)數(shù)據(jù)表
		/// </summary>
		private static System.Data.DataTable tableTemp = null;
		/// <summary>
		/// 重置標(biāo)志
		/// </summary>
		private bool reset = false;

		public BooksStatistics()
		{
			//
			// Windows 窗體設(shè)計(jì)器支持所必需的
			//
			InitializeComponent();
			//
			//初始化
			//
			initializeScreen();
		}

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

		#region Windows 窗體設(shè)計(jì)器生成的代碼
		/// <summary>
		/// 設(shè)計(jì)器支持所需的方法 - 不要使用代碼編輯器修改
		/// 此方法的內(nèi)容。
		/// </summary>
		private void InitializeComponent()
		{
			this.label1 = new System.Windows.Forms.Label();
			this.listView1 = new System.Windows.Forms.ListView();
			this.groupBox2 = new System.Windows.Forms.GroupBox();
			this.button1 = new System.Windows.Forms.Button();
			this.btnClose = new System.Windows.Forms.Button();
			this.button3 = new System.Windows.Forms.Button();
			this.groupBox3 = new System.Windows.Forms.GroupBox();
			this.comboBox1 = new System.Windows.Forms.ComboBox();
			this.radioButton2 = new System.Windows.Forms.RadioButton();
			this.radioButton1 = new System.Windows.Forms.RadioButton();
			this.label3 = new System.Windows.Forms.Label();
			this.label2 = new System.Windows.Forms.Label();
			this.btnSearch = new System.Windows.Forms.Button();
			this.textBox1 = new System.Windows.Forms.TextBox();
			this.groupBox2.SuspendLayout();
			this.groupBox3.SuspendLayout();
			this.SuspendLayout();
			// 
			// label1
			// 
			this.label1.BackColor = System.Drawing.Color.WhiteSmoke;
			this.label1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
			this.label1.Font = new System.Drawing.Font("宋體", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.label1.ForeColor = System.Drawing.Color.Black;
			this.label1.Location = new System.Drawing.Point(290, 16);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(216, 23);
			this.label1.TabIndex = 1;
			this.label1.Text = "圖 書 借 閱 排 名";
			this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			// 
			// listView1
			// 
			this.listView1.FullRowSelect = true;
			this.listView1.GridLines = true;
			this.listView1.Location = new System.Drawing.Point(27, 56);
			this.listView1.Name = "listView1";
			this.listView1.Size = new System.Drawing.Size(736, 309);
			this.listView1.TabIndex = 2;
			this.listView1.View = System.Windows.Forms.View.Details;
			// 
			// groupBox2
			// 
			this.groupBox2.Controls.Add(this.button1);
			this.groupBox2.Controls.Add(this.btnClose);
			this.groupBox2.Controls.Add(this.button3);
			this.groupBox2.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this.groupBox2.Location = new System.Drawing.Point(480, 416);
			this.groupBox2.Name = "groupBox2";
			this.groupBox2.Size = new System.Drawing.Size(264, 72);
			this.groupBox2.TabIndex = 14;
			this.groupBox2.TabStop = false;
			this.groupBox2.Text = "控制欄";
			// 
			// button1
			// 
			this.button1.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this.button1.Location = new System.Drawing.Point(95, 32);
			this.button1.Name = "button1";
			this.button1.TabIndex = 4;
			this.button1.Text = "重置";
			this.button1.Click += new System.EventHandler(this.button1_Click);
			// 
			// btnClose
			// 
			this.btnClose.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this.btnClose.Location = new System.Drawing.Point(178, 32);
			this.btnClose.Name = "btnClose";
			this.btnClose.TabIndex = 3;
			this.btnClose.Text = "關(guān)閉";
			this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
			// 
			// button3
			// 
			this.button3.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this.button3.Location = new System.Drawing.Point(12, 32);
			this.button3.Name = "button3";
			this.button3.TabIndex = 2;
			this.button3.Text = "導(dǎo)出Excel";
			this.button3.Click += new System.EventHandler(this.button3_Click);
			// 
			// groupBox3
			// 
			this.groupBox3.Controls.Add(this.comboBox1);
			this.groupBox3.Controls.Add(this.radioButton2);
			this.groupBox3.Controls.Add(this.radioButton1);
			this.groupBox3.Controls.Add(this.label3);
			this.groupBox3.Controls.Add(this.label2);
			this.groupBox3.Controls.Add(this.btnSearch);
			this.groupBox3.Controls.Add(this.textBox1);
			this.groupBox3.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this.groupBox3.Location = new System.Drawing.Point(48, 376);
			this.groupBox3.Name = "groupBox3";
			this.groupBox3.Size = new System.Drawing.Size(416, 112);
			this.groupBox3.TabIndex = 13;
			this.groupBox3.TabStop = false;
			this.groupBox3.Text = "查詢記錄";
			// 
			// comboBox1
			// 
			this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
			this.comboBox1.Location = new System.Drawing.Point(104, 32);
			this.comboBox1.Name = "comboBox1";
			this.comboBox1.Size = new System.Drawing.Size(121, 20);
			this.comboBox1.TabIndex = 6;
			// 
			// radioButton2
			// 
			this.radioButton2.Location = new System.Drawing.Point(320, 32);
			this.radioButton2.Name = "radioButton2";
			this.radioButton2.Size = new System.Drawing.Size(72, 24);
			this.radioButton2.TabIndex = 9;
			this.radioButton2.Text = "模糊查詢";
			// 
			// radioButton1
			// 
			this.radioButton1.Checked = true;
			this.radioButton1.Location = new System.Drawing.Point(240, 32);
			this.radioButton1.Name = "radioButton1";
			this.radioButton1.Size = new System.Drawing.Size(72, 24);
			this.radioButton1.TabIndex = 8;
			this.radioButton1.TabStop = true;
			this.radioButton1.Text = "精確查詢";
			// 
			// label3
			// 
			this.label3.AutoSize = true;
			this.label3.Location = new System.Drawing.Point(24, 72);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(66, 17);
			this.label3.TabIndex = 7;
			this.label3.Text = "查詢條件:";
			// 
			// label2
			// 
			this.label2.AutoSize = true;
			this.label2.Location = new System.Drawing.Point(24, 32);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(66, 17);
			this.label2.TabIndex = 5;
			this.label2.Text = "查詢依據(jù):";
			// 
			// btnSearch
			// 
			this.btnSearch.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this.btnSearch.Location = new System.Drawing.Point(336, 72);
			this.btnSearch.Name = "btnSearch";
			this.btnSearch.Size = new System.Drawing.Size(56, 23);
			this.btnSearch.TabIndex = 4;
			this.btnSearch.Text = "查詢";
			this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
			// 
			// textBox1
			// 
			this.textBox1.Location = new System.Drawing.Point(104, 72);
			this.textBox1.Name = "textBox1";
			this.textBox1.Size = new System.Drawing.Size(208, 21);
			this.textBox1.TabIndex = 3;
			this.textBox1.Text = "";
			// 
			// BooksStatistics
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(790, 503);
			this.ControlBox = false;
			this.Controls.Add(this.groupBox2);
			this.Controls.Add(this.groupBox3);
			this.Controls.Add(this.listView1);
			this.Controls.Add(this.label1);
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
			this.Name = "BooksStatistics";
			this.ShowInTaskbar = false;
			this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
			this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
			this.Text = "圖書借閱排名";
			this.groupBox2.ResumeLayout(false);
			this.groupBox3.ResumeLayout(false);
			this.ResumeLayout(false);

		}
		#endregion
		/// <summary>
		/// 定義方法GetData(),返回一個(gè)數(shù)據(jù)表
		/// </summary>
		/// <returns>返回DataTable</returns>
		public static System.Data.DataTable GetData(string view)
		{
			SqlDataAdapter adapter = new SqlDataAdapter("select * from " + view,Global.conn);
			DataSet ds= new DataSet();
			try
			{
				adapter.Fill(ds);
			}
			catch(Exception ex)
			{
				MessageBox.Show(ex.ToString());
			}
			return ds.Tables[0];
		}
		/// <summary>
		/// 定義方法GetData(),返回一個(gè)數(shù)據(jù)表
		/// </summary>
		/// <returns>返回DataTable</returns>
		public static System.Data.DataTable GetData2(string sel)
		{
			SqlDataAdapter adapter = new SqlDataAdapter(sel,Global.conn);
			DataSet ds= new DataSet();
			try
			{
				adapter.Fill(ds);
			}
			catch(Exception ex)
			{
				MessageBox.Show(ex.ToString());
			}
			return ds.Tables[0];
		}
		/// <summary>
		/// 初始化
		/// </summary>
		private void initializeScreen()
		{
			ListViewItem item = null;
			int colIndex=0;
			tableTemp = GetData("V_圖書借閱排名");
			if(reset)
			{
				listView1.Items.Clear();
				//將所得到的表的列名,賦值給單元格
				foreach(DataColumn col in tableTemp.Columns)
				{
					colIndex++;
					comboBox1.Items.Add(col.ColumnName);
				}
			}
			else
			{
				listView1.Clear();
				//將所得到的表的列名,賦值給單元格
				foreach(DataColumn col in tableTemp.Columns)
				{
					colIndex++;
					listView1.Columns.Add(col.ColumnName,-2,HorizontalAlignment.Left);
					comboBox1.Items.Add(col.ColumnName);
				}
			}
			//同樣方法處理數(shù)據(jù)
			foreach(DataRow row in tableTemp.Rows)
			{
				colIndex=0;
				item = new ListViewItem(row[0].ToString());
				for(colIndex= 1;colIndex<tableTemp.Columns.Count;colIndex++)
				{
					item.SubItems.Add(row[colIndex].ToString());
				}
				listView1.Items.Add(item);
			}
		}
		/// <summary>
		/// 關(guān)閉按鈕
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void btnClose_Click(object sender, System.EventArgs e)
		{
			Global.ActiveChild = "null";
			Global.BooksStatistics = false;
			this.Close();
		}
		/// <summary>
		/// 重置
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void button1_Click(object sender, System.EventArgs e)
		{
			reset = true;
			initializeScreen();
		}
		/// <summary>
		/// 將數(shù)據(jù)導(dǎo)出到Excel
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void button3_Click(object sender, System.EventArgs e)
		{
			Microsoft.Office.Interop.Excel.Application excel= new Microsoft.Office.Interop.Excel.Application();
			int rowIndex=1;
			int colIndex=0;
			excel.Application.Workbooks.Add(true);
     
			//將所得到的表的列名,賦值給單元格
			foreach(DataColumn col in tableTemp.Columns)
			{
				colIndex++; 
				excel.Cells[1,colIndex]=col.ColumnName;    
			}
			//同樣方法處理數(shù)據(jù)
			foreach(DataRow row in tableTemp.Rows)
			{
				rowIndex++;
				colIndex=0;
				foreach(DataColumn col in tableTemp.Columns)
				{
					colIndex++;
					excel.Cells[rowIndex,colIndex]=row[col.ColumnName].ToString();
				}
			}
			MessageBox.Show("成功導(dǎo)出記錄!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information);
			//不可見,即后臺(tái)處理
			excel.Visible=true;
		}
		/// <summary>
		/// 查詢
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void btnSearch_Click(object sender, System.EventArgs e)
		{
			string str = "";
			if(comboBox1.Text != "")
			{
				if(radioButton1.Checked)
				{
					str = "select * from V_圖書借閱排名"+ " where " + comboBox1.Text + "='" + textBox1.Text + "'";
					ListViewItem item = null;
					listView1.Items.Clear();
					int colIndex=0;
					tableTemp = GetData2(str);
					//同樣方法處理數(shù)據(jù)
					foreach(DataRow row in tableTemp.Rows)
					{
						colIndex=0;
						item = new ListViewItem(row[0].ToString());
						for(colIndex= 1;colIndex<tableTemp.Columns.Count;colIndex++)
						{
							item.SubItems.Add(row[colIndex].ToString());
						}
						listView1.Items.Add(item);
					}
				}
				else
				{
					str = "select * from V_圖書借閱排名" + " where " + comboBox1.Text + " like '%" + textBox1.Text + "%'";
					ListViewItem item = null;
					listView1.Items.Clear();
					int colIndex=0;
					tableTemp = GetData2(str);
					//同樣方法處理數(shù)據(jù)
					foreach(DataRow row in tableTemp.Rows)
					{
						colIndex=0;
						item = new ListViewItem(row[0].ToString());
						for(colIndex= 1;colIndex<tableTemp.Columns.Count;colIndex++)
						{
							item.SubItems.Add(row[colIndex].ToString());
						}
						listView1.Items.Add(item);
					}
				}
			}
			else
			{
				MessageBox.Show("查詢依據(jù)不清楚!請(qǐng)重新設(shè)定!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information);
				comboBox1.Focus();
			}
		}
	}
}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产**成人网毛片九色| 国产三级一区二区| 久久久久高清精品| 亚洲精品一二三四区| 免费在线观看成人| 欧美性受极品xxxx喷水| 久久香蕉国产线看观看99| 一区二区三区免费在线观看| 国产资源在线一区| 久久免费看少妇高潮| 夜夜操天天操亚洲| 91精品国产91久久久久久最新毛片| 在线视频综合导航| 欧美激情一区二区在线| 日韩电影免费在线| 亚洲制服丝袜av| 欧美国产一区视频在线观看| 国产色91在线| 亚洲欧美一区二区三区孕妇| 亚洲欧美日韩久久| 天堂va蜜桃一区二区三区 | 一本到不卡精品视频在线观看| 99久久精品国产网站| 91美女片黄在线观看91美女| 欧美视频自拍偷拍| 欧美tickle裸体挠脚心vk| 国产女人aaa级久久久级| 成人欧美一区二区三区在线播放| 亚洲精品国产精华液| 日韩精品91亚洲二区在线观看 | 久久久影院官网| 国产精品国产三级国产a| 亚洲综合在线电影| 蜜桃91丨九色丨蝌蚪91桃色| 国产电影一区在线| 欧美三级韩国三级日本一级| 精品国产乱码久久久久久久| 成人免费在线观看入口| 日韩黄色免费电影| av电影在线观看完整版一区二区| 欧洲激情一区二区| 国产视频一区二区三区在线观看| 亚洲国产欧美在线| 国产大片一区二区| 欧美疯狂性受xxxxx喷水图片| 国产日韩欧美综合一区| 天堂蜜桃一区二区三区| 91美女片黄在线观看| 久久久久久久久岛国免费| 亚洲在线视频免费观看| 国产一区二区电影| 日韩一区二区免费在线电影| 1区2区3区欧美| 国产在线不卡一区| 制服丝袜中文字幕一区| 国产精品麻豆一区二区| 九色综合狠狠综合久久| 欧美日韩久久久一区| 国产精品精品国产色婷婷| 青青草国产成人av片免费| 色哟哟亚洲精品| 国产精品婷婷午夜在线观看| 蜜臀精品久久久久久蜜臀| 欧美日韩精品一区二区在线播放| 中文字幕综合网| av高清不卡在线| 日本一区二区三级电影在线观看 | 国产美女久久久久| 日韩欧美三级在线| 丝袜脚交一区二区| 欧美亚洲动漫制服丝袜| 亚洲欧美电影一区二区| 成人av集中营| 国产精品乱码一区二三区小蝌蚪| 精品一区二区久久久| 欧美一区二区三区免费| 日韩高清不卡在线| 欧美一区二区三区在线| 日本成人在线电影网| 337p亚洲精品色噜噜狠狠| 午夜精品成人在线视频| 777奇米四色成人影色区| 亚洲不卡一区二区三区| 欧美久久久久久久久| 偷拍自拍另类欧美| 日韩精品资源二区在线| 国内外成人在线| 亚洲国产精品成人久久综合一区| 国产91精品免费| 一区二区三区中文字幕在线观看| 欧美性videosxxxxx| 亚洲国产精品久久人人爱| 欧美电影影音先锋| 美女视频黄免费的久久 | 成人教育av在线| ...av二区三区久久精品| 91色在线porny| 亚洲国产精品天堂| 日韩欧美中文字幕制服| 国产成人综合在线| 亚洲免费视频中文字幕| 欧美精品777| 国产一区二区按摩在线观看| 国产精品女人毛片| 欧美三级一区二区| 蜜臀av性久久久久蜜臀av麻豆| 精品美女一区二区三区| 成人av动漫网站| 日韩av电影免费观看高清完整版在线观看| 欧美一二三在线| 成人av影视在线观看| 亚洲丶国产丶欧美一区二区三区| 日韩午夜中文字幕| 99精品黄色片免费大全| 日韩av一级片| 国产精品久久久久久久久动漫| 日本精品免费观看高清观看| 久久精品久久精品| 亚洲日本在线视频观看| 日韩久久久精品| 欧美无砖专区一中文字| 国产精品18久久久久久久久久久久 | 亚洲一二三四在线| 久久久久国产精品人| 欧美日本一区二区| www..com久久爱| 蜜臀a∨国产成人精品| 亚洲天堂成人网| 久久久久久电影| 日韩午夜精品视频| 欧美视频在线一区二区三区| 精品无人码麻豆乱码1区2区| 亚洲午夜av在线| 亚洲另类中文字| 中文字幕在线不卡国产视频| 26uuu国产一区二区三区| 欧美视频一区二区| 97精品国产露脸对白| 岛国精品一区二区| 国产99精品视频| 国产在线精品视频| 久久69国产一区二区蜜臀| 日本91福利区| 日韩电影免费在线看| 亚洲成人av免费| 亚洲主播在线播放| 亚洲精品菠萝久久久久久久| 中文字幕一区二| 成人欧美一区二区三区在线播放| 国产亚洲精品中文字幕| 久久综合色8888| 欧美精品一区二区三区蜜臀| 538在线一区二区精品国产| 欧美性xxxxxxxx| 7777精品伊人久久久大香线蕉完整版| 91视频观看免费| 91高清视频在线| 欧美日韩国产免费一区二区 | 日韩中文字幕91| 亚洲高清免费在线| 日韩在线观看一区二区| 日韩在线播放一区二区| 日韩电影在线一区二区三区| 日韩国产一二三区| 麻豆精品在线看| 国产另类ts人妖一区二区| 国产激情视频一区二区在线观看| 韩日av一区二区| 成人性生交大片免费看中文| 99久久婷婷国产综合精品| 色哟哟一区二区三区| 欧美人妖巨大在线| 精品日韩欧美在线| 国产精品毛片无遮挡高清| 一区二区三区在线观看视频| 亚洲国产精品精华液网站| 麻豆专区一区二区三区四区五区| 美国十次综合导航| 成人免费毛片aaaaa**| 在线日韩国产精品| 欧美v国产在线一区二区三区| 久久综合九色综合97_久久久| 日本一区二区三区国色天香 | 99久久综合狠狠综合久久| 色婷婷久久99综合精品jk白丝| 欧美色图激情小说| 久久婷婷成人综合色| 亚洲蜜臀av乱码久久精品蜜桃| 亚洲成人中文在线| 国产99一区视频免费| 欧洲精品视频在线观看| 337p日本欧洲亚洲大胆精品| 亚洲欧美另类久久久精品2019| 蜜桃视频一区二区三区在线观看| 国产酒店精品激情| 欧美日韩国产精品自在自线| 国产偷国产偷亚洲高清人白洁| 亚洲国产成人tv| 99国产精品久久久久久久久久 | 国产一区二区免费在线|