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

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

?? readerstatistics.cs

?? 圖書館信息管理系統 Library Information Management System
?? CS
字號:
using System;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using Microsoft.Office.Interop.Excel;

namespace Library
{
	/// <summary>
	/// ReaderStatistics 的摘要說明。
	/// </summary>
	public class ReaderStatistics : System.Windows.Forms.Form
	{
		private System.Windows.Forms.ListView listView1;
		private System.Windows.Forms.Label label1;
		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;
		private System.Windows.Forms.GroupBox groupBox2;
		private System.Windows.Forms.Button button1;
		private System.Windows.Forms.Button btnClose;
		private System.Windows.Forms.Button button3;
		/// <summary>
		/// 必需的設計器變量。
		/// </summary>
		private System.ComponentModel.Container components = null;

		/// <summary>
		/// 臨時數據表
		/// </summary>
		private static System.Data.DataTable tableTemp = null;
		/// <summary>
		/// 重置標志
		/// </summary>
		private bool reset = false;

		public ReaderStatistics()
		{
			//
			// Windows 窗體設計器支持所必需的
			//
			InitializeComponent();
			//
			//初始化
			//
			initializeScreen();
		}
		/// <summary>
		/// 清理所有正在使用的資源。
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}
		/// <summary>
		/// 定義方法GetData(),返回一個數據表
		/// </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(),返回一個數據表
		/// </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_讀者借閱排名");
			comboBox1.Items.Clear();
			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);
				}
			}
			//同樣方法處理數據
			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);
			}
		}

		#region Windows 窗體設計器生成的代碼
		/// <summary>
		/// 設計器支持所需的方法 - 不要使用代碼編輯器修改
		/// 此方法的內容。
		/// </summary>
		private void InitializeComponent()
		{
			this.listView1 = new System.Windows.Forms.ListView();
			this.label1 = new System.Windows.Forms.Label();
			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 = 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.SuspendLayout();
			this.groupBox2.SuspendLayout();
			this.SuspendLayout();
			// 
			// listView1
			// 
			this.listView1.FullRowSelect = true;
			this.listView1.GridLines = true;
			this.listView1.Location = new System.Drawing.Point(27, 56);
			this.listView1.MultiSelect = false;
			this.listView1.Name = "listView1";
			this.listView1.Size = new System.Drawing.Size(736, 309);
			this.listView1.TabIndex = 6;
			this.listView1.View = System.Windows.Forms.View.Details;
			// 
			// 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 = 5;
			this.label1.Text = "讀 者 借 閱 排 名";
			this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			// 
			// 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 = 10;
			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 = "查詢依據:";
			// 
			// 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 = "";
			// 
			// 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 = 12;
			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 = "關閉";
			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 = "導出Excel";
			this.button3.Click += new System.EventHandler(this.button3_Click);
			// 
			// ReaderStatistics
			// 
			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.MaximumSize = new System.Drawing.Size(790, 503);
			this.MinimumSize = new System.Drawing.Size(790, 503);
			this.Name = "ReaderStatistics";
			this.ShowInTaskbar = false;
			this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
			this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
			this.Text = "讀者借閱排名";
			this.groupBox3.ResumeLayout(false);
			this.groupBox2.ResumeLayout(false);
			this.ResumeLayout(false);

		}
		#endregion
		/// <summary>
		/// 關閉
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void btnClose_Click(object sender, System.EventArgs e)
		{
			Global.ReaderStatistics = false;
			Global.sbpGlobal.Text = "就緒";
			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>
		/// 數據導出
		/// </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;    
			}
			//同樣方法處理數據
			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("成功導出記錄!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information);
			//不可見,即后臺處理
			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);
					//同樣方法處理數據
					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);
					//同樣方法處理數據
					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("查詢依據不清楚!請重新設定!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information);
				comboBox1.Focus();
			}
		}
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久综合九色欧美综合狠狠| 亚洲国产成人高清精品| 亚洲美腿欧美偷拍| 天堂在线亚洲视频| 国产成人aaa| 日韩欧美国产一二三区| 日韩美女啊v在线免费观看| 亚洲第一二三四区| 91在线观看地址| 久久女同精品一区二区| 天堂资源在线中文精品| gogo大胆日本视频一区| 欧美v亚洲v综合ⅴ国产v| 亚洲精品国产成人久久av盗摄| 激情综合网天天干| 欧美精品 国产精品| 亚洲视频一二区| 国产精品亚洲视频| 欧美一区二区视频在线观看| 亚洲美女免费在线| 北条麻妃一区二区三区| 精品电影一区二区| 日韩福利电影在线| 欧洲国内综合视频| 亚洲欧美激情在线| 91免费版在线看| 国产精品进线69影院| 国产成人啪免费观看软件| 91精品国产麻豆| 午夜精品久久久久久久99水蜜桃| 91麻豆精品一区二区三区| 国产精品毛片久久久久久久| 国产99久久久精品| 国产欧美一区在线| 成人听书哪个软件好| 日本一区二区三级电影在线观看 | 奇米影视一区二区三区| 欧美色图第一页| 亚洲国产欧美在线人成| 在线免费观看一区| 午夜精品久久久久影视| 欧美日韩精品免费观看视频| 天天操天天综合网| 日韩一级视频免费观看在线| 美女视频一区二区三区| 日韩精品中文字幕一区二区三区| 久久精品国产亚洲aⅴ| 精品久久久久久久久久久久包黑料 | 一本大道久久a久久精品综合| 国产精品久久久久影院老司| 91麻豆视频网站| 亚洲国产日韩在线一区模特| 欧美三级欧美一级| 免费高清在线一区| 久久久久久久久免费| 成人免费观看视频| 一区二区日韩av| 欧美一区二区日韩| 国产成人午夜精品影院观看视频 | 在线不卡中文字幕| 久久电影网站中文字幕| 国产亚洲欧洲997久久综合 | 成人精品在线视频观看| 亚洲男人电影天堂| 91麻豆精品国产91久久久使用方法 | 欧美日韩在线播放三区四区| 热久久国产精品| 国产欧美精品一区二区色综合朱莉 | 日韩欧美中文字幕制服| 成人免费看黄yyy456| 亚洲午夜激情网页| 久久婷婷成人综合色| 91丝袜美女网| 精品一区二区在线看| 国产精品蜜臀在线观看| 欧美乱妇15p| 国产xxx精品视频大全| 亚洲免费观看高清完整版在线观看 | 免费欧美在线视频| 国产精品国产三级国产三级人妇 | 欧美草草影院在线视频| 97国产精品videossex| 美日韩黄色大片| 亚洲欧美色一区| 欧美不卡一二三| 在线一区二区视频| 国产成人精品网址| 日本v片在线高清不卡在线观看| 国产精品色噜噜| 91精品视频网| 色视频一区二区| 国产精品一区二区久久精品爱涩| 亚洲永久精品国产| 国产精品午夜久久| 精品久久国产老人久久综合| 欧美精品丝袜中出| 色88888久久久久久影院按摩| 久久99精品久久久久久国产越南| 亚洲一区二区在线播放相泽| 国产精品久久久久永久免费观看 | 久久成人免费网站| 亚洲一级二级在线| 一区二区在线观看免费视频播放| 国产视频视频一区| 精品国产在天天线2019| 欧美一区二区三区在线观看 | 美日韩一区二区| 亚洲成a人片在线不卡一二三区| 国产精品你懂的| 国产精品美女一区二区三区| 色综合婷婷久久| 色综合视频在线观看| 99久久精品国产毛片| 成人自拍视频在线| 国产成人综合在线播放| 激情图区综合网| 久久 天天综合| 紧缚捆绑精品一区二区| 精品一区中文字幕| 久久国产乱子精品免费女| 麻豆成人综合网| 久久99国产精品久久| 久久se精品一区精品二区| 久久成人麻豆午夜电影| 久久丁香综合五月国产三级网站| 久久97超碰国产精品超碰| 国产一区二区伦理| 国产成人一级电影| 成人av免费网站| 91网站在线播放| 欧美四级电影在线观看| 欧美日韩视频在线一区二区| 欧美一区二区三区影视| 欧美刺激脚交jootjob| 精品第一国产综合精品aⅴ| 国产亚洲自拍一区| 国产精品电影一区二区| 一区二区在线观看av| 视频一区二区欧美| 久久精品国产亚洲高清剧情介绍| 精品亚洲成a人| a在线欧美一区| 色综合天天综合给合国产| 在线观看视频一区二区欧美日韩| 欧美日本在线视频| 日韩你懂的电影在线观看| 国产日韩精品一区二区三区在线| 亚洲欧洲综合另类在线| 日韩国产欧美三级| 成人激情av网| 欧美日韩精品一区二区三区四区| 欧美成人a∨高清免费观看| 国产精品国产三级国产a| 亚洲成av人片观看| 国产高清在线观看免费不卡| 日本韩国欧美一区| 日韩欧美一区二区视频| 中文字幕在线免费不卡| 另类小说色综合网站| 成人短视频下载| 91.com视频| 亚洲国产精品av| 男男成人高潮片免费网站| 成人app网站| 日韩美女视频在线| 亚洲色图一区二区| 韩国一区二区三区| 欧美特级限制片免费在线观看| 久久久久久电影| 水蜜桃久久夜色精品一区的特点| 国产宾馆实践打屁股91| 国产欧美日产一区| 日av在线不卡| 欧美中文字幕一区二区三区亚洲| 国产亚洲视频系列| 美腿丝袜亚洲综合| 欧美日韩国产综合久久| 国产精品网曝门| 国产在线播放一区三区四| 欧美精品在线视频| 亚洲综合在线第一页| 国产99久久久国产精品潘金| 亚洲精品免费视频| 东方欧美亚洲色图在线| 欧美日韩一区中文字幕| 亚洲嫩草精品久久| 成人网在线播放| 久久久久久久电影| 久久成人久久鬼色| 91精品在线麻豆| 无码av中文一区二区三区桃花岛| 99精品1区2区| 国产精品久久久久久久久免费相片 | 欧美日韩亚洲不卡| 亚洲一区二区三区爽爽爽爽爽 | 中文字幕亚洲成人| 国产成人免费视频精品含羞草妖精| 日韩一级高清毛片| 日韩精品一级二级| 欧美精品在线视频|