638 lines
26 KiB
C#
638 lines
26 KiB
C#
using DevExpress.XtraEditors;
|
||
using DevExpress.XtraGrid.Views.Grid;
|
||
using HL_FristAidPlatform_DTO;
|
||
using HL_FristAidPlatform_DynamicElectrocardiogram;
|
||
using HL_FristAidPlatform_Public;
|
||
using System;
|
||
using System.Collections.Generic;
|
||
using System.Data;
|
||
using System.Drawing;
|
||
using System.Windows.Forms;
|
||
|
||
namespace HL_FristAidPlatform_FollowUp
|
||
{
|
||
public partial class Form_FollowUpDetail_ChestPain : XtraForm
|
||
{
|
||
/// <summary>
|
||
/// 当前患者信息
|
||
/// </summary>
|
||
public DataTable Cur_PatientDT;
|
||
|
||
/// <summary>
|
||
/// 当前患者编号(GUID)
|
||
/// </summary>
|
||
public string Cur_PatientID;
|
||
|
||
/// <summary>
|
||
/// 当前随访计划编号(GUID)
|
||
/// </summary>
|
||
public string Cur_FollUpID;
|
||
/// <summary>
|
||
/// 等待窗体
|
||
/// </summary>
|
||
private Loading loading = new Loading();
|
||
|
||
public Form_FollowUpDetail_ChestPain(string _Cur_PatientID)
|
||
{
|
||
InitializeComponent();
|
||
Cur_PatientID = _Cur_PatientID;
|
||
}
|
||
|
||
/// <summary>
|
||
/// 窗体加载
|
||
/// </summary>
|
||
/// <param name="sender"></param>
|
||
/// <param name="e"></param>
|
||
private void Form_FollowUpDetail_Load(object sender, EventArgs e)
|
||
{
|
||
BindData();
|
||
BindList();
|
||
}
|
||
|
||
/// <summary>
|
||
/// 绑定随访计划列表
|
||
/// </summary>
|
||
private void BindList()
|
||
{
|
||
try
|
||
{
|
||
DataTable data = DBHelpClass.Get("api/service/T_Service_FollowUp_ChestPain/?pageIndex=1&pageSize=20&pGuid=" + Cur_PatientID + "");
|
||
gridControl_FollowUpVisit.DataSource = data;
|
||
gridView_FollowUpVisit.OptionsBehavior.Editable = false;
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
PublicClass.WriteErrorLog(this.Text, "绑定随访计划列表:\r\n" + ex);
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// 查询绑定
|
||
/// </summary>
|
||
private void BindData()
|
||
{
|
||
BindDoctorList();
|
||
BindPatientInfo();
|
||
}
|
||
|
||
/// <summary>
|
||
/// 绑定随访医生列表
|
||
/// </summary>
|
||
private void BindDoctorList()
|
||
{
|
||
try
|
||
{
|
||
DataTable dataTableDoctor = DBHelpClass.Get("api/admin/T_SYS_User/GetModelByWhere?where=护士");
|
||
PublicClass.SetLookUpList(ref lookUpEdit_FollowUpDoctor, dataTableDoctor, 0, 4, false);
|
||
lookUpEdit_FollowUpDoctor.EditValue = Information.User.ID.ToString();
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
PublicClass.WriteErrorLog(this.Text, "绑定随访医生列表:\r\n" + ex);
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// 绑定患者信息
|
||
/// </summary>
|
||
private void BindPatientInfo()
|
||
{
|
||
try
|
||
{
|
||
Cur_PatientDT = DBHelpClass.GetDataRow("api/service/T_Service_Patient/" + Cur_PatientID + "");
|
||
label_name.Text = Cur_PatientDT.Rows[0]["Name"].ToString();
|
||
label_sex.Text = Cur_PatientDT.Rows[0]["GenderString"].ToString();
|
||
label_age.Text = Cur_PatientDT.Rows[0]["Age"].ToString();
|
||
label_AdmissionNumber.Text= Cur_PatientDT.Rows[0]["AdmissionNumber"]+"";
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
PublicClass.WriteErrorLog(this.Text, "绑定患者信息:\r\n" + ex);
|
||
}
|
||
}
|
||
|
||
|
||
/// <summary>
|
||
/// 保存
|
||
/// </summary>
|
||
/// <param name="sender"></param>
|
||
/// <param name="e"></param>
|
||
private void simpleButton_save_Click(object sender, EventArgs e)
|
||
{
|
||
try
|
||
{
|
||
#region 保存
|
||
List<T_Service_FollowUp_ChestPainDTO> patientDTOs = new List<T_Service_FollowUp_ChestPainDTO>();
|
||
T_Service_FollowUp_ChestPainDTO PrehospitalDTO = new T_Service_FollowUp_ChestPainDTO();
|
||
string Url = string.Empty;
|
||
ClientFactory<T_Service_FollowUp_ChestPainDTO> httpClient = new HttpClientFactory<T_Service_FollowUp_ChestPainDTO>();
|
||
Client<T_Service_FollowUp_ChestPainDTO> client = httpClient.VisitFactory();
|
||
DataTable dataTable = new DataTable();
|
||
//dataTable = DBHelpClass.Get("api/service/T_Service_FollowUp_ChestPain/GetByPatientGuid?patientGuid=" + Cur_PatientID + "");
|
||
if (!string.IsNullOrEmpty(Cur_FollUpID))
|
||
{
|
||
dataTable = DBHelpClass.GetDataRow("api/service/T_Service_FollowUp_ChestPain/" + Cur_FollUpID + "");
|
||
if (dataTable.Rows.Count > 0)
|
||
{
|
||
Url = "api/service/T_Service_FollowUp_ChestPain/Update";
|
||
PrehospitalDTO.ID = Int32.Parse(dataTable.Rows[0]["ID"].ToString());
|
||
PrehospitalDTO.GUID = dataTable.Rows[0]["GUID"].ToString();
|
||
}
|
||
}
|
||
else
|
||
{
|
||
Url = "api/service/T_Service_FollowUp_ChestPain";
|
||
PrehospitalDTO.GUID = Guid.NewGuid().ToString();
|
||
}
|
||
PrehospitalDTO.PatientGuid = Cur_PatientID;
|
||
PrehospitalDTO.FollowUpDate = Convert.ToDateTime(dateEdit_FollowUpDate.TimeValue);
|
||
PrehospitalDTO.Note = richTextBoxNode.Text;
|
||
PrehospitalDTO.FollowUpStatus = "1";
|
||
PrehospitalDTO.FollowUpDoctor = lookUpEdit_FollowUpDoctor.Text;
|
||
PrehospitalDTO.FollowUpResult = comboBox_FollowUpResult.Text;
|
||
PrehospitalDTO.FollowUpType = comboBox_FollowUpType.Text;
|
||
PrehospitalDTO.IsChestPain =Convert.ToInt32(radioGroup_IsChestPain.Text);
|
||
string CAG = "";
|
||
if (checkBox_LM.Checked)
|
||
{
|
||
CAG = checkBox_LM.Text;
|
||
}
|
||
if (checkBox_LAD.Checked)
|
||
{
|
||
CAG += CAG == "" ? checkBox_LAD.Text : ";" + checkBox_LAD.Text;
|
||
}
|
||
if (checkBox_LCX.Checked)
|
||
{
|
||
CAG += CAG == "" ? checkBox_LCX.Text : ";" + checkBox_LCX.Text;
|
||
}
|
||
if (checkBox_RCA.Checked)
|
||
{
|
||
CAG += CAG == "" ? checkBox_RCA.Text : ";" + checkBox_RCA.Text;
|
||
}
|
||
PrehospitalDTO.CAG = CAG;
|
||
string TargetVessel = "";
|
||
if (checkBox_BXG_LM.Checked)
|
||
{
|
||
TargetVessel = checkBox_BXG_LM.Text;
|
||
}
|
||
if (checkBox_BXG_LAD.Checked)
|
||
{
|
||
TargetVessel += TargetVessel == "" ? checkBox_BXG_LAD.Text : ";" + checkBox_BXG_LAD.Text;
|
||
}
|
||
if (checkBox_BXG_LCX.Checked)
|
||
{
|
||
TargetVessel += TargetVessel == "" ? checkBox_BXG_LCX.Text : ";" + checkBox_BXG_LCX.Text;
|
||
}
|
||
if (checkBox_BXG_RCA.Checked)
|
||
{
|
||
TargetVessel += TargetVessel == "" ? checkBox_BXG_RCA.Text : ";" + checkBox_BXG_RCA.Text;
|
||
}
|
||
PrehospitalDTO.TargetVessel = TargetVessel;
|
||
string PCIMedication = "";
|
||
if (checkBox_ASPL.Checked)
|
||
{
|
||
PCIMedication = checkBox_ASPL.Text;
|
||
}
|
||
if (checkBox_LCGL.Checked)
|
||
{
|
||
PCIMedication += PCIMedication == "" ? checkBox_LCGL.Text : ";" + checkBox_LCGL.Text;
|
||
}
|
||
if (checkBox_TGRL.Checked)
|
||
{
|
||
PCIMedication += PCIMedication == "" ? checkBox_TGRL.Text : ";" + checkBox_TGRL.Text;
|
||
}
|
||
if (checkBox_RSTD.Checked)
|
||
{
|
||
PCIMedication += PCIMedication == "" ? checkBox_RSTD.Text : ";" + checkBox_RSTD.Text;
|
||
}
|
||
if (checkBox_YLRTD.Checked)
|
||
{
|
||
PCIMedication += PCIMedication == "" ? checkBox_YLRTD.Text : ";" + checkBox_YLRTD.Text;
|
||
}
|
||
if (checkBox_QTTD.Checked)
|
||
{
|
||
PCIMedication += PCIMedication == "" ? checkBox_QTTD.Text : ";" + checkBox_QTTD.Text;
|
||
}
|
||
PrehospitalDTO.PCIMedication = PCIMedication;
|
||
string Complication = "";
|
||
if (checkBox_GXY.Checked)
|
||
{
|
||
Complication = checkBox_GXY.Text;
|
||
}
|
||
if (checkBox_TLB.Checked)
|
||
{
|
||
Complication += Complication == "" ? checkBox_TLB.Text : ";" + checkBox_TLB.Text;
|
||
}
|
||
if (checkBox_XS.Checked)
|
||
{
|
||
Complication += Complication == "" ? checkBox_XS.Text : ";" + checkBox_XS.Text;
|
||
}
|
||
if (checkBox_GLXZ.Checked)
|
||
{
|
||
Complication += Complication == "" ? checkBox_GLXZ.Text : ";" + checkBox_GLXZ.Text;
|
||
}
|
||
if (checkBox_GZXZ.Checked)
|
||
{
|
||
Complication += Complication == "" ? checkBox_GZXZ.Text : ";" + checkBox_GZXZ.Text;
|
||
}
|
||
PrehospitalDTO.Complication = Complication;
|
||
patientDTOs.Add(PrehospitalDTO);
|
||
//访问
|
||
ListEntity<T_Service_FollowUp_ChestPainDTO> t = client.Post(Url, patientDTOs);
|
||
if (t.Success)
|
||
{
|
||
XtraMessageBox.Show("保存系统信息成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||
}
|
||
else
|
||
{
|
||
XtraMessageBox.Show("保存失败,请稍后重试!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||
}
|
||
#endregion
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
PublicClass.WriteErrorLog(this.Text, "保存:\r\n" + ex);
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// 绑定详情
|
||
/// </summary>
|
||
/// <param name="_patientID"></param>
|
||
/// <param name="entity"></param>
|
||
public void BindDataPrehospital(string _patientID, ListEntity<T_Service_FollowUp_ChestPainDTO> entity)
|
||
{
|
||
try
|
||
{
|
||
#region 绑定详情
|
||
DataTable dataTable = new DataTable();
|
||
if (string.IsNullOrEmpty(_patientID))
|
||
{
|
||
dataTable = DBHelpClass.JsonToDataRow(entity.DataString);
|
||
}
|
||
if (entity == null)
|
||
{
|
||
dataTable = DBHelpClass.GetDataRow("api/service/T_Service_FollowUp_ChestPain/" + _patientID + "");
|
||
}
|
||
if (dataTable != null)
|
||
{
|
||
if (dataTable.Rows.Count > 0)
|
||
{
|
||
dateEdit_FollowUpDate.TimeValue = PublicClass.ToString(dataTable.Rows[0]["FollowUpDate"], "");
|
||
comboBox_FollowUpType.Text = dataTable.Rows[0]["FollowUpType"] + "";
|
||
comboBox_FollowUpResult.Text = dataTable.Rows[0]["FollowUpResult"] + "";
|
||
lookUpEdit_FollowUpDoctor.Text = dataTable.Rows[0]["FollowUpDoctor"] + "";
|
||
radioGroup_IsChestPain.SelectedIndex = dataTable.Rows[0]["IsChestPain"]+"" == "0" ? 0 : 1;
|
||
richTextBoxNode.Text= dataTable.Rows[0]["Note"] + "";
|
||
string[] CAG = PublicClass.ToString(dataTable.Rows[0]["CAG"], "").Split(';');
|
||
foreach (var item in CAG)
|
||
{
|
||
if (item.ToString() == checkBox_LM.Text)
|
||
{
|
||
checkBox_LM.Checked = true;
|
||
}
|
||
else
|
||
{
|
||
checkBox_LM.Checked = false;
|
||
}
|
||
if (item.ToString() == checkBox_LAD.Text)
|
||
{
|
||
checkBox_LAD.Checked = true;
|
||
}
|
||
else
|
||
{
|
||
checkBox_LAD.Checked = false;
|
||
}
|
||
if (item.ToString() == checkBox_LCX.Text)
|
||
{
|
||
checkBox_LCX.Checked = true;
|
||
}
|
||
else
|
||
{
|
||
checkBox_LCX.Checked = false;
|
||
}
|
||
if (item.ToString() == checkBox_RCA.Text)
|
||
{
|
||
checkBox_RCA.Checked = true;
|
||
}
|
||
else
|
||
{
|
||
checkBox_RCA.Checked = false;
|
||
}
|
||
}
|
||
string[] TargetVessel = PublicClass.ToString(dataTable.Rows[0]["TargetVessel"], "").Split(';');
|
||
foreach (var item in TargetVessel)
|
||
{
|
||
if (item.ToString() == checkBox_BXG_LM.Text)
|
||
{
|
||
checkBox_BXG_LM.Checked = true;
|
||
}
|
||
else
|
||
{
|
||
checkBox_BXG_LM.Checked = false;
|
||
}
|
||
if (item.ToString() == checkBox_BXG_LAD.Text)
|
||
{
|
||
checkBox_BXG_LAD.Checked = true;
|
||
}
|
||
else
|
||
{
|
||
checkBox_BXG_LAD.Checked = false;
|
||
}
|
||
if (item.ToString() == checkBox_BXG_LCX.Text)
|
||
{
|
||
checkBox_BXG_LCX.Checked = true;
|
||
}
|
||
else
|
||
{
|
||
checkBox_BXG_LCX.Checked = false;
|
||
}
|
||
if (item.ToString() == checkBox_BXG_RCA.Text)
|
||
{
|
||
checkBox_BXG_RCA.Checked = true;
|
||
}
|
||
else
|
||
{
|
||
checkBox_BXG_RCA.Checked = false;
|
||
}
|
||
}
|
||
string[] PCIMedication = PublicClass.ToString(dataTable.Rows[0]["PCIMedication"], "").Split(';');
|
||
foreach (var item in PCIMedication)
|
||
{
|
||
if (item.ToString() == checkBox_ASPL.Text)
|
||
{
|
||
checkBox_ASPL.Checked = true;
|
||
}
|
||
else
|
||
{
|
||
checkBox_ASPL.Checked = false;
|
||
}
|
||
if (item.ToString() == checkBox_LCGL.Text)
|
||
{
|
||
checkBox_LCGL.Checked = true;
|
||
}
|
||
else
|
||
{
|
||
checkBox_LCGL.Checked = false;
|
||
}
|
||
if (item.ToString() == checkBox_TGRL.Text)
|
||
{
|
||
checkBox_TGRL.Checked = true;
|
||
}
|
||
else
|
||
{
|
||
checkBox_TGRL.Checked = false;
|
||
}
|
||
if (item.ToString() == checkBox_RSTD.Text)
|
||
{
|
||
checkBox_RSTD.Checked = true;
|
||
}
|
||
else
|
||
{
|
||
checkBox_RSTD.Checked = false;
|
||
}
|
||
if (item.ToString() == checkBox_YLRTD.Text)
|
||
{
|
||
checkBox_YLRTD.Checked = true;
|
||
}
|
||
else
|
||
{
|
||
checkBox_YLRTD.Checked = false;
|
||
}
|
||
if (item.ToString() == checkBox_QTTD.Text)
|
||
{
|
||
checkBox_QTTD.Checked = true;
|
||
}
|
||
else
|
||
{
|
||
checkBox_QTTD.Checked = false;
|
||
}
|
||
}
|
||
string[] Complication = PublicClass.ToString(dataTable.Rows[0]["Complication"], "").Split(';');
|
||
foreach (var item in Complication)
|
||
{
|
||
if (item.ToString() == checkBox_GXY.Text)
|
||
{
|
||
checkBox_GXY.Checked = true;
|
||
}
|
||
else
|
||
{
|
||
checkBox_GXY.Checked = false;
|
||
}
|
||
if (item.ToString() == checkBox_TLB.Text)
|
||
{
|
||
checkBox_TLB.Checked = true;
|
||
}
|
||
else
|
||
{
|
||
checkBox_TLB.Checked = false;
|
||
}
|
||
if (item.ToString() == checkBox_XS.Text)
|
||
{
|
||
checkBox_XS.Checked = true;
|
||
}
|
||
else
|
||
{
|
||
checkBox_XS.Checked = false;
|
||
}
|
||
if (item.ToString() == checkBox_GLXZ.Text)
|
||
{
|
||
checkBox_GLXZ.Checked = true;
|
||
}
|
||
else
|
||
{
|
||
checkBox_GLXZ.Checked = false;
|
||
}
|
||
if (item.ToString() == checkBox_GZXZ.Text)
|
||
{
|
||
checkBox_GZXZ.Checked = true;
|
||
}
|
||
else
|
||
{
|
||
checkBox_GZXZ.Checked = false;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
#endregion
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
PublicClass.WriteErrorLog(this.Text, "绑定详情:\r\n" + ex);
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// 单击绑定详情
|
||
/// </summary>
|
||
/// <param name="sender"></param>
|
||
/// <param name="e"></param>
|
||
private void gridView_FollowUpVisit_RowClick(object sender, RowClickEventArgs e)
|
||
{
|
||
try
|
||
{
|
||
DataRow dataRow = gridView_FollowUpVisit.GetDataRow(e.RowHandle);
|
||
Cur_FollUpID = dataRow["GUID"].ToString();
|
||
BindDataPrehospital(Cur_FollUpID, null);
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
PublicClass.WriteErrorLog(this.Text, "单击绑定详情:\r\n" + ex);
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// 新增
|
||
/// </summary>
|
||
/// <param name="sender"></param>
|
||
/// <param name="e"></param>
|
||
private void simpleButton_Add_Click(object sender, EventArgs e)
|
||
{
|
||
dateEdit_FollowUpDate.TimeValue = "";
|
||
comboBox_FollowUpType.Text = "";
|
||
comboBox_FollowUpResult.Text = "";
|
||
lookUpEdit_FollowUpDoctor.Text = "";
|
||
radioGroup_IsChestPain.SelectedIndex = -1;
|
||
richTextBoxNode.Text = "";
|
||
checkBox_LM.Checked = false;
|
||
checkBox_LAD.Checked = false;
|
||
checkBox_LCX.Checked = false;
|
||
checkBox_RCA.Checked = false;
|
||
checkBox_BXG_LM.Checked = false;
|
||
checkBox_BXG_LAD.Checked = false;
|
||
checkBox_BXG_LCX.Checked = false;
|
||
checkBox_BXG_RCA.Checked = false;
|
||
checkBox_ASPL.Checked = false;
|
||
checkBox_LCGL.Checked = false;
|
||
checkBox_TGRL.Checked = false;
|
||
checkBox_RSTD.Checked = false;
|
||
checkBox_YLRTD.Checked = false;
|
||
checkBox_QTTD.Checked = false;
|
||
checkBox_GXY.Checked = false;
|
||
checkBox_TLB.Checked = false;
|
||
checkBox_XS.Checked = false;
|
||
checkBox_GLXZ.Checked = false;
|
||
checkBox_GZXZ.Checked = false;
|
||
}
|
||
|
||
private void gridView_FollowUpVisit_RowCellStyle(object sender, RowCellStyleEventArgs e)
|
||
{
|
||
GridView View = sender as GridView;
|
||
//随访状态
|
||
if (e.Column.FieldName == "FollowUpStatus")
|
||
{
|
||
int value = PublicClass.ToInt32(e.CellValue, 0);
|
||
switch (value)
|
||
{
|
||
case 0:
|
||
e.Appearance.BackColor = Color.Red;
|
||
e.Appearance.BackColor2 = Color.FromArgb(255, 255, 255);
|
||
break;
|
||
case 1:
|
||
e.Appearance.BackColor = Color.Green;
|
||
e.Appearance.BackColor2 = Color.FromArgb(255, 255, 255);
|
||
break;
|
||
default:
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// 自定义显示
|
||
/// </summary>
|
||
/// <param name="sender"></param>
|
||
/// <param name="e"></param>
|
||
private void gridView_FollowUpVisit_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
|
||
{
|
||
GridView View = sender as GridView;
|
||
//随访状态
|
||
if (e.Column.FieldName == "FollowUpStatus")
|
||
{
|
||
int value = PublicClass.ToInt32(e.Value, 0);
|
||
switch (value)
|
||
{
|
||
case 0:
|
||
e.DisplayText = "未随访";
|
||
break;
|
||
case 1:
|
||
e.DisplayText = "已随访";
|
||
break;
|
||
default:
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
|
||
private void simpleButton_ViewDrugs_Click(object sender, EventArgs e)
|
||
{
|
||
Form form = PublicHelp.GetReflection("HL_FristAidPlatform_ChestPain", "Form_ChestPain_OutDrug", Cur_PatientID);
|
||
form.ShowDialog();
|
||
}
|
||
|
||
private void simpleButton_ViewOperation_Click(object sender, EventArgs e)
|
||
{
|
||
Form form = PublicHelp.GetReflection("HL_FristAidPlatform_ChestPain", "Form_ChestPain_CoronaryAngiographie", Cur_PatientID);
|
||
form.ShowDialog();
|
||
}
|
||
|
||
private void simpleButton_ECG_Click(object sender, EventArgs e)
|
||
{
|
||
MdiChildrenClose();
|
||
if (!ShowChildrenForm("HL_FristAidPlatform_DynamicElectrocardiogram"))
|
||
{
|
||
loading.ShowMessage("请稍候", "正在加载【" + label_name.Text + "】的心电监测...");
|
||
Form_DynamicElectrocardiogramDetailed form = new Form_DynamicElectrocardiogramDetailed(label_name.Text, label_age.Text, label_sex.Text, Cur_PatientDT.Rows[0]["WardshipId"]+"");
|
||
//form.WindowState = FormWindowState.Maximized;
|
||
//form.MdiParent = this;
|
||
form.Show();
|
||
loading.HideMessage();
|
||
}
|
||
}
|
||
#region 方法
|
||
/// <summary>
|
||
/// 防止打开多个窗体
|
||
/// </summary>
|
||
/// <param name="p_ChildrenFormText">窗体名称</param>
|
||
/// <returns></returns>
|
||
private bool ShowChildrenForm(string p_ChildrenFormText)
|
||
{
|
||
int i;
|
||
//依次检测当前窗体的子窗体
|
||
for (i = 0; i < MdiChildren.Length; i++)
|
||
{
|
||
//判断当前子窗体的Text属性值是否与传入的字符串值相同
|
||
if (MdiChildren[i].Name == p_ChildrenFormText)
|
||
{
|
||
//如果值相同则表示此子窗体为想要调用的子窗体,激活此子窗体并返回true值
|
||
MdiChildren[i].Activate();
|
||
return true;
|
||
}
|
||
}
|
||
//如果没有相同的值则表示要调用的子窗体还没有被打开,返回false值
|
||
return false;
|
||
}
|
||
public void MdiChildrenClose()
|
||
{
|
||
//关闭所有已经打开的子窗体
|
||
if (MdiChildren.Length > 0)
|
||
{
|
||
foreach (Form myForm in this.MdiChildren)
|
||
{
|
||
myForm.Close();
|
||
}
|
||
}
|
||
}
|
||
#endregion
|
||
|
||
private void simpleButton_EMR_Click(object sender, EventArgs e)
|
||
{
|
||
loading.ShowMessage();
|
||
Form form = PublicHelp.GetReflection("HL_FristAidPlatform_ChestPain", "Form_ChestPain_Main", Cur_PatientID, Information.Hospital.GUID);
|
||
form.MdiParent = this.MdiParent;
|
||
form.Show();
|
||
loading.HideMessage();
|
||
}
|
||
}
|
||
}
|