VistA-Scheduling/cs/bsdx0200GUISourceCode/CGAppointments.cs

71 lines
1.8 KiB
C#

namespace IndianHealthService.ClinicalScheduling
{
using System;
using System.Collections;
/// <summary>
/// This class was regenerated from Calendargrid.dll using Reflector.exe
/// by Sam Habiel for WorldVista. The original source code is lost.
/// </summary>
[Serializable]
public class CGAppointments : IEnumerable, ICloneable
{
private Hashtable apptList = new Hashtable();
public void AddAppointment(CGAppointment appt)
{
if (this.apptList.ContainsKey(appt.AppointmentKey))
{
this.apptList.Remove(appt.AppointmentKey);
}
this.apptList.Add(appt.AppointmentKey, appt);
}
public void ClearAllAppointments()
{
this.apptList.Clear();
}
public CGAppointment GetAppointment(int nKey)
{
return (CGAppointment) this.apptList[nKey];
}
public IEnumerator GetEnumerator()
{
return this.apptList.GetEnumerator();
}
public void RemoveAppointment(int nKey)
{
this.apptList.Remove(nKey);
}
public int AppointmentCount
{
get
{
return this.apptList.Count;
}
}
public Hashtable AppointmentTable
{
get
{
return this.apptList;
}
}
//smh test
//one problem: Hashtable is a shallow copy.
//so it shouldn't work. But let's see.
public object Clone()
{
CGAppointments appts = new CGAppointments();
appts.apptList = (Hashtable)apptList.Clone();
return appts;
}
}
}