source: Scheduling/trunk/cs/bsdx0200GUISourceCode/DNoShow.cs@ 798

Last change on this file since 798 was 614, checked in by Sam Habiel, 15 years ago

Initial committ of scheduling package

File size: 14.2 KB
RevLine 
[614]1using System;
2using System.Drawing;
3using System.Collections;
4using System.ComponentModel;
5using System.Windows.Forms;
6
7namespace IndianHealthService.ClinicalScheduling
8{
9 /// <summary>
10 /// Summary description for DAutoRebook.
11 /// </summary>
12 public class DNoShow : System.Windows.Forms.Form
13 {
14 private System.Windows.Forms.Panel pnlPageBottom;
15 private System.Windows.Forms.Button cmdCancel;
16 private System.Windows.Forms.Button cmdOK;
17 private System.Windows.Forms.Panel pnlDescription;
18 private System.Windows.Forms.GroupBox grpDescriptionResourceGroup;
19 private System.Windows.Forms.Label lblDescriptionResourceGroup;
20 private System.Windows.Forms.GroupBox grpAutoRebook;
21 private System.Windows.Forms.Label label6;
22 private System.Windows.Forms.Label lblRebookSelectedType;
23 private System.Windows.Forms.RadioButton rdoRebookSameType;
24 private System.Windows.Forms.Label label3;
25 private System.Windows.Forms.NumericUpDown udMax;
26 private System.Windows.Forms.NumericUpDown udStart;
27 private System.Windows.Forms.CheckBox chkAutoRebook;
28 private System.Windows.Forms.Label label4;
29 private System.Windows.Forms.RadioButton rdoRebookAnyType;
30 private System.Windows.Forms.RadioButton rdoRebookSelectedType;
31 /// <summary>
32 /// Required designer variable.
33 /// </summary>
34 private System.ComponentModel.Container components = null;
35
36
37 #region Fields
38
39
40 private bool m_bAutoRebook = false;
41 private int m_nStart = 7;
42 private int m_nMax = 30;
43
44 // -1: use current, -2: use any non-zero type, >0 use this access type id
45 private int m_nRebookAccessType = -1;
46
47
48 #endregion Fields
49
50 #region Methods
51
52 public void InitializePage()
53 {
54 UpdateDialogData(true);
55 }
56
57 /// <summary>
58 /// If b is true, moves member vars into control data
59 /// otherwise, moves control data into member vars
60 /// </summary>
61 /// <param name="b"></param>
62 private void UpdateDialogData(bool b)
63 {
64 if (b == true)
65 {
66 chkAutoRebook.Checked = m_bAutoRebook;
67 udStart.Value = m_nStart;
68 udMax.Value = m_nMax;
69
70 this.rdoRebookSameType.Checked = true;
71 this.rdoRebookAnyType.Checked = false;
72 this.rdoRebookSelectedType.Checked = false;
73 }
74 else
75 {
76 m_bAutoRebook = chkAutoRebook.Checked;
77 m_nStart = (int) udStart.Value;
78 m_nMax = (int) udMax.Value;
79 if (this.rdoRebookSameType.Checked == true)
80 {
81 m_nRebookAccessType = -1;
82 }
83 else
84 {
85 m_nRebookAccessType = -2;
86 }
87
88 }
89 }
90
91
92 public DNoShow()
93 {
94 //
95 // Required for Windows Form Designer support
96 //
97 InitializeComponent();
98
99 //
100 // TODO: Add any constructor code after InitializeComponent call
101 //
102 }
103
104 /// <summary>
105 /// Clean up any resources being used.
106 /// </summary>
107 protected override void Dispose( bool disposing )
108 {
109 if( disposing )
110 {
111 if(components != null)
112 {
113 components.Dispose();
114 }
115 }
116 base.Dispose( disposing );
117 }
118
119 private void cmdOK_Click(object sender, System.EventArgs e)
120 {
121 this.UpdateDialogData(false);
122 }
123
124 #endregion Methods
125
126 #region Properties
127
128 /// <summary>
129 /// Sets or returns the rebook access type: -1 = use current type, -2 = use any type, 0 = prompt for a type
130 /// </summary>
131 public int RebookAccessType
132 {
133 get
134 {
135 return m_nRebookAccessType;
136 }
137 set
138 {
139 m_nRebookAccessType = value;
140 if (m_nRebookAccessType == -1)
141 {
142 this.rdoRebookSameType.Checked = true;
143 }
144 else
145 {
146 this.rdoRebookAnyType.Checked = true;
147 }
148
149 }
150 }
151
152 /// <summary>
153 /// Returns value of AutoRebook check box
154 /// </summary>
155 public bool AutoRebook
156 {
157 get
158 {
159 return m_bAutoRebook;
160 }
161 set
162 {
163 m_bAutoRebook = value;
164 }
165 }
166
167 /// <summary>
168 /// Sets or returns the number of days in the future to start searching for availability
169 /// </summary>
170 public int RebookStartDays
171 {
172 get
173 {
174 return m_nStart;
175 }
176 set
177 {
178 m_nStart = value;
179 }
180 }
181
182 /// <summary>
183 /// Sets and returns the maximum number of days in the future to look for rebook availability
184 /// </summary>
185 public int RebookMaxDays
186 {
187 get
188 {
189 return m_nMax;
190 }
191 set
192 {
193 m_nMax = value;
194 }
195 }
196
197
198 #endregion Properties
199
200 #region Windows Form Designer generated code
201 /// <summary>
202 /// Required method for Designer support - do not modify
203 /// the contents of this method with the code editor.
204 /// </summary>
205 private void InitializeComponent()
206 {
207 this.pnlPageBottom = new System.Windows.Forms.Panel();
208 this.cmdCancel = new System.Windows.Forms.Button();
209 this.cmdOK = new System.Windows.Forms.Button();
210 this.pnlDescription = new System.Windows.Forms.Panel();
211 this.grpDescriptionResourceGroup = new System.Windows.Forms.GroupBox();
212 this.lblDescriptionResourceGroup = new System.Windows.Forms.Label();
213 this.grpAutoRebook = new System.Windows.Forms.GroupBox();
214 this.label6 = new System.Windows.Forms.Label();
215 this.lblRebookSelectedType = new System.Windows.Forms.Label();
216 this.rdoRebookSameType = new System.Windows.Forms.RadioButton();
217 this.label3 = new System.Windows.Forms.Label();
218 this.udMax = new System.Windows.Forms.NumericUpDown();
219 this.udStart = new System.Windows.Forms.NumericUpDown();
220 this.chkAutoRebook = new System.Windows.Forms.CheckBox();
221 this.label4 = new System.Windows.Forms.Label();
222 this.rdoRebookAnyType = new System.Windows.Forms.RadioButton();
223 this.rdoRebookSelectedType = new System.Windows.Forms.RadioButton();
224 this.pnlPageBottom.SuspendLayout();
225 this.pnlDescription.SuspendLayout();
226 this.grpDescriptionResourceGroup.SuspendLayout();
227 this.grpAutoRebook.SuspendLayout();
228 ((System.ComponentModel.ISupportInitialize)(this.udMax)).BeginInit();
229 ((System.ComponentModel.ISupportInitialize)(this.udStart)).BeginInit();
230 this.SuspendLayout();
231 //
232 // pnlPageBottom
233 //
234 this.pnlPageBottom.Controls.Add(this.cmdCancel);
235 this.pnlPageBottom.Controls.Add(this.cmdOK);
236 this.pnlPageBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
237 this.pnlPageBottom.Location = new System.Drawing.Point(0, 366);
238 this.pnlPageBottom.Name = "pnlPageBottom";
239 this.pnlPageBottom.Size = new System.Drawing.Size(344, 40);
240 this.pnlPageBottom.TabIndex = 7;
241 //
242 // cmdCancel
243 //
244 this.cmdCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
245 this.cmdCancel.Location = new System.Drawing.Point(256, 8);
246 this.cmdCancel.Name = "cmdCancel";
247 this.cmdCancel.Size = new System.Drawing.Size(56, 24);
248 this.cmdCancel.TabIndex = 2;
249 this.cmdCancel.Text = "Cancel";
250 //
251 // cmdOK
252 //
253 this.cmdOK.DialogResult = System.Windows.Forms.DialogResult.OK;
254 this.cmdOK.Location = new System.Drawing.Point(176, 8);
255 this.cmdOK.Name = "cmdOK";
256 this.cmdOK.Size = new System.Drawing.Size(64, 24);
257 this.cmdOK.TabIndex = 1;
258 this.cmdOK.Text = "OK";
259 this.cmdOK.Click += new System.EventHandler(this.cmdOK_Click);
260 //
261 // pnlDescription
262 //
263 this.pnlDescription.Controls.Add(this.grpDescriptionResourceGroup);
264 this.pnlDescription.Dock = System.Windows.Forms.DockStyle.Bottom;
265 this.pnlDescription.Location = new System.Drawing.Point(0, 294);
266 this.pnlDescription.Name = "pnlDescription";
267 this.pnlDescription.Size = new System.Drawing.Size(344, 72);
268 this.pnlDescription.TabIndex = 8;
269 //
270 // grpDescriptionResourceGroup
271 //
272 this.grpDescriptionResourceGroup.Controls.Add(this.lblDescriptionResourceGroup);
273 this.grpDescriptionResourceGroup.Dock = System.Windows.Forms.DockStyle.Fill;
274 this.grpDescriptionResourceGroup.Location = new System.Drawing.Point(0, 0);
275 this.grpDescriptionResourceGroup.Name = "grpDescriptionResourceGroup";
276 this.grpDescriptionResourceGroup.Size = new System.Drawing.Size(344, 72);
277 this.grpDescriptionResourceGroup.TabIndex = 1;
278 this.grpDescriptionResourceGroup.TabStop = false;
279 this.grpDescriptionResourceGroup.Text = "Description";
280 //
281 // lblDescriptionResourceGroup
282 //
283 this.lblDescriptionResourceGroup.Dock = System.Windows.Forms.DockStyle.Fill;
284 this.lblDescriptionResourceGroup.Location = new System.Drawing.Point(3, 16);
285 this.lblDescriptionResourceGroup.Name = "lblDescriptionResourceGroup";
286 this.lblDescriptionResourceGroup.Size = new System.Drawing.Size(338, 53);
287 this.lblDescriptionResourceGroup.TabIndex = 0;
288 this.lblDescriptionResourceGroup.Text = "Use this panel mark an appointment as a no-show. To automatically rebook no-show " +
289 "appointments, check the Auto Rebook box. The Start Time in Days and Maximum Day" +
290 "s values control the time window for rebooked appointments.";
291 //
292 // grpAutoRebook
293 //
294 this.grpAutoRebook.Controls.Add(this.label6);
295 this.grpAutoRebook.Controls.Add(this.lblRebookSelectedType);
296 this.grpAutoRebook.Controls.Add(this.rdoRebookSameType);
297 this.grpAutoRebook.Controls.Add(this.label3);
298 this.grpAutoRebook.Controls.Add(this.udMax);
299 this.grpAutoRebook.Controls.Add(this.udStart);
300 this.grpAutoRebook.Controls.Add(this.chkAutoRebook);
301 this.grpAutoRebook.Controls.Add(this.label4);
302 this.grpAutoRebook.Controls.Add(this.rdoRebookAnyType);
303 this.grpAutoRebook.Controls.Add(this.rdoRebookSelectedType);
304 this.grpAutoRebook.Location = new System.Drawing.Point(32, 24);
305 this.grpAutoRebook.Name = "grpAutoRebook";
306 this.grpAutoRebook.Size = new System.Drawing.Size(272, 248);
307 this.grpAutoRebook.TabIndex = 14;
308 this.grpAutoRebook.TabStop = false;
309 this.grpAutoRebook.Text = "Auto Rebook";
310 //
311 // label6
312 //
313 this.label6.Location = new System.Drawing.Point(16, 128);
314 this.label6.Name = "label6";
315 this.label6.Size = new System.Drawing.Size(232, 16);
316 this.label6.TabIndex = 19;
317 this.label6.Text = "Access Type for Rebooked Appointment:";
318 //
319 // lblRebookSelectedType
320 //
321 this.lblRebookSelectedType.Enabled = false;
322 this.lblRebookSelectedType.Location = new System.Drawing.Point(64, 224);
323 this.lblRebookSelectedType.Name = "lblRebookSelectedType";
324 this.lblRebookSelectedType.Size = new System.Drawing.Size(168, 16);
325 this.lblRebookSelectedType.TabIndex = 18;
326 //
327 // rdoRebookSameType
328 //
329 this.rdoRebookSameType.Checked = true;
330 this.rdoRebookSameType.Location = new System.Drawing.Point(24, 152);
331 this.rdoRebookSameType.Name = "rdoRebookSameType";
332 this.rdoRebookSameType.Size = new System.Drawing.Size(160, 16);
333 this.rdoRebookSameType.TabIndex = 17;
334 this.rdoRebookSameType.TabStop = true;
335 this.rdoRebookSameType.Text = "Same as Current";
336 //
337 // label3
338 //
339 this.label3.Location = new System.Drawing.Point(88, 56);
340 this.label3.Name = "label3";
341 this.label3.Size = new System.Drawing.Size(104, 16);
342 this.label3.TabIndex = 16;
343 this.label3.Text = "Start time in Days";
344 //
345 // udMax
346 //
347 this.udMax.Increment = new System.Decimal(new int[] {
348 7,
349 0,
350 0,
351 0});
352 this.udMax.Location = new System.Drawing.Point(16, 88);
353 this.udMax.Maximum = new System.Decimal(new int[] {
354 730,
355 0,
356 0,
357 0});
358 this.udMax.Minimum = new System.Decimal(new int[] {
359 1,
360 0,
361 0,
362 0});
363 this.udMax.Name = "udMax";
364 this.udMax.Size = new System.Drawing.Size(56, 20);
365 this.udMax.TabIndex = 15;
366 this.udMax.Value = new System.Decimal(new int[] {
367 30,
368 0,
369 0,
370 0});
371 //
372 // udStart
373 //
374 this.udStart.Location = new System.Drawing.Point(16, 54);
375 this.udStart.Maximum = new System.Decimal(new int[] {
376 730,
377 0,
378 0,
379 0});
380 this.udStart.Name = "udStart";
381 this.udStart.Size = new System.Drawing.Size(56, 20);
382 this.udStart.TabIndex = 14;
383 this.udStart.Value = new System.Decimal(new int[] {
384 14,
385 0,
386 0,
387 0});
388 //
389 // chkAutoRebook
390 //
391 this.chkAutoRebook.Location = new System.Drawing.Point(16, 24);
392 this.chkAutoRebook.Name = "chkAutoRebook";
393 this.chkAutoRebook.Size = new System.Drawing.Size(120, 16);
394 this.chkAutoRebook.TabIndex = 13;
395 this.chkAutoRebook.Text = "Auto Rebook";
396 //
397 // label4
398 //
399 this.label4.Location = new System.Drawing.Point(88, 88);
400 this.label4.Name = "label4";
401 this.label4.Size = new System.Drawing.Size(104, 16);
402 this.label4.TabIndex = 16;
403 this.label4.Text = "Maximum Days";
404 //
405 // rdoRebookAnyType
406 //
407 this.rdoRebookAnyType.Location = new System.Drawing.Point(24, 176);
408 this.rdoRebookAnyType.Name = "rdoRebookAnyType";
409 this.rdoRebookAnyType.Size = new System.Drawing.Size(160, 16);
410 this.rdoRebookAnyType.TabIndex = 17;
411 this.rdoRebookAnyType.Text = "Any Access Type";
412 //
413 // rdoRebookSelectedType
414 //
415 this.rdoRebookSelectedType.Enabled = false;
416 this.rdoRebookSelectedType.Location = new System.Drawing.Point(24, 200);
417 this.rdoRebookSelectedType.Name = "rdoRebookSelectedType";
418 this.rdoRebookSelectedType.Size = new System.Drawing.Size(136, 16);
419 this.rdoRebookSelectedType.TabIndex = 17;
420 this.rdoRebookSelectedType.Text = "Selected Access Type:";
421 //
422 // DNoShow
423 //
424 this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
425 this.ClientSize = new System.Drawing.Size(344, 406);
426 this.Controls.Add(this.grpAutoRebook);
427 this.Controls.Add(this.pnlDescription);
428 this.Controls.Add(this.pnlPageBottom);
429 this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
430 this.Name = "DNoShow";
431 this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
432 this.Text = "No Show Appointment";
433 this.pnlPageBottom.ResumeLayout(false);
434 this.pnlDescription.ResumeLayout(false);
435 this.grpDescriptionResourceGroup.ResumeLayout(false);
436 this.grpAutoRebook.ResumeLayout(false);
437 ((System.ComponentModel.ISupportInitialize)(this.udMax)).EndInit();
438 ((System.ComponentModel.ISupportInitialize)(this.udStart)).EndInit();
439 this.ResumeLayout(false);
440
441 }
442 #endregion
443
444
445 }
446}
Note: See TracBrowser for help on using the repository browser.