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

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

?? presssetting.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>
	/// PressSetting 的摘要說明。
	/// </summary>
	public class PressSetting : 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.TextBox textBox1;
		private System.Windows.Forms.TextBox textBox2;
		private System.Windows.Forms.ListView listView1;
		private System.Windows.Forms.Button button1;
		private System.Windows.Forms.Button button2;
		private System.Windows.Forms.Button button4;
		private System.Windows.Forms.ToolTip toolTip1;
		private System.Windows.Forms.Button button3;
		private System.Windows.Forms.Button button5;
		private System.ComponentModel.IContainer components;

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

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

			//ListView
			listView1.Columns.Add("編號",60,HorizontalAlignment.Left);
			listView1.Columns.Add("ISBN",120,HorizontalAlignment.Left);
			listView1.Columns.Add("出版社名稱",120,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.components = new System.ComponentModel.Container();
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.textBox2 = new System.Windows.Forms.TextBox();
			this.textBox1 = new System.Windows.Forms.TextBox();
			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.button4 = new System.Windows.Forms.Button();
			this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
			this.button3 = new System.Windows.Forms.Button();
			this.button5 = new System.Windows.Forms.Button();
			this.groupBox1.SuspendLayout();
			this.SuspendLayout();
			// 
			// groupBox1
			// 
			this.groupBox1.Controls.Add(this.textBox2);
			this.groupBox1.Controls.Add(this.textBox1);
			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(336, 100);
			this.groupBox1.TabIndex = 0;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "基本設置";
			// 
			// textBox2
			// 
			this.textBox2.Location = new System.Drawing.Point(97, 60);
			this.textBox2.Name = "textBox2";
			this.textBox2.Size = new System.Drawing.Size(184, 21);
			this.textBox2.TabIndex = 1;
			this.textBox2.Text = "";
			// 
			// textBox1
			// 
			this.textBox1.Location = new System.Drawing.Point(97, 20);
			this.textBox1.Name = "textBox1";
			this.textBox1.Size = new System.Drawing.Size(184, 21);
			this.textBox1.TabIndex = 0;
			this.textBox1.Text = "";
			// 
			// label2
			// 
			this.label2.AutoSize = true;
			this.label2.Location = new System.Drawing.Point(23, 62);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(66, 17);
			this.label2.TabIndex = 1;
			this.label2.Text = "出版社名稱";
			// 
			// label1
			// 
			this.label1.AutoSize = true;
			this.label1.Location = new System.Drawing.Point(23, 22);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(29, 17);
			this.label1.TabIndex = 0;
			this.label1.Text = "ISBN";
			// 
			// listView1
			// 
			this.listView1.FullRowSelect = true;
			this.listView1.GridLines = true;
			this.listView1.Location = new System.Drawing.Point(8, 120);
			this.listView1.MultiSelect = false;
			this.listView1.Name = "listView1";
			this.listView1.Size = new System.Drawing.Size(336, 208);
			this.listView1.TabIndex = 1;
			this.toolTip1.SetToolTip(this.listView1, "單擊項目顯示詳細信息,并且可以修改!");
			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(40, 344);
			this.button1.Name = "button1";
			this.button1.Size = new System.Drawing.Size(48, 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(101, 344);
			this.button2.Name = "button2";
			this.button2.Size = new System.Drawing.Size(48, 23);
			this.button2.TabIndex = 3;
			this.button2.Text = "更改";
			this.button2.Click += new System.EventHandler(this.button2_Click);
			// 
			// button4
			// 
			this.button4.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this.button4.Location = new System.Drawing.Point(284, 344);
			this.button4.Name = "button4";
			this.button4.Size = new System.Drawing.Size(48, 23);
			this.button4.TabIndex = 5;
			this.button4.Text = "關閉";
			this.button4.Click += new System.EventHandler(this.button4_Click);
			// 
			// button3
			// 
			this.button3.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this.button3.Location = new System.Drawing.Point(162, 344);
			this.button3.Name = "button3";
			this.button3.Size = new System.Drawing.Size(48, 23);
			this.button3.TabIndex = 4;
			this.button3.Text = "保存";
			this.button3.Click += new System.EventHandler(this.button3_Click);
			// 
			// button5
			// 
			this.button5.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this.button5.Location = new System.Drawing.Point(223, 344);
			this.button5.Name = "button5";
			this.button5.Size = new System.Drawing.Size(48, 23);
			this.button5.TabIndex = 6;
			this.button5.Text = "刪除";
			this.button5.Click += new System.EventHandler(this.button5_Click);
			// 
			// PressSetting
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(352, 376);
			this.ControlBox = false;
			this.Controls.Add(this.button5);
			this.Controls.Add(this.button3);
			this.Controls.Add(this.button4);
			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.Name = "PressSetting";
			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.PressSetting_Load);
			this.groupBox1.ResumeLayout(false);
			this.ResumeLayout(false);

		}
		#endregion
		/// <summary>
		/// 初始化界面
		/// </summary>
		private void initializeScreen()
		{
			textBox1.ReadOnly = true;
			textBox2.ReadOnly = true;
			textBox1.Text = "";
			textBox2.Text = "";
			button1.Enabled = true;
			button2.Enabled = false;
			button3.Enabled = false;
			button5.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.GetString(2));
					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 PressSetting_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)
		{
			string str = "";
			if(textBox1.Text != "" && textBox2.Text != "")
			{
				if(isUpdate)
				{
					str = "select * from 出版社 where ISBN='" + textBox1.Text + "'";
					cmd.CommandText =str;
					try
					{
						dr = cmd.ExecuteReader();
						dr.Read();
						if(dr.HasRows)
						{
							if(dr!=null)dr.Close();
							MessageBox.Show("已經存在此出版社了!");
							return;
						}
						if(dr!=null)dr.Close();
					}
					catch(Exception ex)
					{
						if(dr!=null)dr.Close();
						MessageBox.Show(ex.ToString());
						return;
					}
					str = "update 出版社 set ISBN='" + textBox1.Text + "',出版社名稱='" + textBox2.Text + "' where ISBN='" + listView1.SelectedItems[0].SubItems[1].Text + "'";
					cmd.CommandText = str;
					try
					{
						cmd.ExecuteNonQuery();
						MessageBox.Show("更新成功!");
						initializeScreen();
					}
					catch(Exception ex)
					{
						MessageBox.Show(ex.ToString());
						return;
					}
				}
				else
				{
					str = "select * from 出版社 where ISBN='" + textBox1.Text + "'";
					cmd.CommandText =str;
					try
					{
						dr = cmd.ExecuteReader();
						dr.Read();
						if(dr.HasRows)
						{
							if(dr!=null)dr.Close();
							MessageBox.Show("已經存在此出版社了!");
							return;
						}
						if(dr!=null)dr.Close();
					}
					catch(Exception ex)
					{
						if(dr!=null)dr.Close();
						MessageBox.Show(ex.ToString());
						return;
					}
					str = "insert into 出版社(ISBN,出版社名稱) values('" + textBox1.Text + "','" + textBox2.Text + "')";
					cmd.CommandText = str;
					try
					{
						cmd.ExecuteNonQuery();
						MessageBox.Show("添加成功!");
						initializeScreen();
					}
					catch(Exception ex)
					{
						MessageBox.Show(ex.ToString());
						return;
					}
				}
			}
			else
			{
				MessageBox.Show("記錄項不能為空!");
				textBox1.Focus();
			}
		}
		/// <summary>
		/// 關閉按鈕
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void button4_Click(object sender, System.EventArgs e)
		{
			Global.sbpGlobal.Text = "就緒";
			this.Close();
		}
		/// <summary>
		/// 列表框單擊事件
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void listView1_Click(object sender, System.EventArgs e)
		{
			button1.Enabled = false;
			button2.Enabled = true;
			button5.Enabled = true;
			textBox1.Text = listView1.SelectedItems[0].SubItems[1].Text;
			textBox2.Text = listView1.SelectedItems[0].SubItems[2].Text;
		}
		/// <summary>
		/// 添加出版社
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void button1_Click(object sender, System.EventArgs e)
		{
			isUpdate = false;
			button1.Enabled = false;
			button2.Enabled = false;
			button3.Enabled = true;
			button5.Enabled = false;
			textBox1.Text = "";
			textBox1.ReadOnly = false;
			textBox2.Text = "";
			textBox2.ReadOnly = false;
			textBox1.Focus();
		}

		private void button2_Click(object sender, System.EventArgs e)
		{
			isUpdate = true;
			textBox1.ReadOnly = false;
			textBox2.ReadOnly = false;
			button2.Enabled = false;
			button3.Enabled = true;
			button5.Enabled = false;
			button1.Enabled = false;
		}
		/// <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!="")
			{
				string str = "delete from 出版社 where ISBN='" + listView1.SelectedItems[0].SubItems[1].Text + "'";
				cmd.CommandText = str;
				try
				{
					cmd.ExecuteNonQuery();
					MessageBox.Show("刪除成功!");
					initializeScreen();
				}
				catch(Exception ex)
				{
					MessageBox.Show(ex.ToString());
					return;
				}
			}
		}
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产乱人伦偷精品视频不卡 | 久久精品免费观看| 国产精品中文有码| 欧美日韩三级视频| 国产精品你懂的在线| 久久国产麻豆精品| 欧美精品色一区二区三区| 亚洲色图视频网站| 成人精品一区二区三区四区| 日韩三级在线观看| 亚洲五码中文字幕| 日本精品一级二级| 国产精品久久久久久久岛一牛影视 | 色综合久久久久| 欧美国产精品一区二区三区| 韩国中文字幕2020精品| 欧美日本在线看| 亚洲午夜久久久| 欧美综合在线视频| 亚洲女人****多毛耸耸8| 成人午夜精品在线| 国产欧美一区二区三区沐欲 | 99久久99久久精品免费观看| 久久精品在线观看| 国产在线不卡一区| 久久久久久久久久久久久女国产乱| 青草国产精品久久久久久| 91精品国产综合久久精品| 午夜精品在线看| 欧美精三区欧美精三区| 午夜电影久久久| 91精品国产综合久久久久久久久久 | 国产成人精品一区二区三区四区| 日韩精品一区二区三区老鸭窝| 美女mm1313爽爽久久久蜜臀| 精品国产污污免费网站入口 | 亚洲人成伊人成综合网小说| 色婷婷亚洲精品| 亚洲精品成人在线| 欧美日韩小视频| 麻豆一区二区99久久久久| 久久综合色8888| 成人福利视频在线看| 亚洲美女屁股眼交3| 欧美日韩日日夜夜| 激情文学综合网| 国产精品二三区| 欧美在线看片a免费观看| 日韩不卡一二三区| 久久久国产精品不卡| 成人av资源站| 日韩影视精彩在线| 久久精品夜夜夜夜久久| 91视频一区二区三区| 日韩精品高清不卡| 中文字幕av一区二区三区高| 一本色道久久综合亚洲精品按摩| 日韩综合小视频| 国产日韩欧美a| 欧美三级在线视频| 国产精品一区二区久激情瑜伽 | 26uuu久久综合| 91网站在线播放| 麻豆成人久久精品二区三区红 | 国产亚洲欧美日韩在线一区| 99精品视频免费在线观看| 偷窥少妇高潮呻吟av久久免费| 久久青草欧美一区二区三区| 欧美在线观看一二区| 精品亚洲porn| 亚洲一区在线视频观看| 久久久久久久国产精品影院| 欧美日韩中字一区| 国产黄人亚洲片| 日韩一区欧美二区| 亚洲欧美视频一区| 精品日韩一区二区| 欧洲激情一区二区| 成人禁用看黄a在线| 奇米777欧美一区二区| 日韩毛片高清在线播放| 久久精品人人做人人综合| 欧美另类变人与禽xxxxx| 99视频国产精品| 国产伦精品一区二区三区免费迷| 夜夜揉揉日日人人青青一国产精品| 久久综合九色综合欧美就去吻| 欧美三级视频在线| 91黄色小视频| www.欧美.com| 成人在线一区二区三区| 国产一区二区三区在线观看免费| 亚洲成av人综合在线观看| 一区在线观看免费| 日本一区二区三级电影在线观看| 日韩视频免费观看高清在线视频| 精品视频1区2区| 欧美亚洲综合网| 91成人在线精品| 97se狠狠狠综合亚洲狠狠| 国产91精品久久久久久久网曝门| 久久超碰97人人做人人爱| 日本不卡视频在线观看| 午夜婷婷国产麻豆精品| 一区二区三区日韩精品| 亚洲视频在线一区二区| 中文字幕在线视频一区| 国产精品天天看| 国产精品三级视频| 国产精品美女久久久久久久网站| 久久精品一区二区三区四区| 久久欧美中文字幕| 中文文精品字幕一区二区| 中文字幕国产一区| 中文字幕中文乱码欧美一区二区| 国产精品久久久爽爽爽麻豆色哟哟| 国产精品久久久久久亚洲伦 | 久久精品人人做| 国产欧美一区二区精品性色超碰| 国产亚洲一区二区三区在线观看| 欧美mv日韩mv国产| 久久久久久一二三区| 中文字幕的久久| 亚洲欧美日韩人成在线播放| 亚洲精品亚洲人成人网 | 亚洲乱码国产乱码精品精的特点| 亚洲人成影院在线观看| 午夜精品久久久久久| 麻豆91精品视频| 国产白丝精品91爽爽久久| 91丨九色丨黑人外教| 欧美日韩精品一区二区三区| 日韩欧美国产一区二区三区| 久久久久久毛片| 亚洲视频一区在线| 香蕉成人伊视频在线观看| 久久精品久久精品| 国产99久久久精品| 欧美最猛性xxxxx直播| 精品人伦一区二区色婷婷| 日本一区二区三区视频视频| 亚洲女女做受ⅹxx高潮| 奇米色一区二区三区四区| 国产一区二区三区免费看| 99精品视频一区| 欧美一区二区三区精品| 国产精品国模大尺度视频| 五月天一区二区三区| 国产精品99久久久久久久女警 | 国产偷v国产偷v亚洲高清| 一区二区三区精品在线| 极品少妇一区二区| 一本大道久久精品懂色aⅴ| 日韩一区二区三区在线| 中文字幕在线观看一区| 麻豆freexxxx性91精品| 色哟哟国产精品免费观看| 日韩欧美一区中文| 1区2区3区国产精品| 蜜桃在线一区二区三区| 一本久久综合亚洲鲁鲁五月天| 精品国产一区二区在线观看| 亚洲欧美日韩国产一区二区三区 | 精品剧情v国产在线观看在线| 亚洲欧美成aⅴ人在线观看| 精品一区二区三区在线播放视频| av欧美精品.com| 欧美精品一区二区不卡| 亚洲一区二区综合| 91在线观看一区二区| 精品欧美一区二区在线观看| 亚洲电影一区二区| 99国产精品久久久久| 2021中文字幕一区亚洲| 日本麻豆一区二区三区视频| 91亚洲精品久久久蜜桃网站 | 五月天欧美精品| 一本色道久久综合亚洲aⅴ蜜桃| 久久亚洲一级片| 美女被吸乳得到大胸91| 欧美日本一道本| 亚洲一区二区三区精品在线| 93久久精品日日躁夜夜躁欧美| 久久久久久免费网| 国内精品嫩模私拍在线| 欧美一区二区三区性视频| 亚欧色一区w666天堂| 欧美日韩国产成人在线免费| 日韩理论片在线| jiyouzz国产精品久久| 欧美国产成人在线| www.综合网.com| 日本一区二区三区四区| 国产高清不卡一区二区| 久久综合丝袜日本网| 国产精品综合在线视频| 久久综合色之久久综合| 国产福利一区在线| 国产精品欧美综合在线| 成人午夜短视频|