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

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

?? parentform.cs

?? 很全面的醫(yī)院管理系統(tǒng)
?? CS
字號:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;

namespace 醫(yī)院管理系統(tǒng)
{
	/// <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一区二区三区免费野_久草精品视频
国产美女在线精品| 亚洲成在人线在线播放| 久久国产生活片100| 5566中文字幕一区二区电影| 婷婷一区二区三区| 欧美日韩精品电影| 六月婷婷色综合| 国产夜色精品一区二区av| 国产毛片精品一区| 国产精品短视频| 日本二三区不卡| 午夜精品视频一区| 26uuu色噜噜精品一区二区| 国产精品一区二区免费不卡 | 久久久久国产精品厨房| 国产白丝精品91爽爽久久| 中文字幕一区二区三区视频| 欧美亚洲综合在线| 久久精品久久久精品美女| 日本一区二区三区四区| 日本高清不卡aⅴ免费网站| 蜜臀av性久久久久蜜臀aⅴ四虎| 2020日本不卡一区二区视频| 色哟哟精品一区| 麻豆一区二区三| ...av二区三区久久精品| 欧美群妇大交群中文字幕| 国产一二三精品| 亚洲永久精品国产| www精品美女久久久tv| 一本大道久久精品懂色aⅴ| 日韩精品三区四区| 中文一区一区三区高中清不卡| 在线观看日韩电影| 国产一区亚洲一区| 亚洲成a人片在线不卡一二三区| 久久这里只精品最新地址| 在线视频观看一区| 国产精品一区二区久久精品爱涩| 亚洲自拍偷拍网站| 久久久久久久久久久久久久久99 | 色94色欧美sute亚洲线路一ni | 亚洲观看高清完整版在线观看| 精品日韩成人av| 一本一道久久a久久精品| 久久成人综合网| 亚洲福利视频一区| 中文字幕亚洲一区二区av在线| 欧美va天堂va视频va在线| 欧美午夜寂寞影院| 99久久久久久| 国产成人亚洲综合a∨猫咪| 日韩av在线发布| 一区二区在线免费| 中文字幕 久热精品 视频在线| 日韩一区二区电影网| 欧美在线高清视频| 高清在线不卡av| 国产剧情在线观看一区二区| 日韩精品福利网| 亚洲成人激情自拍| 亚洲精品中文在线观看| 中文字幕乱码日本亚洲一区二区| 精品久久久久久久久久久久包黑料 | 国产不卡免费视频| 黄色资源网久久资源365| 日韩电影一二三区| 亚洲国产婷婷综合在线精品| 亚洲欧美综合色| 国产精品污www在线观看| 久久久久久久久伊人| 久久久综合精品| 久久久久综合网| 久久久国际精品| 精品国产污网站| 欧美一区二区国产| 日韩丝袜美女视频| 精品播放一区二区| 欧美精品一区二区三区蜜臀| 日韩精品一区二区三区在线| 日韩女同互慰一区二区| 日韩欧美色综合网站| 欧美xfplay| 久久久久亚洲蜜桃| 亚洲国产高清在线观看视频| 国产精品不卡一区| 亚洲免费毛片网站| 亚洲大片免费看| 蜜桃视频一区二区三区在线观看| 日韩不卡一二三区| 麻豆传媒一区二区三区| 国产一区中文字幕| av网站一区二区三区| 色综合久久久网| 制服丝袜亚洲网站| 精品91自产拍在线观看一区| 久久久久久久久久看片| 国产精品久久久久久久久久免费看 | 97se亚洲国产综合自在线| 色偷偷久久一区二区三区| 欧美日韩国产123区| 欧美成人综合网站| 亚洲国产高清不卡| 一区二区三区精品在线| 天堂一区二区在线免费观看| 国产一区二区电影| 色综合久久天天| 日韩免费在线观看| 亚洲欧洲韩国日本视频| 首页国产欧美久久| 国产suv精品一区二区883| 日本道色综合久久| 日韩美女在线视频| 中文字幕日本乱码精品影院| 亚洲制服欧美中文字幕中文字幕| 日韩不卡一二三区| 99麻豆久久久国产精品免费优播| 欧美午夜片在线观看| 26uuu国产一区二区三区| 国产精品久久久久久久第一福利 | 91精品国产色综合久久ai换脸| 久久久久久久久一| 午夜精品在线看| 国产成人啪午夜精品网站男同| 色激情天天射综合网| 日韩视频一区二区三区| 亚洲天堂2014| 国产自产高清不卡| 欧美日韩在线三级| 国产亚洲精品资源在线26u| 亚洲国产综合色| 成人黄色免费短视频| 欧美丰满少妇xxxxx高潮对白 | 日韩一区二区免费电影| 国产精品不卡在线| 狠狠色丁香婷综合久久| 欧美午夜精品电影| 中文字幕亚洲区| 国产真实乱子伦精品视频| 欧美午夜精品久久久| 国产精品国产三级国产三级人妇 | 亚洲综合丁香婷婷六月香| 国产精品99久久久久久有的能看| 欧美日韩精品二区第二页| 亚洲欧洲在线观看av| 国产一区二区在线看| 91麻豆精品国产91久久久使用方法| 亚洲素人一区二区| 成人性色生活片| 久久久久久久久久久久久夜| 日本不卡在线视频| 欧美影院一区二区三区| 中文字幕中文字幕在线一区| 国产精品综合网| 欧美不卡激情三级在线观看| 亚洲电影第三页| 欧美丝袜自拍制服另类| 亚洲丝袜精品丝袜在线| 成人一区二区三区视频在线观看 | 久久精品视频一区二区三区| 蜜臀av性久久久久av蜜臀妖精| 精品视频在线看| 亚洲高清不卡在线| 欧美中文字幕一区二区三区亚洲| 国产精品国产三级国产三级人妇 | 色呦呦国产精品| 樱花草国产18久久久久| 色哟哟一区二区三区| 一卡二卡三卡日韩欧美| 在线视频你懂得一区二区三区| 亚洲欧美日韩成人高清在线一区| av在线这里只有精品| 国产精品视频一二| av网站免费线看精品| 最新国产精品久久精品| 色婷婷国产精品久久包臀| 亚洲男人的天堂av| 一本到一区二区三区| 亚洲一区二区成人在线观看| 欧美视频自拍偷拍| 水野朝阳av一区二区三区| 欧美最猛黑人xxxxx猛交| 亚洲va韩国va欧美va精品| 欧美日韩日日骚| 日本视频在线一区| 精品对白一区国产伦| 国产不卡在线播放| 一区二区在线免费| 欧美精品在线观看播放| 九九视频精品免费| 欧美国产1区2区| 一本久久a久久精品亚洲| 亚洲成av人在线观看| 精品国产区一区| 99综合电影在线视频| 樱桃视频在线观看一区| 欧美一区二区女人| 丁香啪啪综合成人亚洲小说| 亚洲男人的天堂一区二区| 欧美一区二区女人|