StableVersion4.3/HL_FristAidPlatform_ChestPain/Form_InformedConsent.cs

92 lines
3.2 KiB
C#

using DevExpress.XtraEditors;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace HL_FristAidPlatform_ChestPain
{
public partial class Form_InformedConsent : XtraForm
{
public UserControl_CoronaryArtery coronaryArtery;
public UserControl_Thrombolysis thrombolysis;
public string patientGuid;
public string name;
public string age;
public string gender;
public string number;
public int saveFlage;
public Form_InformedConsent(string _patientGuid, string _name, string _age, string _gender, string _number)
{
InitializeComponent();
patientGuid = _patientGuid;
name = _name;
age = _age;
gender = _gender;
number = _number;
}
private void Form_InformedConsent_Load(object sender, EventArgs e)
{
coronaryArtery = new UserControl_CoronaryArtery(patientGuid, name, age, gender, "");
coronaryArtery.Parent = this.panel_Content;
coronaryArtery.Dock = DockStyle.Fill;
coronaryArtery.Show();
panel_Content.Controls.Add(coronaryArtery);
}
private void labelControl2_Click(object sender, EventArgs e)
{
saveFlage = 0;
labelControl2.BackColor = Color.FromArgb(45, 140, 240);
labelControl2.ForeColor = Color.White;
labelControl1.BackColor = Color.Transparent;
labelControl1.ForeColor = Color.FromArgb(40, 40, 40);
panel_Content.Controls.Clear();
coronaryArtery = new UserControl_CoronaryArtery(patientGuid, name, age, gender, number);
coronaryArtery.Parent = this.panel_Content;
coronaryArtery.Dock = DockStyle.Fill;
coronaryArtery.Show();
panel_Content.Controls.Add(coronaryArtery);
}
private void labelControl1_Click(object sender, EventArgs e)
{
saveFlage = 1;
labelControl1.BackColor = Color.FromArgb(45, 140, 240);
labelControl1.ForeColor = Color.White;
labelControl2.BackColor = Color.Transparent;
labelControl2.ForeColor = Color.FromArgb(40, 40, 40);
panel_Content.Controls.Clear();
thrombolysis = new UserControl_Thrombolysis(patientGuid, name, gender, age, number);
thrombolysis.Parent = this.panel_Content;
thrombolysis.Dock = DockStyle.Fill;
thrombolysis.Show();
}
private void simpleButton1_Click(object sender, EventArgs e)
{
if (saveFlage == 0)
coronaryArtery.SaveInformedConsent(0);
if (saveFlage == 1)
thrombolysis.SaveInformedConsent(0);
}
private void simpleButton2_Click(object sender, EventArgs e)
{
if (saveFlage == 0)
coronaryArtery.PrintInformedConsent();
if (saveFlage == 1)
thrombolysis.PrintInformedConsent();
}
}
}