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

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

?? readertype.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;

namespace Library
{
	/// <summary>
	/// ReaderType 的摘要說明。
	/// </summary>
	public class ReaderType : System.Windows.Forms.Form
	{
		private System.Windows.Forms.GroupBox groupBox1;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.Label label3;
		private System.Windows.Forms.Label label4;
		private System.Windows.Forms.TextBox textBox1;
		private System.Windows.Forms.TextBox textBox2;
		private System.Windows.Forms.TextBox textBox3;
		private System.Windows.Forms.TextBox textBox4;
		private System.Windows.Forms.ListView listView1;
		private System.Windows.Forms.Button button1;
		private System.Windows.Forms.Button button2;
		private System.Windows.Forms.Button button3;
		private System.Windows.Forms.Button button4;
		/// <summary>
		/// 必需的設計器變量。
		/// </summary>
		private System.ComponentModel.Container components = null;

		private SqlCommand cmd ;
		private SqlDataReader dr;
		private bool isUpdate = false;

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

			listView1.Columns.Add("類型編號",70,HorizontalAlignment.Left);
			listView1.Columns.Add("類型名稱",70,HorizontalAlignment.Left);
			listView1.Columns.Add("借閱天數",70,HorizontalAlignment.Left);
			listView1.Columns.Add("借閱量",60,HorizontalAlignment.Left);
			listView1.Columns.Add("超期罰款額(元/天)",130,HorizontalAlignment.Left);
		}

		/// <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.groupBox1 = new System.Windows.Forms.GroupBox();
			this.textBox4 = new System.Windows.Forms.TextBox();
			this.textBox3 = new System.Windows.Forms.TextBox();
			this.textBox2 = new System.Windows.Forms.TextBox();
			this.textBox1 = new System.Windows.Forms.TextBox();
			this.label4 = new System.Windows.Forms.Label();
			this.label3 = new System.Windows.Forms.Label();
			this.label2 = new System.Windows.Forms.Label();
			this.label1 = new System.Windows.Forms.Label();
			this.listView1 = new System.Windows.Forms.ListView();
			this.button1 = new System.Windows.Forms.Button();
			this.button2 = new System.Windows.Forms.Button();
			this.button3 = new System.Windows.Forms.Button();
			this.button4 = new System.Windows.Forms.Button();
			this.groupBox1.SuspendLayout();
			this.SuspendLayout();
			// 
			// groupBox1
			// 
			this.groupBox1.Controls.Add(this.textBox4);
			this.groupBox1.Controls.Add(this.textBox3);
			this.groupBox1.Controls.Add(this.textBox2);
			this.groupBox1.Controls.Add(this.textBox1);
			this.groupBox1.Controls.Add(this.label4);
			this.groupBox1.Controls.Add(this.label3);
			this.groupBox1.Controls.Add(this.label2);
			this.groupBox1.Controls.Add(this.label1);
			this.groupBox1.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this.groupBox1.Location = new System.Drawing.Point(8, 8);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(424, 100);
			this.groupBox1.TabIndex = 0;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "基本設置";
			// 
			// textBox4
			// 
			this.textBox4.Location = new System.Drawing.Point(283, 62);
			this.textBox4.Name = "textBox4";
			this.textBox4.Size = new System.Drawing.Size(112, 21);
			this.textBox4.TabIndex = 3;
			this.textBox4.Text = "";
			// 
			// textBox3
			// 
			this.textBox3.Location = new System.Drawing.Point(93, 62);
			this.textBox3.Name = "textBox3";
			this.textBox3.Size = new System.Drawing.Size(118, 21);
			this.textBox3.TabIndex = 2;
			this.textBox3.Text = "";
			// 
			// textBox2
			// 
			this.textBox2.Location = new System.Drawing.Point(283, 22);
			this.textBox2.Name = "textBox2";
			this.textBox2.Size = new System.Drawing.Size(112, 21);
			this.textBox2.TabIndex = 1;
			this.textBox2.Text = "";
			// 
			// textBox1
			// 
			this.textBox1.Location = new System.Drawing.Point(93, 22);
			this.textBox1.Name = "textBox1";
			this.textBox1.Size = new System.Drawing.Size(118, 21);
			this.textBox1.TabIndex = 0;
			this.textBox1.Text = "";
			// 
			// label4
			// 
			this.label4.AutoSize = true;
			this.label4.Location = new System.Drawing.Point(219, 64);
			this.label4.Name = "label4";
			this.label4.Size = new System.Drawing.Size(54, 17);
			this.label4.TabIndex = 3;
			this.label4.Text = "超期罰款";
			// 
			// label3
			// 
			this.label3.AutoSize = true;
			this.label3.Location = new System.Drawing.Point(29, 64);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(42, 17);
			this.label3.TabIndex = 2;
			this.label3.Text = "借閱量";
			// 
			// label2
			// 
			this.label2.AutoSize = true;
			this.label2.Location = new System.Drawing.Point(219, 24);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(54, 17);
			this.label2.TabIndex = 1;
			this.label2.Text = "借閱天數";
			// 
			// label1
			// 
			this.label1.AutoSize = true;
			this.label1.Location = new System.Drawing.Point(29, 24);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(54, 17);
			this.label1.TabIndex = 0;
			this.label1.Text = "類型名稱";
			// 
			// listView1
			// 
			this.listView1.FullRowSelect = true;
			this.listView1.GridLines = true;
			this.listView1.Location = new System.Drawing.Point(8, 112);
			this.listView1.Name = "listView1";
			this.listView1.Size = new System.Drawing.Size(424, 224);
			this.listView1.TabIndex = 1;
			this.listView1.View = System.Windows.Forms.View.Details;
			this.listView1.Click += new System.EventHandler(this.listView1_Click);
			// 
			// button1
			// 
			this.button1.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this.button1.Location = new System.Drawing.Point(160, 352);
			this.button1.Name = "button1";
			this.button1.Size = new System.Drawing.Size(56, 23);
			this.button1.TabIndex = 2;
			this.button1.Text = "新增";
			this.button1.Click += new System.EventHandler(this.button1_Click);
			// 
			// button2
			// 
			this.button2.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this.button2.Location = new System.Drawing.Point(226, 352);
			this.button2.Name = "button2";
			this.button2.Size = new System.Drawing.Size(56, 23);
			this.button2.TabIndex = 3;
			this.button2.Text = "更改";
			this.button2.Click += new System.EventHandler(this.button2_Click);
			// 
			// button3
			// 
			this.button3.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this.button3.Location = new System.Drawing.Point(366, 352);
			this.button3.Name = "button3";
			this.button3.Size = new System.Drawing.Size(56, 23);
			this.button3.TabIndex = 4;
			this.button3.Text = "關閉";
			this.button3.Click += new System.EventHandler(this.button3_Click);
			// 
			// button4
			// 
			this.button4.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this.button4.Location = new System.Drawing.Point(292, 352);
			this.button4.Name = "button4";
			this.button4.Size = new System.Drawing.Size(64, 23);
			this.button4.TabIndex = 5;
			this.button4.Text = "保存";
			this.button4.Click += new System.EventHandler(this.button4_Click);
			// 
			// ReaderType
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(442, 392);
			this.ControlBox = false;
			this.Controls.Add(this.button4);
			this.Controls.Add(this.button3);
			this.Controls.Add(this.button2);
			this.Controls.Add(this.button1);
			this.Controls.Add(this.listView1);
			this.Controls.Add(this.groupBox1);
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
			this.MaximizeBox = false;
			this.Name = "ReaderType";
			this.ShowInTaskbar = false;
			this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
			this.Text = "讀者類型";
			this.Load += new System.EventHandler(this.ReaderType_Load);
			this.groupBox1.ResumeLayout(false);
			this.ResumeLayout(false);

		}
		#endregion
		/// <summary>
		/// 初始化界面
		/// </summary>
		private void initializeScreen()
		{
			textBox1.Text = "";
			textBox1.ReadOnly = true;
			textBox2.Text = "";
			textBox2.ReadOnly = true;
			textBox3.Text = "";
			textBox3.ReadOnly = true;
			textBox4.Text = "";
			textBox4.ReadOnly = true;
			button2.Enabled = false;
			button4.Enabled = false;
			listView1.Items.Clear();
			ListViewItem item = null;
			string str = "select * from 讀者類型";
			cmd.CommandText = str;
			try
			{
				dr = cmd.ExecuteReader();
				while(dr.Read())
				{
					item = new ListViewItem(dr.GetInt32(0).ToString());
					item.SubItems.Add(dr.GetString(1));
					item.SubItems.Add(dr.GetInt32(2).ToString());
					item.SubItems.Add(dr.GetInt32(3).ToString());
					item.SubItems.Add(dr.GetValue(4).ToString());
					listView1.Items.Add(item);
				}
				dr.Close();
			}
			catch(Exception ex)
			{
				if(dr != null) dr.Close();
				MessageBox.Show(ex.ToString());
			}
		}
		/// <summary>
		/// 窗體加載代碼
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void ReaderType_Load(object sender, System.EventArgs e)
		{
			cmd = Global.conn.CreateCommand();
			initializeScreen();
		}
		/// <summary>
		/// 關閉按鈕
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void button3_Click(object sender, System.EventArgs e)
		{
			this.Close();
		}
		/// <summary>
		/// 新增
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void button1_Click(object sender, System.EventArgs e)
		{
			isUpdate = false;
			textBox1.Text = "";
			textBox2.Text = "";
			textBox3.Text = "";
			textBox4.Text = "";
			textBox1.ReadOnly = false;
			textBox2.ReadOnly = false;
			textBox3.ReadOnly = false;
			textBox4.ReadOnly = false;
			button1.Enabled = false;
			button2.Enabled = false;
			button4.Enabled = true;
			textBox1.Focus();
		}
		/// <summary>
		/// 更改
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void button2_Click(object sender, System.EventArgs e)
		{
			isUpdate = true;
			textBox1.ReadOnly = false;
			textBox2.ReadOnly = false;
			textBox3.ReadOnly = false;
			textBox4.ReadOnly = false;
			button1.Enabled = false;
			button4.Enabled = true;
		}
		/// <summary>
		/// ListView項目單擊事件
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void listView1_Click(object sender, System.EventArgs e)
		{
			if(listView1.SelectedItems[0].SubItems[0].Text!="")
			{
				textBox1.ReadOnly = true;
				textBox2.ReadOnly = true;
				textBox3.ReadOnly = true;
				textBox4.ReadOnly = true;
				button1.Enabled = true;
				button2.Enabled = true;
				button4.Enabled = false;
				textBox1.Text = listView1.SelectedItems[0].SubItems[1].Text;
				textBox2.Text = listView1.SelectedItems[0].SubItems[2].Text;
				textBox3.Text = listView1.SelectedItems[0].SubItems[3].Text;
				textBox4.Text = listView1.SelectedItems[0].SubItems[4].Text;
			}
			else
			{
				button2.Enabled = false;
			}
		}
		/// <summary>
		/// 保存記錄
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void button4_Click(object sender, System.EventArgs e)
		{
			string str = "select * from 讀者類型 where 類型名稱='" + textBox1.Text  + "'";
			cmd.CommandText = str;
			try
			{
				dr = cmd.ExecuteReader();
				dr.Read();
				if(dr.HasRows)
				{
					if(dr!=null)dr.Close();
					MessageBox.Show("類型已經存在!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information);
				}
				if(dr!=null)dr.Close();
			}
			catch(Exception ex)
			{
				if(dr!=null)dr.Close();
				MessageBox.Show("發生如下錯誤:\n\t" + ex.ToString(),"錯誤",MessageBoxButtons.OK,MessageBoxIcon.Error);
				return;
			}
			if(isUpdate)
			{
				str = "update 讀者類型 set 類型名稱='" + textBox1.Text + "',借閱天數=" + Convert.ToInt32(textBox2.Text) + "," +
					"借閱量=" + Convert.ToInt32(textBox3.Text) + ",超期罰款額=" + Convert.ToDecimal(textBox4.Text) + " where 類型名稱='" + textBox1.Text + "'";
			}
			else
			{
				str = "insert into 讀者類型 values('" + textBox1.Text + "'," + Convert.ToInt32(textBox2.Text) + "," + Convert.ToInt32(textBox3.Text) + "," + Convert.ToDecimal(textBox4.Text) + ")";
			}
			cmd.CommandText = str;
			try
			{
				cmd.ExecuteNonQuery();
				MessageBox.Show("操作成功!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information);
				initializeScreen();
			}
			catch(Exception ex)
			{
				MessageBox.Show("發生如下錯誤:\n\t" + ex.ToString(),"錯誤",MessageBoxButtons.OK,MessageBoxIcon.Error);
			}
		}
		/// <summary>
		/// 刪除記錄
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void button5_Click(object sender, System.EventArgs e)
		{
			if(listView1.SelectedItems[0].SubItems[0].Text!="")
			{
				if(MessageBox.Show("此操作會造成所有與之相關的記錄被刪除!是否繼續?","詢問",MessageBoxButtons.YesNo,MessageBoxIcon.Question)==DialogResult.Yes)
				{
					string str = "delete * from 讀者類型 where 類型名稱='" + textBox1.Text + "'";
				}
			}
		}
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
免费不卡在线视频| 91亚洲精品一区二区乱码| 顶级嫩模精品视频在线看| 色婷婷av久久久久久久| 欧美一区二区免费观在线| 国产精品每日更新| 图片区小说区区亚洲影院| 成人丝袜18视频在线观看| 欧美女孩性生活视频| 中文字幕中文字幕一区| 久久99国产精品久久99果冻传媒| 91视视频在线观看入口直接观看www | 亚洲尤物在线视频观看| 精品一区二区在线看| 精品视频色一区| 国产亚洲精品久| 偷窥少妇高潮呻吟av久久免费| 一本色道**综合亚洲精品蜜桃冫 | 欧美一区二区三区免费在线看| 国产精品天美传媒沈樵| 韩国欧美国产一区| 欧美一区二区三区人| 日韩电影在线一区二区| 色综合天天综合色综合av| 久久久精品黄色| 美女www一区二区| 欧美三级电影一区| 亚洲综合清纯丝袜自拍| 91免费看片在线观看| 久久精品亚洲国产奇米99| 久久精品久久综合| 日韩欧美国产综合在线一区二区三区| 亚洲精选在线视频| 波多野结衣中文字幕一区| 国产视频在线观看一区二区三区| 精品一区二区三区在线视频| 精品日韩欧美一区二区| 青青草成人在线观看| 日韩一区二区在线播放| 免费高清不卡av| 欧美一区二区三区成人| 男女男精品视频网| www激情久久| 六月丁香婷婷久久| 日韩视频在线你懂得| 日韩av一区二| www国产精品av| 狠狠色丁香久久婷婷综合丁香| 亚洲精品一区二区三区精华液| 蜜桃av噜噜一区二区三区小说| 日韩免费高清av| 国产精品亚洲一区二区三区在线| 久久久精品2019中文字幕之3| 成人精品一区二区三区中文字幕| 国产精品卡一卡二| 99精品视频一区二区三区| 亚洲综合一二区| 欧美日韩久久不卡| 男女视频一区二区| 久久综合给合久久狠狠狠97色69| 东方aⅴ免费观看久久av| 亚洲免费三区一区二区| 欧美亚洲国产一区二区三区 | 欧美成人乱码一区二区三区| 国产一区二区成人久久免费影院| 久久久久国产精品麻豆| 91视频精品在这里| 免费成人性网站| 国产色综合一区| 欧美性色综合网| 久久超碰97人人做人人爱| 国产欧美日韩一区二区三区在线观看| 99免费精品在线| 免费精品99久久国产综合精品| 久久一区二区三区国产精品| 国产xxx精品视频大全| 亚洲国产一区二区在线播放| 久久久天堂av| 欧美性猛交xxxxxx富婆| 国产精品一品二品| 亚洲地区一二三色| 欧美激情艳妇裸体舞| 欧美日韩美女一区二区| 国产精品小仙女| 一区二区成人在线视频| 精品乱人伦小说| 91麻豆国产福利精品| 秋霞电影网一区二区| 一区二区成人在线视频| 国产网站一区二区| 91精品综合久久久久久| 97国产精品videossex| 国产一区二区三区香蕉| 免费观看91视频大全| 亚洲自拍都市欧美小说| 日韩伦理av电影| 久久久久久99精品| 日韩一区二区三区在线视频| 色噜噜狠狠成人网p站| 国产精品自在欧美一区| 亚洲国产va精品久久久不卡综合 | 国产日韩精品一区二区三区在线| 欧美亚洲综合色| 成人激情午夜影院| 国产电影一区二区三区| 日本不卡免费在线视频| 亚洲综合成人在线视频| 夜夜精品视频一区二区| 中文字幕不卡三区| 久久久美女毛片| 91精品国产91久久久久久最新毛片| 色婷婷精品久久二区二区蜜臀av | 一区二区三区欧美视频| 国产精品久久久一区麻豆最新章节| 日韩欧美成人一区| 在线观看免费亚洲| 色综合中文字幕国产 | 91色porny| 99视频超级精品| 波多野结衣中文一区| 国产成人啪免费观看软件 | 国产乱理伦片在线观看夜一区| 首页欧美精品中文字幕| 亚洲成人综合在线| 视频一区在线播放| 久久91精品久久久久久秒播| 91在线云播放| 93久久精品日日躁夜夜躁欧美| 99久久精品99国产精品| 91老师国产黑色丝袜在线| 色婷婷香蕉在线一区二区| 色婷婷综合久久久中文一区二区 | 日本久久一区二区三区| 色女孩综合影院| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 日韩高清电影一区| 精品一区二区三区在线播放| 韩国欧美国产1区| 成人av在线看| 色综合天天综合网国产成人综合天 | 中文字幕中文字幕一区二区| 亚洲精品免费在线观看| 香蕉久久夜色精品国产使用方法 | 日韩免费成人网| 综合av第一页| 亚洲一卡二卡三卡四卡无卡久久| 午夜日韩在线电影| 国产在线不卡视频| eeuss国产一区二区三区| 欧美视频在线不卡| 欧美精品一区二区在线观看| 国产精品成人午夜| 强制捆绑调教一区二区| 国产成人在线色| 色综合久久六月婷婷中文字幕| 欧美日韩亚洲另类| 26uuu成人网一区二区三区| 综合色中文字幕| 天天综合色天天综合| 成a人片国产精品| 91精品国产麻豆国产自产在线| 国产蜜臀av在线一区二区三区| 亚洲午夜久久久久中文字幕久| 国产精品一卡二卡在线观看| 欧美亚洲动漫制服丝袜| 久久久欧美精品sm网站| 午夜不卡在线视频| av男人天堂一区| 日韩精品一区二区三区视频播放 | 99久久久精品| 精品欧美久久久| 亚洲成av人片www| 99久久国产综合色|国产精品| 精品少妇一区二区三区日产乱码 | 99视频精品在线| 久久久久国产精品厨房| 卡一卡二国产精品 | 日产国产欧美视频一区精品| 成人精品国产免费网站| 国产亚洲一区二区三区四区| 日韩精品亚洲专区| 日本乱码高清不卡字幕| 国产精品久久久久久久久免费丝袜 | 欧美大片在线观看一区二区| 亚洲日本va午夜在线影院| 国产在线一区观看| 欧美精品丝袜中出| 亚洲精品免费在线观看| 成a人片国产精品| 日本一区二区三区免费乱视频| 蜜臀av性久久久久蜜臀aⅴ | 国产.欧美.日韩| 久久久91精品国产一区二区三区| 肉色丝袜一区二区| 欧美日韩国产在线观看| 亚洲在线视频一区| 欧美三区免费完整视频在线观看| 亚洲综合色自拍一区| 欧美日韩一二区| 五月激情综合色|