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

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

?? parentform.cs

?? 賓館管理系統=
?? CS
字號:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;

namespace 醫院管理系統
{
	/// <summary>
	/// ParentForm 的摘要說明。
	/// </summary>
	public class ParentForm : System.Windows.Forms.Form
	{
		protected CurrencyManager cmOrders;//用于數據導航控制
		protected DataSet dataSet11;
	
		protected System.Windows.Forms.GroupBox groupBox1;
		protected System.Windows.Forms.TextBox txt2;
		protected System.Windows.Forms.Label label1;
		protected System.Windows.Forms.Button btnSearch;
		protected System.Windows.Forms.TextBox txt1;
		protected System.Windows.Forms.Label label2;
		protected System.Windows.Forms.TextBox txt3;
		protected System.Windows.Forms.Label label3;
		private System.Windows.Forms.ImageList imageList1;
		protected System.Windows.Forms.ToolBar toolBar1;
		protected System.Windows.Forms.ToolBarButton tBtnFirst;
		protected System.Windows.Forms.ToolBarButton tBtnPre;
		protected System.Windows.Forms.ToolBarButton tBtnNext;
		protected System.Windows.Forms.ToolBarButton tBtnLast;
		protected System.Windows.Forms.ToolBarButton tBtnNew;
		protected System.Windows.Forms.ToolBarButton tBtnEdit;
		protected System.Windows.Forms.ToolBarButton tBtnDelete;
		protected System.Windows.Forms.ToolBarButton tBtnSubmit;
		protected System.Windows.Forms.ToolBarButton tBtnCancel;
		protected System.Windows.Forms.ToolBarButton tBtnQuit;
		protected System.Windows.Forms.DataGrid dataGrid1;
		protected System.Windows.Forms.GroupBox groupBox2;
		private System.Data.SqlClient.SqlCommand sqlSelectCommand1;
		private System.Data.SqlClient.SqlCommand sqlInsertCommand1;
		private System.Data.SqlClient.SqlCommand sqlUpdateCommand1;
		private System.Data.SqlClient.SqlCommand sqlDeleteCommand1;
		protected System.Data.SqlClient.SqlDataAdapter da1;
		private System.ComponentModel.IContainer components;

		public ParentForm()
		{
			//
			// 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.components = new System.ComponentModel.Container();
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(ParentForm));
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.txt2 = new System.Windows.Forms.TextBox();
			this.label1 = new System.Windows.Forms.Label();
			this.btnSearch = new System.Windows.Forms.Button();
			this.txt1 = new System.Windows.Forms.TextBox();
			this.label2 = new System.Windows.Forms.Label();
			this.txt3 = new System.Windows.Forms.TextBox();
			this.label3 = new System.Windows.Forms.Label();
			this.imageList1 = new System.Windows.Forms.ImageList(this.components);
			this.toolBar1 = new System.Windows.Forms.ToolBar();
			this.tBtnFirst = new System.Windows.Forms.ToolBarButton();
			this.tBtnPre = new System.Windows.Forms.ToolBarButton();
			this.tBtnNext = new System.Windows.Forms.ToolBarButton();
			this.tBtnLast = new System.Windows.Forms.ToolBarButton();
			this.tBtnNew = new System.Windows.Forms.ToolBarButton();
			this.tBtnEdit = new System.Windows.Forms.ToolBarButton();
			this.tBtnDelete = new System.Windows.Forms.ToolBarButton();
			this.tBtnSubmit = new System.Windows.Forms.ToolBarButton();
			this.tBtnCancel = new System.Windows.Forms.ToolBarButton();
			this.tBtnQuit = new System.Windows.Forms.ToolBarButton();
			this.dataGrid1 = new System.Windows.Forms.DataGrid();
			this.groupBox2 = new System.Windows.Forms.GroupBox();
			this.sqlSelectCommand1 = new System.Data.SqlClient.SqlCommand();
			this.sqlInsertCommand1 = new System.Data.SqlClient.SqlCommand();
			this.sqlUpdateCommand1 = new System.Data.SqlClient.SqlCommand();
			this.sqlDeleteCommand1 = new System.Data.SqlClient.SqlCommand();
			this.da1 = new System.Data.SqlClient.SqlDataAdapter();
			this.groupBox1.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
			this.SuspendLayout();
			// 
			// groupBox1
			// 
			this.groupBox1.Controls.Add(this.txt2);
			this.groupBox1.Controls.Add(this.label1);
			this.groupBox1.Controls.Add(this.btnSearch);
			this.groupBox1.Controls.Add(this.txt1);
			this.groupBox1.Controls.Add(this.label2);
			this.groupBox1.Controls.Add(this.txt3);
			this.groupBox1.Controls.Add(this.label3);
			this.groupBox1.Location = new System.Drawing.Point(0, 40);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(728, 56);
			this.groupBox1.TabIndex = 28;
			this.groupBox1.TabStop = false;
			// 
			// txt2
			// 
			this.txt2.Location = new System.Drawing.Point(368, 24);
			this.txt2.Name = "txt2";
			this.txt2.TabIndex = 2;
			this.txt2.Text = "";
			// 
			// label1
			// 
			this.label1.Location = new System.Drawing.Point(304, 28);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(64, 16);
			this.label1.TabIndex = 1;
			this.label1.Text = "查詢條件2";
			// 
			// btnSearch
			// 
			this.btnSearch.Image = ((System.Drawing.Image)(resources.GetObject("btnSearch.Image")));
			this.btnSearch.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
			this.btnSearch.Location = new System.Drawing.Point(16, 24);
			this.btnSearch.Name = "btnSearch";
			this.btnSearch.Size = new System.Drawing.Size(72, 23);
			this.btnSearch.TabIndex = 0;
			this.btnSearch.Text = " 搜索";
			// 
			// txt1
			// 
			this.txt1.Location = new System.Drawing.Point(168, 24);
			this.txt1.Name = "txt1";
			this.txt1.TabIndex = 2;
			this.txt1.Text = "";
			// 
			// label2
			// 
			this.label2.Location = new System.Drawing.Point(104, 28);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(64, 16);
			this.label2.TabIndex = 1;
			this.label2.Text = "查詢條件1";
			// 
			// txt3
			// 
			this.txt3.Location = new System.Drawing.Point(571, 24);
			this.txt3.Name = "txt3";
			this.txt3.TabIndex = 2;
			this.txt3.Text = "";
			// 
			// label3
			// 
			this.label3.Location = new System.Drawing.Point(512, 28);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(64, 16);
			this.label3.TabIndex = 1;
			this.label3.Text = "查詢條件3";
			// 
			// imageList1
			// 
			this.imageList1.ImageSize = new System.Drawing.Size(16, 16);
			this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
			this.imageList1.TransparentColor = System.Drawing.SystemColors.ControlLightLight;
			// 
			// toolBar1
			// 
			this.toolBar1.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
																						this.tBtnFirst,
																						this.tBtnPre,
																						this.tBtnNext,
																						this.tBtnLast,
																						this.tBtnNew,
																						this.tBtnEdit,
																						this.tBtnDelete,
																						this.tBtnSubmit,
																						this.tBtnCancel,
																						this.tBtnQuit});
			this.toolBar1.DropDownArrows = true;
			this.toolBar1.ImageList = this.imageList1;
			this.toolBar1.Location = new System.Drawing.Point(0, 0);
			this.toolBar1.Name = "toolBar1";
			this.toolBar1.ShowToolTips = true;
			this.toolBar1.Size = new System.Drawing.Size(728, 41);
			this.toolBar1.TabIndex = 29;
			this.toolBar1.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.toolBar1_ButtonClick);
			// 
			// tBtnFirst
			// 
			this.tBtnFirst.ImageIndex = 0;
			this.tBtnFirst.Text = "首記錄";
			this.tBtnFirst.ToolTipText = "首記錄";
			// 
			// tBtnPre
			// 
			this.tBtnPre.ImageIndex = 1;
			this.tBtnPre.Text = "上一記錄";
			this.tBtnPre.ToolTipText = "上一記錄";
			// 
			// tBtnNext
			// 
			this.tBtnNext.ImageIndex = 2;
			this.tBtnNext.Text = "下一記錄";
			this.tBtnNext.ToolTipText = "下一記錄";
			// 
			// tBtnLast
			// 
			this.tBtnLast.ImageIndex = 3;
			this.tBtnLast.Text = "尾記錄";
			this.tBtnLast.ToolTipText = "尾記錄";
			// 
			// tBtnNew
			// 
			this.tBtnNew.ImageIndex = 4;
			this.tBtnNew.Text = "新增";
			this.tBtnNew.ToolTipText = "新增";
			// 
			// tBtnEdit
			// 
			this.tBtnEdit.ImageIndex = 5;
			this.tBtnEdit.Text = "修改";
			this.tBtnEdit.ToolTipText = "修改";
			// 
			// tBtnDelete
			// 
			this.tBtnDelete.ImageIndex = 6;
			this.tBtnDelete.Text = "刪除";
			this.tBtnDelete.ToolTipText = "刪除";
			// 
			// tBtnSubmit
			// 
			this.tBtnSubmit.ImageIndex = 7;
			this.tBtnSubmit.Text = "提交";
			this.tBtnSubmit.ToolTipText = "提交";
			// 
			// tBtnCancel
			// 
			this.tBtnCancel.ImageIndex = 8;
			this.tBtnCancel.Text = "取消";
			this.tBtnCancel.ToolTipText = "取消";
			// 
			// tBtnQuit
			// 
			this.tBtnQuit.ImageIndex = 9;
			this.tBtnQuit.Text = "退出";
			this.tBtnQuit.ToolTipText = "退出";
			// 
			// dataGrid1
			// 
			this.dataGrid1.CaptionVisible = false;
			this.dataGrid1.DataMember = "";
			this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.dataGrid1.Location = new System.Drawing.Point(0, 96);
			this.dataGrid1.Name = "dataGrid1";
			this.dataGrid1.ReadOnly = true;
			this.dataGrid1.Size = new System.Drawing.Size(728, 280);
			this.dataGrid1.TabIndex = 30;
			// 
			// groupBox2
			// 
			this.groupBox2.Location = new System.Drawing.Point(0, 368);
			this.groupBox2.Name = "groupBox2";
			this.groupBox2.Size = new System.Drawing.Size(728, 128);
			this.groupBox2.TabIndex = 31;
			this.groupBox2.TabStop = false;
			// 
			// da1
			// 
			this.da1.DeleteCommand = this.sqlDeleteCommand1;
			this.da1.InsertCommand = this.sqlInsertCommand1;
			this.da1.SelectCommand = this.sqlSelectCommand1;
			this.da1.UpdateCommand = this.sqlUpdateCommand1;
			// 
			// ParentForm
			// 
			this.AcceptButton = this.btnSearch;
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(728, 502);
			this.Controls.Add(this.groupBox2);
			this.Controls.Add(this.dataGrid1);
			this.Controls.Add(this.toolBar1);
			this.Controls.Add(this.groupBox1);
			this.Name = "ParentForm";
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
			this.Text = "ParentForm";
			this.groupBox1.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).EndInit();
			this.ResumeLayout(false);

		}
		#endregion

		//-----------工具欄控制代碼-------------
		protected void toolBar1_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
		{
			if(e.Button.ToolTipText=="退出")
			{
				this.Close();
			}
			

			if (e.Button.ToolTipText == "首記錄")
			{
				this.dataGrid1.UnSelect(cmOrders.Position); //取消原選中的行
				cmOrders.Position = 0;
				this.dataGrid1.Select(cmOrders.Position); //選中當前行
				this.dataGrid1.CurrentRowIndex = cmOrders.Position; //移動表頭指示圖標
				return;
				
			}
			if (e.Button.ToolTipText == "上一記錄")
			{
				if (cmOrders.Position >= 0)
				{
					this.dataGrid1.UnSelect(cmOrders.Position); 
					cmOrders.Position--;
					this.dataGrid1.Select(cmOrders.Position);      
					this.dataGrid1.CurrentRowIndex = cmOrders.Position; 
				}
				return;
			}
			if (e.Button.ToolTipText == "下一記錄")
			{
				if (cmOrders.Position <= cmOrders.Count-1)
				{
					this.dataGrid1.UnSelect(cmOrders.Position); 
					cmOrders.Position++;
					this.dataGrid1.Select(cmOrders.Position);       
					this.dataGrid1.CurrentRowIndex = cmOrders.Position; 
					
				}
				return;
			}
			if (e.Button.ToolTipText == "尾記錄")
			{
				this.dataGrid1.UnSelect(cmOrders.Position); 
				cmOrders.Position = cmOrders.Count-1;
				this.dataGrid1.Select(cmOrders.Position);       
				this.dataGrid1.CurrentRowIndex = cmOrders.Position; 
				return;
			}
			
			if(e.Button.ToolTipText=="新增")
			{				
				cmOrders.AddNew();//新增一條記錄
                SetDefaultValue();//設置默認值				
				SetModifyMode(true);//設置控件只讀等屬性
			}
			if(e.Button.ToolTipText=="修改")
			{
				SetModifyMode(true);
			}
			if(e.Button.ToolTipText=="刪除")
			{
				
				DialogResult result=MessageBox.Show("確認刪除?","刪除數據",MessageBoxButtons.OKCancel);
				if(result==DialogResult.OK)
					if(cmOrders.Count>0)//立即從數據集中刪除
					{
						cmOrders.RemoveAt(cmOrders.Position);						
						da1.Update(dataSet11);
					}
					else
						MessageBox.Show("表中為空,已無可刪除數據","提示",MessageBoxButtons.OK,MessageBoxIcon.Error);
			}
			if(e.Button.ToolTipText=="提交")
			{
				bool canSubmit;
				canSubmit=this.CheckNotNull();
				if(canSubmit==false)//有非空值字段為空,不允許提交
				{
					return;
				}
				cmOrders.EndCurrentEdit();
				if(dataSet11.GetChanges()!=null)
				{
					try
					{
						da1.Update(dataSet11);
						SetModifyMode(false);
					}
					catch(Exception express)
					{
						MessageBox.Show(express.ToString(),"提示",MessageBoxButtons.OK,MessageBoxIcon.Error);
						dataSet11.RejectChanges();
					}
				}
				return;
			}

			if (e.Button.ToolTipText == "取消")
			{
				try
				{
					cmOrders.CancelCurrentEdit();  //取消編輯
					SetModifyMode(false);
				}
				catch(Exception express)
				{
					MessageBox.Show(express.ToString(),"提示",MessageBoxButtons.OK,MessageBoxIcon.Error);
				}
				return;
			}

			
		}

		//------------控制各個控件的只讀屬性-----------
		protected virtual void SetModifyMode(bool blnEdit)
		{
			btnSearch.Enabled=!blnEdit;
		}
		
		//--------------供派生窗體重載,設置默認值------------
		protected virtual void SetDefaultValue()
		{
			return;
		}
		
		//------------供派生窗體重載,檢查非空字段-----------------
		protected virtual bool CheckNotNull()
		{
			return(true);
		}

		

		
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩国产高清一区| 日韩一区二区电影| 麻豆精品在线视频| 国产精品久久久久久久久动漫 | 欧美午夜宅男影院| 成人精品视频一区二区三区| 91免费版pro下载短视频| 免费成人深夜小野草| 一色屋精品亚洲香蕉网站| 欧美成人在线直播| 91精品福利视频| 国产成人av一区二区| 日韩成人精品在线| 亚洲精品乱码久久久久久日本蜜臀| 欧美成人vr18sexvr| 欧美酷刑日本凌虐凌虐| 99精品视频一区二区| 国产精品白丝jk白祙喷水网站| 日韩av中文字幕一区二区| 一区二区在线观看视频在线观看| 国产亚洲1区2区3区| 精品免费一区二区三区| 日韩欧美一级在线播放| 欧美性猛交xxxx乱大交退制版| 成人av电影免费在线播放| 国产精品一区二区在线观看网站| 日本不卡一区二区三区| 午夜激情久久久| 亚洲一区国产视频| 伊人一区二区三区| 亚洲欧美日韩中文播放| 国产精品久久久久久久久搜平片| 欧美激情资源网| 欧美极品少妇xxxxⅹ高跟鞋| 久久久蜜桃精品| 26uuu久久综合| 精品国精品国产| 精品少妇一区二区三区日产乱码| 欧美一区二区三区四区久久| 欧美美女直播网站| 欧美肥妇毛茸茸| 91精品欧美综合在线观看最新| 欧美日韩电影在线| 69堂亚洲精品首页| 91精品久久久久久久91蜜桃| 日韩欧美在线网站| 日韩免费高清视频| 久久久久国色av免费看影院| 久久午夜老司机| 国产日韩在线不卡| 中文字幕免费不卡| 中文字幕在线不卡| 亚洲精品视频观看| 午夜精品影院在线观看| 肉丝袜脚交视频一区二区| 蜜桃视频一区二区| 国产精品一区二区三区四区| 成人在线视频一区二区| 99国产精品一区| 欧洲一区在线观看| 日韩亚洲欧美一区二区三区| 337p粉嫩大胆噜噜噜噜噜91av| 久久久久久97三级| 亚洲另类在线一区| 视频在线观看91| 国产一区在线观看视频| 成人免费看黄yyy456| 91蝌蚪porny| 欧美精品乱码久久久久久| 精品久久人人做人人爱| 中文字幕一区二区日韩精品绯色| 亚洲一区二区美女| 韩国欧美国产1区| 99久久99久久久精品齐齐 | 日韩欧美在线网站| 欧美激情在线一区二区| 亚洲精品成人精品456| 日韩成人免费电影| 成人精品一区二区三区中文字幕| 欧美在线一区二区三区| 久久在线免费观看| 亚洲国产精品天堂| 国产精品99久久久久久久女警| 色又黄又爽网站www久久| 欧美一级日韩一级| 亚洲欧美日韩在线不卡| 另类成人小视频在线| 94-欧美-setu| 精品嫩草影院久久| 亚洲一区二区三区四区在线观看| 狠狠色综合日日| 欧美日韩情趣电影| 中文字幕一区二区在线观看| 蜜臀av性久久久久蜜臀aⅴ四虎 | 日韩一本二本av| 亚洲区小说区图片区qvod| 久久国产精品无码网站| 色欲综合视频天天天| 2020日本不卡一区二区视频| 亚洲国产毛片aaaaa无费看| 福利视频网站一区二区三区| 日韩视频免费直播| 亚洲主播在线播放| 成人免费看黄yyy456| 精品久久人人做人人爽| 五月婷婷欧美视频| 日本韩国视频一区二区| 国产欧美日韩视频在线观看| 日本女人一区二区三区| 91精彩视频在线| 中文字幕成人av| 国产一二三精品| 欧美一级一级性生活免费录像| 亚洲国产日韩a在线播放性色| 91在线观看免费视频| 国产午夜精品在线观看| 蜜臀精品久久久久久蜜臀| 欧美日韩色综合| 亚洲综合丝袜美腿| 91香蕉视频黄| 国产精品麻豆视频| 国产成人日日夜夜| 久久先锋资源网| 另类综合日韩欧美亚洲| 91麻豆精品久久久久蜜臀| 亚洲大片免费看| 欧美中文字幕一二三区视频| 亚洲人成影院在线观看| 99精品视频免费在线观看| 国产精品天天看| 成人免费观看男女羞羞视频| 国产清纯白嫩初高生在线观看91 | 国产精品白丝jk黑袜喷水| 欧美mv日韩mv亚洲| 国精产品一区一区三区mba视频 | 亚洲色图20p| 成人午夜精品一区二区三区| 国产亚洲成aⅴ人片在线观看 | 久草热8精品视频在线观看| 欧美一区二区三区免费| 奇米一区二区三区| 日韩欧美国产1| 黄色资源网久久资源365| 久久精品人人做人人爽人人| 国产91对白在线观看九色| 国产精品午夜春色av| 91在线观看美女| 亚洲高清视频在线| 日韩一区二区三区精品视频| 激情五月婷婷综合网| 久久久久久久久久电影| 成人免费高清在线观看| 亚洲天堂成人网| 欧美日韩中字一区| 麻豆91免费看| 久久九九国产精品| 成人白浆超碰人人人人| 一区二区高清视频在线观看| 欧美另类高清zo欧美| 日韩和欧美一区二区三区| 精品国产123| 丰满亚洲少妇av| 亚洲夂夂婷婷色拍ww47 | 亚洲视频在线一区观看| 在线免费观看不卡av| 日韩国产精品大片| 久久久91精品国产一区二区三区| 波多野结衣亚洲一区| 水蜜桃久久夜色精品一区的特点| 精品剧情v国产在线观看在线| 丁香婷婷综合五月| 天堂资源在线中文精品| 久久久久国产免费免费| 91日韩精品一区| 美女视频网站久久| 国产精品久久久久久亚洲伦| 欧美精品一卡二卡| 国产成人综合在线播放| 亚洲午夜私人影院| 久久久精品免费网站| 欧美主播一区二区三区| 精品制服美女久久| 亚洲一区免费视频| 国产欧美一区二区精品性| 欧美做爰猛烈大尺度电影无法无天| 免费在线视频一区| 中文字幕一区免费在线观看| 日韩欧美视频一区| av影院午夜一区| 麻豆精品一区二区三区| 亚洲免费观看高清完整版在线观看熊 | 精品久久久久一区| 色综合久久99| 国产老肥熟一区二区三区| 性久久久久久久久| 中文字幕日本不卡| 久久久精品tv| 日韩精品一区二区三区swag| 在线免费亚洲电影| 成人午夜视频免费看|