-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfrmPatientTreatments.cs
73 lines (59 loc) · 2.41 KB
/
frmPatientTreatments.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
using System;
using System.Windows.Forms;
namespace ReflexPro
{
public partial class frmPatientTreatments : Form
{
public frmPatientTreatments()
{
InitializeComponent();
}
private static frmPatientTreatments _instance;
public static frmPatientTreatments GetInstance()
{
if (_instance == null) _instance = new frmPatientTreatments();
return _instance;
}
private void llNewTreatment_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
Variables.giSelectedPatientTreatmentID = 0;
frmTreatmentMap frmTM = new frmTreatmentMap();
frmTM.Show();
}
private void frmPatientTreatments_Load(object sender, EventArgs e)
{
LoadPatientTreatments();
}
//pkID,TreatmentDate, TreatmentCompleted FROM dbreflexpro.treatmentrecords where fkPatientRecordID
private void LoadPatientTreatments()
{
try
{
string sSQL = "Select pkID as TreatmentRecord,TreatmentDate, TreatmentCompleted as Completed FROM dbreflexpro.treatmentrecords" +
" where fkPatientRecordID = " + Variables.giSelectedPatientRecordID;
System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
clsProcess cProc = new clsProcess();
cProc.LoadTreatmentList(sSQL, this.dgData);
cProc = null;
System.Windows.Forms.Cursor.Current = Cursors.Default;
this.lblPatientInfo.Text = Variables.gsPatientHeaderInfo;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Error loading Patient Treatment records", MessageBoxButtons.OK);
}
}
private void cmdClose_Click(object sender, EventArgs e)
{
this.Close();
this.Dispose();
}
private void dgData_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
Variables.giSelectedPatientTreatmentID = Convert.ToInt16(dgData.SelectedRows[0].Cells[0].Value);
Variables.gsTreatmentDate = Convert.ToString(dgData.SelectedRows[0].Cells[1].Value);
frmTreatmentMap frmTM = new frmTreatmentMap();
frmTM.Show();
}
}
}