1 | using System;
|
---|
2 | using System.Drawing;
|
---|
3 | using System.Collections;
|
---|
4 | using System.ComponentModel;
|
---|
5 | using System.Windows.Forms;
|
---|
6 | using IndianHealthService.BMXNet;
|
---|
7 | using System.Data;
|
---|
8 |
|
---|
9 | namespace IndianHealthService.ClinicalScheduling
|
---|
10 | {
|
---|
11 | /// <summary>
|
---|
12 | /// Summary description for DPatientApptDisplay.
|
---|
13 | /// </summary>
|
---|
14 | public class DPatientApptDisplay : System.Windows.Forms.Form
|
---|
15 | {
|
---|
16 | private System.Windows.Forms.Panel panel1;
|
---|
17 | private System.Windows.Forms.CheckBox chkIncludePast;
|
---|
18 | private DataGridView dataGridView1;
|
---|
19 | /// <summary>
|
---|
20 | /// Required designer variable.
|
---|
21 | /// </summary>
|
---|
22 | private System.ComponentModel.Container components = null;
|
---|
23 |
|
---|
24 | public void InitializeForm(CGDocumentManager docManager, int nPatientID)
|
---|
25 | {
|
---|
26 | try
|
---|
27 | {
|
---|
28 | string sSql = "BSDX PATIENT APPT DISPLAY^" + nPatientID.ToString();
|
---|
29 | DataTable dtAppt = docManager.RPMSDataTable(sSql, "PatientAppts");
|
---|
30 | dataGridView1.DataSource = dtAppt;
|
---|
31 | }
|
---|
32 | catch (Exception ex)
|
---|
33 | {
|
---|
34 | MessageBox.Show(ex.Message);
|
---|
35 | }
|
---|
36 | }
|
---|
37 |
|
---|
38 | public DPatientApptDisplay()
|
---|
39 | {
|
---|
40 | InitializeComponent();
|
---|
41 | }
|
---|
42 |
|
---|
43 | /// <summary>
|
---|
44 | /// Clean up any resources being used.
|
---|
45 | /// </summary>
|
---|
46 | protected override void Dispose( bool disposing )
|
---|
47 | {
|
---|
48 | if( disposing )
|
---|
49 | {
|
---|
50 | if(components != null)
|
---|
51 | {
|
---|
52 | components.Dispose();
|
---|
53 | }
|
---|
54 | }
|
---|
55 | base.Dispose( disposing );
|
---|
56 | }
|
---|
57 |
|
---|
58 | #region Windows Form Designer generated code
|
---|
59 | /// <summary>
|
---|
60 | /// Required method for Designer support - do not modify
|
---|
61 | /// the contents of this method with the code editor.
|
---|
62 | /// </summary>
|
---|
63 | private void InitializeComponent()
|
---|
64 | {
|
---|
65 | this.panel1 = new System.Windows.Forms.Panel();
|
---|
66 | this.chkIncludePast = new System.Windows.Forms.CheckBox();
|
---|
67 | this.dataGridView1 = new System.Windows.Forms.DataGridView();
|
---|
68 | this.panel1.SuspendLayout();
|
---|
69 | ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
|
---|
70 | this.SuspendLayout();
|
---|
71 | //
|
---|
72 | // panel1
|
---|
73 | //
|
---|
74 | this.panel1.Controls.Add(this.chkIncludePast);
|
---|
75 | this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
|
---|
76 | this.panel1.Location = new System.Drawing.Point(0, 0);
|
---|
77 | this.panel1.Name = "panel1";
|
---|
78 | this.panel1.Size = new System.Drawing.Size(664, 32);
|
---|
79 | this.panel1.TabIndex = 1;
|
---|
80 | //
|
---|
81 | // chkIncludePast
|
---|
82 | //
|
---|
83 | this.chkIncludePast.Location = new System.Drawing.Point(16, 8);
|
---|
84 | this.chkIncludePast.Name = "chkIncludePast";
|
---|
85 | this.chkIncludePast.Size = new System.Drawing.Size(184, 16);
|
---|
86 | this.chkIncludePast.TabIndex = 0;
|
---|
87 | this.chkIncludePast.Text = "Include Past Appointments";
|
---|
88 | this.chkIncludePast.CheckedChanged += new System.EventHandler(this.chkIncludePast_CheckedChanged);
|
---|
89 | //
|
---|
90 | // dataGridView1
|
---|
91 | //
|
---|
92 | this.dataGridView1.AllowUserToAddRows = false;
|
---|
93 | this.dataGridView1.AllowUserToDeleteRows = false;
|
---|
94 | this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
---|
95 | this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
|
---|
96 | this.dataGridView1.Location = new System.Drawing.Point(0, 32);
|
---|
97 | this.dataGridView1.Name = "dataGridView1";
|
---|
98 | this.dataGridView1.ReadOnly = true;
|
---|
99 | this.dataGridView1.Size = new System.Drawing.Size(664, 446);
|
---|
100 | this.dataGridView1.TabIndex = 2;
|
---|
101 | //
|
---|
102 | // DPatientApptDisplay
|
---|
103 | //
|
---|
104 | this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
|
---|
105 | this.ClientSize = new System.Drawing.Size(664, 478);
|
---|
106 | this.Controls.Add(this.dataGridView1);
|
---|
107 | this.Controls.Add(this.panel1);
|
---|
108 | this.Name = "DPatientApptDisplay";
|
---|
109 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
---|
110 | this.Text = "Patient Appointments";
|
---|
111 | this.panel1.ResumeLayout(false);
|
---|
112 | ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
|
---|
113 | this.ResumeLayout(false);
|
---|
114 |
|
---|
115 | }
|
---|
116 | #endregion
|
---|
117 |
|
---|
118 | private void chkIncludePast_CheckedChanged(object sender, System.EventArgs e)
|
---|
119 | {
|
---|
120 | if (chkIncludePast.Checked == true)
|
---|
121 | {
|
---|
122 | //this.crViewer1.SelectionFormula = "TRUE"; //MJL 9/11/2007
|
---|
123 | }
|
---|
124 | else
|
---|
125 | {
|
---|
126 | //crViewer1.SelectionFormula = "{PatientAppts.ApptDate} >= CurrentDate";
|
---|
127 | }
|
---|
128 | //crViewer1.RefreshReport();
|
---|
129 | }
|
---|
130 | }
|
---|
131 | }
|
---|