⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 docedit.cs

📁 实施医院管理系统
💻 CS
📖 第 1 页 / 共 2 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using comman;
using DataAccess;

namespace main
{
	/// <summary>
	/// Docedit 的摘要说明。
	/// </summary>
	public class Docedit : System.Windows.Forms.Form
	{
		private System.Windows.Forms.ComboBox comboBox1;
		private System.Windows.Forms.TextBox textBox2;
		private System.Windows.Forms.TextBox textBox4;
		private System.Windows.Forms.TextBox textBox5;
		private System.Windows.Forms.ComboBox comboBox2;
		private System.Windows.Forms.ComboBox comboBox3;
		private System.Windows.Forms.ComboBox comboBox4;
		private System.Windows.Forms.TextBox textBox6;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.Label label3;
		private System.Windows.Forms.Label label4;
		private System.Windows.Forms.Label label5;
		private System.Windows.Forms.Label label6;
		private System.Windows.Forms.Label label7;
		private System.Windows.Forms.Label label8;
		private System.Windows.Forms.Label label9;
		private System.Windows.Forms.Label label10;
		private System.Windows.Forms.Button button1;
		private System.Windows.Forms.Button button2;
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		private System.ComponentModel.Container components = null;
		private System.Windows.Forms.ComboBox comboBox5;
		private System.Windows.Forms.ComboBox comboBox6;
		private System.Windows.Forms.Label label11;
		private System.Windows.Forms.Label label12;

		private Doctor _doctor = new Doctor();
		private DoctorAccess docAccess = new DoctorAccess();
		private DictonaryAccess dicAccess = new DictonaryAccess();
		private CityAccess cityAccess = new CityAccess();
		private System.Windows.Forms.NumericUpDown numericUpDown1;
		private HosptialAccess hosAccess = new HosptialAccess();

		public Docedit()
		{
			//
			// Windows 窗体设计器支持所必需的
			//
			InitializeComponent();
			this.Text = "新增医生信息";
			Dictionary[] dic = dicAccess.GetDetailByCate("性别");
			Dictionary[] dic1 = dicAccess.GetDetailByCate("职称");
			Dictionary[] dic2 = dicAccess.GetDetailByCate("所属科室");
			Dictionary[] dic3 = dicAccess.GetDetailByCate("所在省份");
//			Hospital[] Hos = hosAccess.GetName();


			for(int i=0;i<dic.Length;i++)
			{
				this.comboBox1.Items.Add(dic[i]);
			}
			
			for(int i=0;i<dic1.Length;i++)
			{
				this.comboBox2.Items.Add(dic1[i]);
			}
			for(int i=0;i<dic2.Length;i++)
			{
				this.comboBox3.Items.Add(dic2[i]);
			}
			for(int i=0;i<dic3.Length;i++)
			{
				this.comboBox5.Items.Add(dic3[i]);
			}
						 //
						 // TODO: 在 InitializeComponent 调用后添加任何构造函数代码
						 //
		 }
		public Docedit(string DocName,int Old,string Sex,string Prof,string BelongOff,string Belong,string TelNum,string Specialty,string DocTime,string ProvinceName,string CityName)
		{
			//
			// Windows 窗体设计器支持所必需的
			//
			InitializeComponent();
			this.Text = "修改医生信息";
			Dictionary[] dic = dicAccess.GetDetailByCate("性别");
			Dictionary[] dic1 = dicAccess.GetDetailByCate("职称");
			Dictionary[] dic2 = dicAccess.GetDetailByCate("所属科室");
			Dictionary[] dic3 = dicAccess.GetDetailByCate("所在省份");

			for(int i=0;i<dic.Length;i++)
			{
				this.comboBox1.Items.Add(dic[i]);
			}
			
			for(int i=0;i<dic1.Length;i++)
			{
				this.comboBox2.Items.Add(dic1[i]);
			}
			for(int i=0;i<dic2.Length;i++)
			{
				this.comboBox3.Items.Add(dic2[i]);
			}
			for(int i=0;i<dic3.Length;i++)
			{
				this.comboBox5.Items.Add(dic3[i]);
			}

			this.textBox2.Text = DocName;
			this.numericUpDown1.Value = Convert.ToDecimal(Old);
			this.textBox4.Text = Specialty;
			this.textBox5.Text = DocTime;
			this.textBox6.Text = TelNum;
			this.comboBox1.Text = Sex;
			this.comboBox2.Text = Prof;
			this.comboBox3.Text = BelongOff;
			this.comboBox4.Text = Belong;
			this.comboBox5.Text = ProvinceName;
			this.comboBox6.Text = CityName;


			//
			// 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.comboBox1 = new System.Windows.Forms.ComboBox();
			this.textBox2 = new System.Windows.Forms.TextBox();
			this.textBox4 = new System.Windows.Forms.TextBox();
			this.textBox5 = new System.Windows.Forms.TextBox();
			this.comboBox2 = new System.Windows.Forms.ComboBox();
			this.comboBox3 = new System.Windows.Forms.ComboBox();
			this.comboBox4 = new System.Windows.Forms.ComboBox();
			this.textBox6 = new System.Windows.Forms.TextBox();
			this.label2 = new System.Windows.Forms.Label();
			this.label3 = new System.Windows.Forms.Label();
			this.label4 = new System.Windows.Forms.Label();
			this.label5 = new System.Windows.Forms.Label();
			this.label6 = new System.Windows.Forms.Label();
			this.label7 = new System.Windows.Forms.Label();
			this.label8 = new System.Windows.Forms.Label();
			this.label9 = new System.Windows.Forms.Label();
			this.label10 = new System.Windows.Forms.Label();
			this.button1 = new System.Windows.Forms.Button();
			this.button2 = new System.Windows.Forms.Button();
			this.comboBox5 = new System.Windows.Forms.ComboBox();
			this.comboBox6 = new System.Windows.Forms.ComboBox();
			this.label11 = new System.Windows.Forms.Label();
			this.label12 = new System.Windows.Forms.Label();
			this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
			((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
			this.SuspendLayout();
			// 
			// comboBox1
			// 
			this.comboBox1.Location = new System.Drawing.Point(208, 64);
			this.comboBox1.Name = "comboBox1";
			this.comboBox1.Size = new System.Drawing.Size(104, 20);
			this.comboBox1.TabIndex = 1;
			// 
			// textBox2
			// 
			this.textBox2.Location = new System.Drawing.Point(48, 24);
			this.textBox2.Name = "textBox2";
			this.textBox2.TabIndex = 0;
			this.textBox2.Text = "";
			// 
			// textBox4
			// 
			this.textBox4.Location = new System.Drawing.Point(48, 240);
			this.textBox4.Multiline = true;
			this.textBox4.Name = "textBox4";
			this.textBox4.Size = new System.Drawing.Size(264, 88);
			this.textBox4.TabIndex = 0;
			this.textBox4.Text = "";
			// 
			// textBox5
			// 
			this.textBox5.Location = new System.Drawing.Point(48, 344);
			this.textBox5.Multiline = true;
			this.textBox5.Name = "textBox5";
			this.textBox5.Size = new System.Drawing.Size(264, 56);
			this.textBox5.TabIndex = 0;
			this.textBox5.Text = "";
			// 
			// comboBox2
			// 
			this.comboBox2.Location = new System.Drawing.Point(48, 64);
			this.comboBox2.Name = "comboBox2";
			this.comboBox2.Size = new System.Drawing.Size(104, 20);
			this.comboBox2.TabIndex = 1;
			// 
			// comboBox3
			// 
			this.comboBox3.Location = new System.Drawing.Point(48, 104);
			this.comboBox3.Name = "comboBox3";
			this.comboBox3.Size = new System.Drawing.Size(104, 20);
			this.comboBox3.TabIndex = 1;
			// 
			// comboBox4
			// 
			this.comboBox4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
			this.comboBox4.Location = new System.Drawing.Point(208, 152);
			this.comboBox4.Name = "comboBox4";
			this.comboBox4.Size = new System.Drawing.Size(104, 20);
			this.comboBox4.TabIndex = 1;
			// 
			// textBox6
			// 
			this.textBox6.Location = new System.Drawing.Point(48, 200);
			this.textBox6.Multiline = true;
			this.textBox6.Name = "textBox6";
			this.textBox6.Size = new System.Drawing.Size(264, 21);
			this.textBox6.TabIndex = 0;
			this.textBox6.Text = "";
			// 
			// label2
			// 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -