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

📄 clinicreg.h

📁 医院管理系统 本系统包括说明文件,运行文件,希望站长接受如此好的系统.
💻 H
📖 第 1 页 / 共 2 页
字号:
			this->cmbRedKind->Size = System::Drawing::Size(192, 20);
			this->cmbRedKind->TabIndex = 91;
			this->cmbRedKind->SelectedIndexChanged += new System::EventHandler(this, cmbRedKind_SelectedIndexChanged);
			// 
			// cmbRoom
			// 
			this->cmbRoom->BackColor = System::Drawing::SystemColors::Desktop;
			this->cmbRoom->Location = System::Drawing::Point(104, 240);
			this->cmbRoom->Name = S"cmbRoom";
			this->cmbRoom->Size = System::Drawing::Size(192, 20);
			this->cmbRoom->TabIndex = 91;
			this->cmbRoom->SelectedIndexChanged += new System::EventHandler(this, cmbRoom_SelectedIndexChanged);
			// 
			// cmbDoctor
			// 
			this->cmbDoctor->BackColor = System::Drawing::SystemColors::Desktop;
			this->cmbDoctor->Location = System::Drawing::Point(520, 240);
			this->cmbDoctor->Name = S"cmbDoctor";
			this->cmbDoctor->Size = System::Drawing::Size(192, 20);
			this->cmbDoctor->TabIndex = 91;
			// 
			// label1
			// 
			this->label1->Location = System::Drawing::Point(104, 152);
			this->label1->Name = S"label1";
			this->label1->Size = System::Drawing::Size(56, 11);
			this->label1->TabIndex = 87;
			this->label1->Text = S"费用类型";
			// 
			// label2
			// 
			this->label2->Location = System::Drawing::Point(520, 152);
			this->label2->Name = S"label2";
			this->label2->Size = System::Drawing::Size(56, 11);
			this->label2->TabIndex = 87;
			this->label2->Text = S"挂号类型";
			// 
			// label3
			// 
			this->label3->Location = System::Drawing::Point(104, 224);
			this->label3->Name = S"label3";
			this->label3->Size = System::Drawing::Size(56, 11);
			this->label3->TabIndex = 87;
			this->label3->Text = S"挂号科室";
			// 
			// label4
			// 
			this->label4->Location = System::Drawing::Point(520, 224);
			this->label4->Name = S"label4";
			this->label4->Size = System::Drawing::Size(56, 11);
			this->label4->TabIndex = 87;
			this->label4->Text = S"医生";
			// 
			// label5
			// 
			this->label5->Location = System::Drawing::Point(448, 304);
			this->label5->Name = S"label5";
			this->label5->Size = System::Drawing::Size(56, 11);
			this->label5->TabIndex = 87;
			this->label5->Text = S"挂号时间";
			// 
			// tBoxTime
			// 
			this->tBoxTime->BackColor = System::Drawing::SystemColors::AppWorkspace;
			this->tBoxTime->Location = System::Drawing::Point(448, 320);
			this->tBoxTime->Name = S"tBoxTime";
			this->tBoxTime->Size = System::Drawing::Size(168, 21);
			this->tBoxTime->TabIndex = 88;
			this->tBoxTime->Text = S"";
			// 
			// label7
			// 
			this->label7->Location = System::Drawing::Point(208, 304);
			this->label7->Name = S"label7";
			this->label7->Size = System::Drawing::Size(56, 11);
			this->label7->TabIndex = 87;
			this->label7->Text = S"挂号费用";
			// 
			// tBoxFee
			// 
			this->tBoxFee->BackColor = System::Drawing::SystemColors::AppWorkspace;
			this->tBoxFee->Location = System::Drawing::Point(208, 320);
			this->tBoxFee->Name = S"tBoxFee";
			this->tBoxFee->Size = System::Drawing::Size(168, 21);
			this->tBoxFee->TabIndex = 88;
			this->tBoxFee->Text = S"";
			// 
			// panel1
			// 
			this->panel1->Controls->Add(this->textBox3);
			this->panel1->Controls->Add(this->textBox4);
			this->panel1->Controls->Add(this->textBox5);
			this->panel1->Controls->Add(this->textBox6);
			this->panel1->Dock = System::Windows::Forms::DockStyle::Bottom;
			this->panel1->Location = System::Drawing::Point(0, 429);
			this->panel1->Name = S"panel1";
			this->panel1->Size = System::Drawing::Size(792, 24);
			this->panel1->TabIndex = 3;
			// 
			// textBox3
			// 
			this->textBox3->BackColor = System::Drawing::SystemColors::Desktop;
			this->textBox3->Location = System::Drawing::Point(0, 0);
			this->textBox3->Name = S"textBox3";
			this->textBox3->Size = System::Drawing::Size(192, 21);
			this->textBox3->TabIndex = 0;
			this->textBox3->Text = S"必填";
			this->textBox3->TextAlign = System::Windows::Forms::HorizontalAlignment::Center;
			// 
			// textBox4
			// 
			this->textBox4->Location = System::Drawing::Point(200, 0);
			this->textBox4->Name = S"textBox4";
			this->textBox4->Size = System::Drawing::Size(192, 21);
			this->textBox4->TabIndex = 0;
			this->textBox4->Text = S"选填";
			this->textBox4->TextAlign = System::Windows::Forms::HorizontalAlignment::Center;
			// 
			// textBox5
			// 
			this->textBox5->BackColor = System::Drawing::SystemColors::AppWorkspace;
			this->textBox5->Location = System::Drawing::Point(400, 0);
			this->textBox5->Name = S"textBox5";
			this->textBox5->Size = System::Drawing::Size(192, 21);
			this->textBox5->TabIndex = 0;
			this->textBox5->Text = S"自动";
			this->textBox5->TextAlign = System::Windows::Forms::HorizontalAlignment::Center;
			// 
			// textBox6
			// 
			this->textBox6->BackColor = System::Drawing::SystemColors::Control;
			this->textBox6->Dock = System::Windows::Forms::DockStyle::Right;
			this->textBox6->Location = System::Drawing::Point(592, 0);
			this->textBox6->Name = S"textBox6";
			this->textBox6->Size = System::Drawing::Size(200, 21);
			this->textBox6->TabIndex = 0;
			this->textBox6->Text = S"";
			// 
			// ClinicReg
			// 
			this->AutoScaleBaseSize = System::Drawing::Size(6, 14);
			this->ClientSize = System::Drawing::Size(792, 453);
			this->Controls->Add(this->panel1);
			this->Controls->Add(this->groupBox1);
			this->Controls->Add(this->toolBar1);
			this->Name = S"ClinicReg";
			this->Text = S"门诊挂号";
			this->groupBox1->ResumeLayout(false);
			this->panel1->ResumeLayout(false);
			this->ResumeLayout(false);

		}		


		//----------------设置控件ReadOnly属性------------------------
		void SetModify(bool isModifiable)
		{
			this->tBoxName->ReadOnly = !isModifiable;
			this->tBoxAge->ReadOnly = !isModifiable;
			this->tBoxFee->ReadOnly = !isModifiable;
			this->tBoxTime->ReadOnly = !isModifiable;
            
			this->cmbSex->Enabled = isModifiable;
			this->cmbPeople->Enabled = isModifiable;
			this->cmbFeeKind->Enabled = isModifiable;
			this->cmbRedKind->Enabled = isModifiable;
			this->cmbRoom->Enabled = isModifiable;
			this->cmbDoctor->Enabled = isModifiable;
		}
private: System::Void toolBar1_ButtonClick(System::Object *  sender, System::Windows::Forms::ToolBarButtonClickEventArgs *  e)
		 {
			 if(String::Compare(e->Button->ToolTipText,S"新增") == 0)
			 {
				 //设置默认值
				 this->tBoxTime->Text = System::DateTime::Now.ToString();
				 this->cmbRedKind->SelectedIndex = 0;
				 //设置门诊挂号编号
				 String* tempSQL = S"Select max(编号) 最大编号 from 门诊挂号";
				 SqlCommand* sqlCmd = new SqlCommand(tempSQL,this->MyDataBase->myConnection);
				 int MaxID = 1;
				 Object* r = sqlCmd->ExecuteScalar();
				 String* str;
				 if(r != System::DBNull::Value)
				 {
					 str = r->ToString()->Trim();
					 str = str->Substring(4,7);
					 MaxID = System::Convert::ToInt32(str) + 1;
				 }
				 String* year = System::DateTime::Now.Year.ToString();
				 switch(MaxID.ToString()->Length)
				 {
				 case 1:
					 str = String::Format(S"{0}000000{1}",year,__box(MaxID));
					 break;
				 case 2:
					 str = String::Format(S"{0}00000{1}",year,__box(MaxID));
					 break;
				 case 3:
					 str = String::Format(S"{0}0000{1}",year,__box(MaxID));
					 break;
				 case 4:
					 str = String::Format(S"{0}000{1}",year,__box(MaxID));
					 break;
				 case 5:
					 str = String::Format(S"{0}00{1}",year,__box(MaxID));
					 break;
				 case 6:
					 str = String::Format(S"{0}0{1}",year,__box(MaxID));
					 break;
				 case 7:
					 str = String::Format(S"{0}{1}",year,__box(MaxID));
					 break;
				 }
				 this->RegID = str;
				 //设置病人信息库编号
				 tempSQL = S"Select max(编号) 最大编号 from 病人信息库";
				 sqlCmd = new SqlCommand(tempSQL,this->MyDataBase->myConnection);
				 MaxID = 1;
				 r = sqlCmd->ExecuteScalar();				 
				 if(r != System::DBNull::Value)
				 {
					 str = r->ToString()->Trim();
					 str = str->Substring(4,7);
					 MaxID = System::Convert::ToInt32(str) + 1;
				 }
				 year = System::DateTime::Now.Year.ToString();
				 switch(MaxID.ToString()->Length)
				 {
				 case 1:
					 str = String::Format(S"{0}000000{1}",year,__box(MaxID));
					 break;
				 case 2:
					 str = String::Format(S"{0}00000{1}",year,__box(MaxID));
					 break;
				 case 3:
					 str = String::Format(S"{0}0000{1}",year,__box(MaxID));
					 break;
				 case 4:
					 str = String::Format(S"{0}000{1}",year,__box(MaxID));
					 break;
				 case 5:
					 str = String::Format(S"{0}00{1}",year,__box(MaxID));
					 break;
				 case 6:
					 str = String::Format(S"{0}0{1}",year,__box(MaxID));
					 break;
				 case 7:
					 str = String::Format(S"{0}{1}",year,__box(MaxID));
					 break;
				 }
				 this->infoID = str;
				 this->tBoxFee->Text = S"1";
				 //设置控件属性
				 this->SetModify(true);
			 }
			 else if(String::Compare(e->Button->ToolTipText,S"提交") == 0)
			 {	
				 //检查字段内容
				 if(String::Compare(this->tBoxName->Text,String::Empty) == 0 )
				 {
					 MessageBox::Show(S"姓名不能为空");
					 return;
				 }
				 if(String::Compare(this->cmbFeeKind->Text,String::Empty) == 0 )
				 {
					 MessageBox::Show(S"费用类型不能为空");
					 return;
				 }
				 if(String::Compare(this->cmbRoom->Text,String::Empty) == 0 )
				 {
					 MessageBox::Show(S"挂号科室不能为空");
					 return;
				 }
				 if(String::Compare(this->cmbDoctor->Text,String::Empty) == 0 )
				 {
					 MessageBox::Show(S"医生不能为空");
					 return;
				 }
				 //更新病人信息库
				 String* values[] = {this->infoID,this->tBoxName->Text,this->cmbSex->Text,this->tBoxAge->Text,this->cmbPeople->Text,this->cmbFeeKind->Text};
				 String* tempSQL = String::Format(S"Insert into 病人信息库([编号],[姓名],[性别],[年龄],[民族],[费用类型]) Values('{0}','{1}','{2}','{3}','{4}','{5}')",values);
				 this->MyDataBase->SQLOperate(tempSQL);
				 //更新门诊挂号
				 String* value[] = {this->RegID,this->infoID,this->tBoxName->Text,this->cmbSex->Text,this->cmbRoom->Text,this->cmbFeeKind->Text,this->cmbRedKind->Text,this->tBoxFee->Text,this->cmbDoctor->Text,this->tBoxTime->Text};
				 String* s = String::Format(S"Insert into 门诊挂号([编号],[病人编号],[姓名],[性别],[挂号科室],[费用类型],[挂号类型],[挂号费用],[医生],[时间],[是否已划价]) Values('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}','{9}','否')",value);
				 String* SQL = String::Format(s,value); 
                 
				 this->MyDataBase->SQLOperate(SQL);

				 this->tBoxName->Text = S"";
				 this->cmbSex->Text = S"";
				 this->tBoxAge->Text = S"";
				 this->cmbPeople->Text = S"";
				 this->cmbFeeKind->Text = S"";
				 this->tBoxName->Text = S"";
				 this->cmbSex->Text = S"";
				 this->cmbRoom->Text = S"";
				 this->cmbFeeKind->Text = S"";
				 this->cmbRedKind->Text = S"";
				 this->tBoxFee->Text = S"";
				 this->tBoxTime->Text = S"";
				 this->SetModify(false);
			 }
			 else if(String::Compare(e->Button->ToolTipText,S"取消") == 0)
			 {
				 this->tBoxName->Text = S"";
				 this->cmbSex->Text = S"";
				 this->tBoxAge->Text = S"";
				 this->cmbPeople->Text = S"";
				 this->cmbFeeKind->Text = S"";
				 this->tBoxName->Text = S"";
				 this->cmbSex->Text = S"";
				 this->cmbRoom->Text = S"";
				 this->cmbFeeKind->Text = S"";
				 this->cmbRedKind->Text = S"";
				 this->tBoxFee->Text = S"";
				 this->tBoxTime->Text = S"";
				 this->SetModify(false);
			 }
			 else if(String::Compare(e->Button->ToolTipText,S"退出") == 0)
			 {
				 this->Close();
			 }
		 }

private: System::Void cmbRoom_SelectedIndexChanged(System::Object *  sender, System::EventArgs *  e)
		 {
			 String* Filter = String::Format(S"科室 like '{0}'",this->cmbRoom->Text->Trim());
			this->DoctorView->RowFilter = Filter;
		 }



private: System::Void cmbRedKind_SelectedIndexChanged(System::Object *  sender, System::EventArgs *  e)
		 {
			 if(String::Compare(this->cmbRedKind->Text,"普通") == 0)
			 {
				 this->tBoxFee->Text = S"1";
			 }
			 if(String::Compare(this->cmbRedKind->Text,"专家号5元") == 0)
			 {
				 this->tBoxFee->Text = S"5";
			 }
			 if(String::Compare(this->cmbRedKind->Text,"专家号10元") == 0)
			 {
				 this->tBoxFee->Text = S"10";
			 }
		 }

};
}

⌨️ 快捷键说明

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