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

📄 docedit.cs

📁 实施医院管理系统
💻 CS
📖 第 1 页 / 共 2 页
字号:
			this.label2.Location = new System.Drawing.Point(0, 24);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(48, 23);
			this.label2.TabIndex = 2;
			this.label2.Text = "名称";
			// 
			// label3
			// 
			this.label3.Location = new System.Drawing.Point(160, 24);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(32, 23);
			this.label3.TabIndex = 2;
			this.label3.Text = "年龄";
			// 
			// label4
			// 
			this.label4.Location = new System.Drawing.Point(160, 64);
			this.label4.Name = "label4";
			this.label4.Size = new System.Drawing.Size(48, 23);
			this.label4.TabIndex = 2;
			this.label4.Text = "性别";
			// 
			// label5
			// 
			this.label5.Location = new System.Drawing.Point(0, 64);
			this.label5.Name = "label5";
			this.label5.Size = new System.Drawing.Size(32, 23);
			this.label5.TabIndex = 2;
			this.label5.Text = "职称";
			// 
			// label6
			// 
			this.label6.Location = new System.Drawing.Point(0, 104);
			this.label6.Name = "label6";
			this.label6.Size = new System.Drawing.Size(48, 23);
			this.label6.TabIndex = 2;
			this.label6.Text = "科室";
			// 
			// label7
			// 
			this.label7.Location = new System.Drawing.Point(152, 152);
			this.label7.Name = "label7";
			this.label7.Size = new System.Drawing.Size(40, 32);
			this.label7.TabIndex = 2;
			this.label7.Text = "所在医院";
			// 
			// label8
			// 
			this.label8.Location = new System.Drawing.Point(0, 200);
			this.label8.Name = "label8";
			this.label8.Size = new System.Drawing.Size(40, 32);
			this.label8.TabIndex = 2;
			this.label8.Text = "电话号码";
			// 
			// label9
			// 
			this.label9.Location = new System.Drawing.Point(0, 240);
			this.label9.Name = "label9";
			this.label9.Size = new System.Drawing.Size(32, 23);
			this.label9.TabIndex = 2;
			this.label9.Text = "专长";
			// 
			// label10
			// 
			this.label10.Location = new System.Drawing.Point(0, 344);
			this.label10.Name = "label10";
			this.label10.Size = new System.Drawing.Size(40, 32);
			this.label10.TabIndex = 2;
			this.label10.Text = "门诊时间";
			// 
			// button1
			// 
			this.button1.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this.button1.Location = new System.Drawing.Point(72, 416);
			this.button1.Name = "button1";
			this.button1.TabIndex = 3;
			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(176, 416);
			this.button2.Name = "button2";
			this.button2.TabIndex = 3;
			this.button2.Text = "取消";
			this.button2.Click += new System.EventHandler(this.button2_Click);
			// 
			// comboBox5
			// 
			this.comboBox5.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
			this.comboBox5.Location = new System.Drawing.Point(208, 104);
			this.comboBox5.Name = "comboBox5";
			this.comboBox5.Size = new System.Drawing.Size(104, 20);
			this.comboBox5.TabIndex = 4;
			this.comboBox5.SelectedIndexChanged += new System.EventHandler(this.comboBox5_SelectedIndexChanged);
			// 
			// comboBox6
			// 
			this.comboBox6.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
			this.comboBox6.Location = new System.Drawing.Point(48, 152);
			this.comboBox6.Name = "comboBox6";
			this.comboBox6.Size = new System.Drawing.Size(104, 20);
			this.comboBox6.TabIndex = 4;
			this.comboBox6.SelectedIndexChanged += new System.EventHandler(this.comboBox6_SelectedIndexChanged);
			// 
			// label11
			// 
			this.label11.Location = new System.Drawing.Point(152, 104);
			this.label11.Name = "label11";
			this.label11.Size = new System.Drawing.Size(48, 32);
			this.label11.TabIndex = 5;
			this.label11.Text = "医院所在省";
			// 
			// label12
			// 
			this.label12.Location = new System.Drawing.Point(0, 144);
			this.label12.Name = "label12";
			this.label12.Size = new System.Drawing.Size(48, 32);
			this.label12.TabIndex = 6;
			this.label12.Text = "医院所在市";
			// 
			// numericUpDown1
			// 
			this.numericUpDown1.Location = new System.Drawing.Point(208, 24);
			this.numericUpDown1.Name = "numericUpDown1";
			this.numericUpDown1.Size = new System.Drawing.Size(104, 21);
			this.numericUpDown1.TabIndex = 7;
			// 
			// Docedit
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(320, 454);
			this.Controls.Add(this.numericUpDown1);
			this.Controls.Add(this.label12);
			this.Controls.Add(this.label11);
			this.Controls.Add(this.comboBox5);
			this.Controls.Add(this.button1);
			this.Controls.Add(this.comboBox1);
			this.Controls.Add(this.textBox2);
			this.Controls.Add(this.textBox4);
			this.Controls.Add(this.textBox5);
			this.Controls.Add(this.comboBox2);
			this.Controls.Add(this.comboBox3);
			this.Controls.Add(this.comboBox4);
			this.Controls.Add(this.textBox6);
			this.Controls.Add(this.label2);
			this.Controls.Add(this.label3);
			this.Controls.Add(this.label4);
			this.Controls.Add(this.label5);
			this.Controls.Add(this.label6);
			this.Controls.Add(this.label7);
			this.Controls.Add(this.label8);
			this.Controls.Add(this.label9);
			this.Controls.Add(this.label10);
			this.Controls.Add(this.button2);
			this.Controls.Add(this.comboBox6);
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
			this.MaximizeBox = false;
			this.Name = "Docedit";
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
			this.Text = "Docedit";
			((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
			this.ResumeLayout(false);

		}
		#endregion

		private void button1_Click(object sender, System.EventArgs e)
		{
			if(this.textBox2.Text != ""&&this.comboBox1.Text != "" &&this.comboBox2.Text !="" &&this.comboBox3.Text !="" &&this.numericUpDown1.Value !=0)
			{
				if(this.comboBox4.SelectedIndex != -1)
				{
		
					_doctor.Name = this.textBox2.Text;
					_doctor.Old = Convert.ToInt32(this.numericUpDown1.Value);
					_doctor.SexID = ((Dictionary)this.comboBox1.SelectedItem).ID;
					_doctor.ProfessID = ((Dictionary)this.comboBox2.SelectedItem).ID;
					_doctor.BelongOffID = ((Dictionary)this.comboBox3.SelectedItem).ID;
					_doctor.BelongID = ((Hospital)this.comboBox4.SelectedItem).HospitalID;
					_doctor.DocTime = this.textBox5.Text;
					_doctor.Specialty = this.textBox4.Text;
					_doctor.TelphonNum = this.textBox6.Text;

					this.DialogResult = DialogResult.OK;
				}

				else
					MessageBox.Show("请选择所在医院","提示",MessageBoxButtons.OK,MessageBoxIcon.Information);
				
			}
			else
				MessageBox.Show("姓名,年龄,职称,性别,所在科室不能为空","提示",MessageBoxButtons.OK,MessageBoxIcon.Information);


		}

		private void comboBox5_SelectedIndexChanged(object sender, System.EventArgs e)
		{
			this.comboBox4.Items.Clear();
			this.comboBox6.Items.Clear();
			City[] city = cityAccess.GetNameByProID(((Dictionary)this.comboBox5.SelectedItem).ID);
			Hospital[] hos = hosAccess.GetHosByProID(((Dictionary)this.comboBox5.SelectedItem).ID);

			for(int i=0;i<city.Length;i++)
			{
				this.comboBox6.Items.Add(city[i]);
			}
			for(int i=0;i<hos.Length;i++)
			{
				this.comboBox4.Items.Add(hos[i]);
			}

			this.comboBox4.Text = "";
			this.comboBox6.Text = "";

		}

		private void button2_Click(object sender, System.EventArgs e)
		{
			this.Close();
			this.DialogResult = DialogResult.Cancel;
		}

		private void comboBox6_SelectedIndexChanged(object sender, System.EventArgs e)
		{
			this.comboBox4.Items.Clear();
			Hospital[] hos = hosAccess.GetHosByCityID(((City)this.comboBox6.SelectedItem).CityID);
			for(int i=0;i<hos.Length;i++)
			{
				this.comboBox4.Items.Add(hos[i]);
			}
			this.comboBox4.Text = "";
			this.comboBox5.Text = "";
		}
		public Doctor Doctor
		{
			get
			{
				return _doctor;
			}
		}
	}
}

⌨️ 快捷键说明

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