source: Scheduling/trunk/cs/bsdx0200GUISourceCode/CGAppointments.cs@ 1091

Last change on this file since 1091 was 1083, checked in by Sam Habiel, 13 years ago

New exe and dll
calendarGrid: Minor documentation updates.
CGAppointments: Object now supports Deep cloning
CGDocument:

  1. Major changes on how m_pAvArrays is handled. Now it is locked whenever it is updated or queried. Some refactoring to make sure there are no db calls during the locks so that the locks won't be expensive.
  2. Removed ClearResources, an unused method.
  3. Appointment aCopy walkin property is set to true if the appointment is a walkin. This makes sure that the grid draws it correctly between it is added to the appointment array and we fetch new data from the server.
  4. Create appointment is not responsible anymore for requesting updates from the server. All requests to update data must be done through CGView, as it is the only party interested in displaying accurate data on the grid. Just send the create appt event to the server.
  5. CheckInAppointment: Same thing. Now responsible for requesting updates from the server. Just send the checkin event to the server.

CGDocumentManager: Removed tracing. Done in BMX Library only now.
CGView:

  1. CGAppointment fetched from Document, not from the copy maintained by the calendarGrid.
  2. RefreshDocument calls before an appointment is made have been removed (need to find another way to make sure that the appointment has just not been booked). RefreshDocument & UpdateArrays are called async after appointments are made.
  3. Appointment List passed to Calendar grid is now a copy, to prevent issues with concurrent access.
  4. Message if a patient has apppointment at the same time vastly improved.
File size: 1.8 KB
Line 
1namespace IndianHealthService.ClinicalScheduling
2{
3 using System;
4 using System.Collections;
5 /// <summary>
6 /// This class was regenerated from Calendargrid.dll using Reflector.exe
7 /// by Sam Habiel for WorldVista. The original source code is lost.
8 /// </summary>
9 [Serializable]
10 public class CGAppointments : IEnumerable, ICloneable
11 {
12 private Hashtable apptList = new Hashtable();
13
14 public void AddAppointment(CGAppointment appt)
15 {
16 if (this.apptList.ContainsKey(appt.AppointmentKey))
17 {
18 this.apptList.Remove(appt.AppointmentKey);
19 }
20 this.apptList.Add(appt.AppointmentKey, appt);
21 }
22
23 public void ClearAllAppointments()
24 {
25 this.apptList.Clear();
26 }
27
28 public CGAppointment GetAppointment(int nKey)
29 {
30 return (CGAppointment) this.apptList[nKey];
31 }
32
33 public IEnumerator GetEnumerator()
34 {
35 return this.apptList.GetEnumerator();
36 }
37
38 public void RemoveAppointment(int nKey)
39 {
40 this.apptList.Remove(nKey);
41 }
42
43 public int AppointmentCount
44 {
45 get
46 {
47 return this.apptList.Count;
48 }
49 }
50
51 public Hashtable AppointmentTable
52 {
53 get
54 {
55 return this.apptList;
56 }
57 }
58
59
60 public object Clone()
61 {
62 CGAppointments newappts = new CGAppointments();
63 foreach (DictionaryEntry d in this.apptList)
64 {
65 newappts.apptList.Add(d.Key, d.Value);
66 }
67
68 return newappts;
69 }
70 }
71}
72
Note: See TracBrowser for help on using the repository browser.