亚洲欧美第一页_禁久久精品乱码_粉嫩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;
		private System.Windows.Forms.ToolBarButton tBtnFirst;
		private System.Windows.Forms.ToolBarButton tBtnPre;
		private System.Windows.Forms.ToolBarButton tBtnNext;
		private System.Windows.Forms.ToolBarButton tBtnLast;
		private System.Windows.Forms.ToolBarButton tBtnNew;
		private System.Windows.Forms.ToolBarButton tBtnEdit;
		private System.Windows.Forms.ToolBarButton tBtnDelete;
		private System.Windows.Forms.ToolBarButton tBtnSubmit;
		private System.Windows.Forms.ToolBarButton tBtnCancel;
		private 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.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;
			}

			if(e.Button.ToolTipText=="退出")
			{
				this.Close();
			}
		}

		//------------控制各個控件的只讀屬性-----------
		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丝袜在线播放0| 欧美激情在线观看视频免费| 日韩女优制服丝袜电影| 欧美老女人第四色| 欧美一区二区视频在线观看2022| 在线免费观看不卡av| 色8久久精品久久久久久蜜| 色综合天天在线| 欧美日韩精品一区二区在线播放| 欧美日韩一级视频| 欧美日韩亚洲丝袜制服| 91精品免费在线观看| 欧美mv日韩mv国产网站app| 欧美一区国产二区| 久久人人超碰精品| 国产精品灌醉下药二区| 有码一区二区三区| 日韩成人一区二区三区在线观看| 裸体在线国模精品偷拍| 国产不卡视频在线观看| 97精品视频在线观看自产线路二 | 欧美在线你懂的| 欧美三级蜜桃2在线观看| 555夜色666亚洲国产免| 久久久综合视频| 亚洲六月丁香色婷婷综合久久| 亚洲国产精品自拍| 国产乱子伦视频一区二区三区| 99久久精品国产观看| 欧美电影在哪看比较好| 日本一区二区三区高清不卡| 亚洲人成亚洲人成在线观看图片| 日日摸夜夜添夜夜添精品视频| 国内成+人亚洲+欧美+综合在线| 成人天堂资源www在线| 欧美日韩一区不卡| 欧美国产1区2区| 日韩av一二三| av激情成人网| 6080日韩午夜伦伦午夜伦| 国产日产欧美精品一区二区三区| 一区二区激情小说| 国产精品自在欧美一区| 91久久精品国产91性色tv| 亚洲精品一区二区三区精华液 | 欧美少妇一区二区| 国产亚洲va综合人人澡精品| 午夜精品久久久久影视| 麻豆国产一区二区| 欧美日韩精品一区二区| 国产成人精品免费| 成人欧美一区二区三区小说 | 久久久久国产精品人| 亚洲日本电影在线| 日韩在线一区二区三区| 99视频精品免费视频| 26uuuu精品一区二区| 日韩av二区在线播放| 欧美色网一区二区| 一区二区在线免费| 97se狠狠狠综合亚洲狠狠| 国产三区在线成人av| 精品亚洲porn| 4438x成人网最大色成网站| 一区二区三区高清在线| av亚洲精华国产精华精| 久久这里都是精品| 国内精品免费**视频| 7777精品伊人久久久大香线蕉| 一区二区三区欧美亚洲| 色综合中文综合网| 国产在线视频一区二区| 欧美日韩一区在线观看| 亚洲一区二区av在线| 欧美在线高清视频| 夜夜爽夜夜爽精品视频| 在线视频欧美精品| 最新国产の精品合集bt伙计| www.亚洲在线| 亚洲精品成人a在线观看| 91麻豆国产精品久久| 亚洲综合免费观看高清完整版在线 | 不卡在线观看av| 亚洲福利一区二区| 欧美日韩国产欧美日美国产精品| 亚洲精品日日夜夜| 91成人免费电影| 亚洲精品视频一区二区| 91蜜桃网址入口| 亚洲精品国产视频| 欧美性三三影院| 婷婷丁香久久五月婷婷| 欧美伦理影视网| 精品一区在线看| 国产欧美中文在线| 色婷婷久久99综合精品jk白丝| 亚洲精品自拍动漫在线| 欧美人与z0zoxxxx视频| 日韩av电影天堂| 91丨porny丨国产| 欧美经典一区二区三区| 久久婷婷国产综合国色天香| 国产一区二区精品在线观看| 99久久国产综合精品色伊| 中文字幕五月欧美| 欧美日本国产一区| 国产剧情av麻豆香蕉精品| 亚洲欧美日韩小说| 日韩一区和二区| 99久久综合国产精品| 亚洲chinese男男1069| 久久新电视剧免费观看| 91国产丝袜在线播放| 国产在线不卡视频| 一区二区三区国产豹纹内裤在线| 日韩久久免费av| 在线影视一区二区三区| 国产真实乱子伦精品视频| 亚洲尤物视频在线| 久久精品视频一区二区三区| 欧美日韩免费高清一区色橹橹 | 丝袜诱惑制服诱惑色一区在线观看 | 91日韩一区二区三区| 精品一区在线看| 日一区二区三区| 亚洲码国产岛国毛片在线| 久久久久综合网| 欧美一区二区三区免费在线看| 不卡一区二区在线| 国产一二三精品| 美日韩黄色大片| 亚洲国产日日夜夜| 亚洲精品成人在线| 亚洲天堂av老司机| 欧美国产激情一区二区三区蜜月 | 99综合影院在线| 韩国欧美国产一区| 肉丝袜脚交视频一区二区| 一区二区三区日韩欧美精品| 1区2区3区国产精品| 久久久99久久| 精品国产亚洲一区二区三区在线观看| 欧美性受xxxx黑人xyx| 91啪亚洲精品| 91小视频在线| av在线不卡观看免费观看| 国产成人精品亚洲777人妖| 久88久久88久久久| 久久99久久99| 狠狠色狠狠色综合系列| 久久精品二区亚洲w码| 免费不卡在线观看| 久久精品噜噜噜成人av农村| 日本一不卡视频| 欧美a级理论片| 激情综合色综合久久综合| 国产在线精品国自产拍免费| 高清不卡一二三区| 99国产精品久久久| 色一情一乱一乱一91av| 欧美综合天天夜夜久久| 欧美日韩视频在线一区二区| 欧美三级资源在线| 日韩无一区二区| 久久久久久亚洲综合影院红桃 | 日韩视频免费观看高清完整版在线观看 | 精品国产在天天线2019| 久久蜜桃一区二区| 国产精品久久久久9999吃药| 亚洲视频 欧洲视频| 亚洲成人av电影在线| 男女性色大片免费观看一区二区 | 成人午夜av电影| 日本精品一级二级| 欧美女孩性生活视频| 久久亚洲私人国产精品va媚药| 久久九九国产精品| 亚洲免费在线播放| 蜜臀av一区二区| 成人精品高清在线| 欧美在线综合视频| 国产亚洲一区字幕| 亚洲国产精品综合小说图片区| 久久精品噜噜噜成人av农村| 97久久精品人人做人人爽| 91精品国产一区二区三区蜜臀| 久久综合九色综合97婷婷| 亚洲女子a中天字幕| 狠狠色狠狠色综合日日91app| 91免费在线播放| 欧美精品一区男女天堂| 亚洲精选免费视频| 国产成人免费在线| 欧美精品1区2区3区| 欧美韩日一区二区三区| 蜜桃视频免费观看一区| 色综合视频一区二区三区高清| 精品久久久久久久久久久久包黑料| 中文字幕在线观看一区|