source: Scheduling/branches/Radiology-Support/cs/bsdx0200GUISourceCode/CGAppointments.cs@ 1155

Last change on this file since 1155 was 1095, checked in by Sam Habiel, 14 years ago

Remove CGSchedLib.OutputArray everywhere. Used to be needed in VS 2003; not anymore as you can see tables now.
CalendarGrid:

  • Make MinSince80 and TimesOverlap static functions for use by other classes since they are done over and over again.

CGAppointments:

  • Documentation updates

CGAVDocument:

CGDocument:

CGDocumentManager:

CGSchedLib: Lots of Changes

CGView:

  • OnUpdateScheduleCallback now has try catch when it this.Invokes the original form so that it won't crash if the form has been closed before it gets called.
File size: 1.9 KB
Line 
1namespace IndianHealthService.ClinicalScheduling
2{
3 using System;
4 using System.Collections;
5 /// <summary>
6 /// Managers Appointment objects CGAppointment using an array list internally.
7 /// </summary>
8 /// <remarks>
9 /// Really needs to be refactored to use generics
10 /// </remarks>
11 [Serializable]
12 public class CGAppointments : IEnumerable, ICloneable
13 {
14 private Hashtable apptList = new Hashtable();
15
16 public void AddAppointment(CGAppointment appt)
17 {
18 if (this.apptList.ContainsKey(appt.AppointmentKey))
19 {
20 this.apptList.Remove(appt.AppointmentKey);
21 }
22 this.apptList.Add(appt.AppointmentKey, appt);
23 }
24
25 public void ClearAllAppointments()
26 {
27 this.apptList.Clear();
28 }
29
30 public CGAppointment GetAppointment(int nKey)
31 {
32 return (CGAppointment) this.apptList[nKey];
33 }
34
35 public IEnumerator GetEnumerator()
36 {
37 return this.apptList.GetEnumerator();
38 }
39
40 public void RemoveAppointment(int nKey)
41 {
42 this.apptList.Remove(nKey);
43 }
44
45 public int AppointmentCount
46 {
47 get
48 {
49 return this.apptList.Count;
50 }
51 }
52
53 public Hashtable AppointmentTable
54 {
55 get
56 {
57 return this.apptList;
58 }
59 }
60
61
62 /// <summary>
63 /// Returns a deep copy of CGAppointments
64 /// </summary>
65 /// <returns></returns>
66 public object Clone()
67 {
68 CGAppointments newappts = new CGAppointments();
69 foreach (DictionaryEntry d in this.apptList)
70 {
71 newappts.apptList.Add(d.Key, d.Value);
72 }
73
74 return newappts;
75 }
76 }
77}
78
Note: See TracBrowser for help on using the repository browser.