Index: /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGAppointment.cs
===================================================================
--- /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGAppointment.cs	(revision 622)
+++ /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGAppointment.cs	(revision 622)
@@ -0,0 +1,305 @@
+﻿namespace IndianHealthService.ClinicalScheduling
+{
+    using System;
+    using System.Drawing;
+    /// <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 CGAppointment
+    {
+        private bool m_bAccessBlock;
+        private bool m_bNoShow;
+        private bool m_bSelected = false;
+        private bool m_bWalkIn;
+        public DateTime m_dAuxTime;
+        public DateTime m_dCheckIn;
+        private DateTime m_EndTime;
+        public int m_nAccessTypeID = -1;
+        private int m_nColumn;
+        public int m_nKey;
+        private string m_Note;
+        public int m_nPatientID;
+        public int m_nSlots;
+        private Rectangle m_rectangle;
+        public string m_sAccessTypeName;
+        private string m_sHRN = "";
+        private string m_sPatientName;
+        public string m_sResource;
+        private DateTime m_StartTime;
+        private string m_Text;
+
+        public void CreateAppointment(DateTime StartTime, DateTime EndTime, string Note, int Key, string sResource)
+        {
+            this.m_StartTime = StartTime;
+            this.m_EndTime = EndTime;
+            this.m_Note = Note;
+            this.m_nKey = Key;
+            this.m_sResource = sResource;
+        }
+
+        public override string ToString()
+        {
+            string patientName = "";
+            if (this.m_bAccessBlock)
+            {
+                string str2 = (this.Slots == 1) ? " Slot, " : " Slots, ";
+                return ((((this.AccessTypeName + ": ") + this.Slots.ToString() + str2) + this.Duration.ToString() + " Minutes. ") + this.Note);
+            }
+            patientName = this.PatientName;
+            if (this.HealthRecordNumber != "")
+            {
+                patientName = patientName + " #" + this.HealthRecordNumber;
+            }
+            return (patientName + " " + this.Note);
+        }
+
+        public int AccessTypeID
+        {
+            get
+            {
+                return this.m_nAccessTypeID;
+            }
+            set
+            {
+                this.m_nAccessTypeID = value;
+            }
+        }
+
+        public string AccessTypeName
+        {
+            get
+            {
+                return this.m_sAccessTypeName;
+            }
+            set
+            {
+                this.m_sAccessTypeName = value;
+            }
+        }
+
+        public int AppointmentKey
+        {
+            get
+            {
+                return this.m_nKey;
+            }
+            set
+            {
+                this.m_nKey = value;
+            }
+        }
+
+        public DateTime AuxTime
+        {
+            get
+            {
+                return this.m_dAuxTime;
+            }
+            set
+            {
+                this.m_dAuxTime = value;
+            }
+        }
+
+        public DateTime CheckInTime
+        {
+            get
+            {
+                return this.m_dCheckIn;
+            }
+            set
+            {
+                this.m_dCheckIn = value;
+            }
+        }
+
+        public int Duration
+        {
+            get
+            {
+                TimeSpan span = (TimeSpan) (this.EndTime - this.StartTime);
+                return (int) span.TotalMinutes;
+            }
+        }
+
+        public DateTime EndTime
+        {
+            get
+            {
+                return this.m_EndTime;
+            }
+            set
+            {
+                this.m_EndTime = value;
+            }
+        }
+
+        public int GridColumn
+        {
+            get
+            {
+                return this.m_nColumn;
+            }
+            set
+            {
+                this.m_nColumn = value;
+            }
+        }
+
+        public Rectangle GridRectangle
+        {
+            get
+            {
+                return this.m_rectangle;
+            }
+            set
+            {
+                this.m_rectangle = value;
+            }
+        }
+
+        public string HealthRecordNumber
+        {
+            get
+            {
+                return this.m_sHRN;
+            }
+            set
+            {
+                this.m_sHRN = value;
+            }
+        }
+
+        public bool IsAccessBlock
+        {
+            get
+            {
+                return this.m_bAccessBlock;
+            }
+            set
+            {
+                this.m_bAccessBlock = value;
+            }
+        }
+
+        public bool NoShow
+        {
+            get
+            {
+                return this.m_bNoShow;
+            }
+            set
+            {
+                this.m_bNoShow = value;
+            }
+        }
+
+        public string Note
+        {
+            get
+            {
+                return this.m_Note;
+            }
+            set
+            {
+                this.m_Note = value;
+            }
+        }
+
+        public int PatientID
+        {
+            get
+            {
+                return this.m_nPatientID;
+            }
+            set
+            {
+                this.m_nPatientID = value;
+            }
+        }
+
+        public string PatientName
+        {
+            get
+            {
+                return this.m_sPatientName;
+            }
+            set
+            {
+                this.m_sPatientName = value;
+            }
+        }
+
+        public string Resource
+        {
+            get
+            {
+                return this.m_sResource;
+            }
+            set
+            {
+                this.m_sResource = value;
+            }
+        }
+
+        public bool Selected
+        {
+            get
+            {
+                return this.m_bSelected;
+            }
+            set
+            {
+                this.m_bSelected = value;
+            }
+        }
+
+        public int Slots
+        {
+            get
+            {
+                return this.m_nSlots;
+            }
+            set
+            {
+                this.m_nSlots = value;
+            }
+        }
+
+        public DateTime StartTime
+        {
+            get
+            {
+                return this.m_StartTime;
+            }
+            set
+            {
+                this.m_StartTime = value;
+            }
+        }
+
+        public string Text
+        {
+            get
+            {
+                this.m_Text = this.m_sPatientName;
+                return this.m_Text;
+            }
+        }
+
+        public bool WalkIn
+        {
+            get
+            {
+                return this.m_bWalkIn;
+            }
+            set
+            {
+                this.m_bWalkIn = value;
+            }
+        }
+    }
+}
+
Index: /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGAppointmentChangedArgs.cs
===================================================================
--- /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGAppointmentChangedArgs.cs	(revision 622)
+++ /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGAppointmentChangedArgs.cs	(revision 622)
@@ -0,0 +1,104 @@
+﻿namespace IndianHealthService.ClinicalScheduling
+{
+    using System;
+    /// <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 CGAppointmentChangedArgs : EventArgs
+    {
+        private DateTime m_dEnd;
+        private DateTime m_dStart;
+        private int m_nAccessTypeID;
+        private int m_nSlots;
+        private CGAppointment m_pAppt;
+        private string m_sOldResource;
+        private string m_sResource;
+
+        public int AccessTypeID
+        {
+            get
+            {
+                return this.m_nAccessTypeID;
+            }
+            set
+            {
+                this.m_nAccessTypeID = value;
+            }
+        }
+
+        public CGAppointment Appointment
+        {
+            get
+            {
+                return this.m_pAppt;
+            }
+            set
+            {
+                this.m_pAppt = value;
+            }
+        }
+
+        public DateTime EndTime
+        {
+            get
+            {
+                return this.m_dEnd;
+            }
+            set
+            {
+                this.m_dEnd = value;
+            }
+        }
+
+        public string OldResource
+        {
+            get
+            {
+                return this.m_sOldResource;
+            }
+            set
+            {
+                this.m_sOldResource = value;
+            }
+        }
+
+        public string Resource
+        {
+            get
+            {
+                return this.m_sResource;
+            }
+            set
+            {
+                this.m_sResource = value;
+            }
+        }
+
+        public int Slots
+        {
+            get
+            {
+                return this.m_nSlots;
+            }
+            set
+            {
+                this.m_nSlots = value;
+            }
+        }
+
+        public DateTime StartTime
+        {
+            get
+            {
+                return this.m_dStart;
+            }
+            set
+            {
+                this.m_dStart = value;
+            }
+        }
+    }
+}
+
Index: /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGAppointmentChangedHandler.cs
===================================================================
--- /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGAppointmentChangedHandler.cs	(revision 622)
+++ /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGAppointmentChangedHandler.cs	(revision 622)
@@ -0,0 +1,11 @@
+﻿namespace IndianHealthService.ClinicalScheduling
+{
+    using System;
+    using System.Runtime.CompilerServices;
+    /// <summary>
+    /// This class was regenerated from Calendargrid.dll using Reflector.exe
+    /// by Sam Habiel for WorldVista. The original source code is lost.
+    /// </summary>
+    public delegate void CGAppointmentChangedHandler(object sender, CGAppointmentChangedArgs e);
+}
+
Index: /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGAppointments.cs
===================================================================
--- /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGAppointments.cs	(revision 622)
+++ /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGAppointments.cs	(revision 622)
@@ -0,0 +1,60 @@
+﻿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
+    {
+        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;
+            }
+        }
+    }
+}
+
Index: /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGAvailability.cs
===================================================================
--- /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGAvailability.cs	(revision 622)
+++ /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGAvailability.cs	(revision 622)
@@ -0,0 +1,218 @@
+﻿namespace IndianHealthService.ClinicalScheduling
+{
+    using System;
+    using System.Drawing;
+    /// <summary>
+    /// This class was regenerated from Calendargrid.dll using Reflector.exe
+    /// by Sam Habiel for WorldVista. The original source code is lost.
+    /// </summary>
+    public class CGAvailability
+    {
+        private DateTime m_EndTime;
+        private int m_nAvailabilityType;
+        private int m_nBlue;
+        private int m_nGreen;
+        private int m_nRed;
+        private int m_nSlots;
+        private string m_sAccessRuleList;
+        private string m_sAccessTypeName;
+        private string m_sDisplayColor = "Cornsilk";
+        private string m_sNote;
+        private string m_sResourceList;
+        private DateTime m_StartTime;
+
+        public CGAvailability()
+        {
+            Color color = Color.FromName("Khaki");
+            this.m_nRed = color.R;
+            this.m_nGreen = color.G;
+            this.m_nBlue = color.B;
+            this.m_sNote = "";
+        }
+
+        public void Create(DateTime StartTime, DateTime EndTime, int nSlots)
+        {
+            this.m_StartTime = StartTime;
+            this.m_EndTime = EndTime;
+            this.m_nAvailabilityType = 0;
+            this.m_nSlots = nSlots;
+            this.m_sResourceList = "";
+            this.m_sAccessRuleList = "";
+        }
+
+        public void Create(DateTime StartTime, DateTime EndTime, int nAvailabilityType, int nSlots)
+        {
+            this.m_StartTime = StartTime;
+            this.m_EndTime = EndTime;
+            this.m_nAvailabilityType = nAvailabilityType;
+            this.m_nSlots = nSlots;
+            this.m_sResourceList = "";
+            this.m_sAccessRuleList = "";
+        }
+
+        public void Create(DateTime StartTime, DateTime EndTime, int nAvailabilityType, int nSlots, string sResourceList)
+        {
+            this.m_StartTime = StartTime;
+            this.m_EndTime = EndTime;
+            this.m_nAvailabilityType = nAvailabilityType;
+            this.m_nSlots = nSlots;
+            this.m_sResourceList = sResourceList;
+            this.m_sAccessRuleList = "";
+        }
+
+        public void Create(DateTime StartTime, DateTime EndTime, int nAvailabilityType, int nSlots, string sResourceList, string sAccessRuleList)
+        {
+            this.m_StartTime = StartTime;
+            this.m_EndTime = EndTime;
+            this.m_nAvailabilityType = nAvailabilityType;
+            this.m_nSlots = nSlots;
+            this.m_sResourceList = sResourceList;
+            this.m_sAccessRuleList = sAccessRuleList;
+        }
+
+        public string AccessRuleList
+        {
+            get
+            {
+                return this.m_sAccessRuleList;
+            }
+            set
+            {
+                this.m_sAccessRuleList = value;
+            }
+        }
+
+        public string AccessTypeName
+        {
+            get
+            {
+                return this.m_sAccessTypeName;
+            }
+            set
+            {
+                this.m_sAccessTypeName = value;
+            }
+        }
+
+        public int AvailabilityType
+        {
+            get
+            {
+                return this.m_nAvailabilityType;
+            }
+            set
+            {
+                this.m_nAvailabilityType = value;
+            }
+        }
+
+        public int Blue
+        {
+            get
+            {
+                return this.m_nBlue;
+            }
+            set
+            {
+                this.m_nBlue = value;
+            }
+        }
+
+        public string DisplayColor
+        {
+            get
+            {
+                return this.m_sDisplayColor;
+            }
+            set
+            {
+                this.m_sDisplayColor = value;
+            }
+        }
+
+        public DateTime EndTime
+        {
+            get
+            {
+                return this.m_EndTime;
+            }
+            set
+            {
+                this.m_EndTime = value;
+            }
+        }
+
+        public int Green
+        {
+            get
+            {
+                return this.m_nGreen;
+            }
+            set
+            {
+                this.m_nGreen = value;
+            }
+        }
+
+        public string Note
+        {
+            get
+            {
+                return this.m_sNote;
+            }
+            set
+            {
+                this.m_sNote = value;
+            }
+        }
+
+        public int Red
+        {
+            get
+            {
+                return this.m_nRed;
+            }
+            set
+            {
+                this.m_nRed = value;
+            }
+        }
+
+        public string ResourceList
+        {
+            get
+            {
+                return this.m_sResourceList;
+            }
+            set
+            {
+                this.m_sResourceList = value;
+            }
+        }
+
+        public int Slots
+        {
+            get
+            {
+                return this.m_nSlots;
+            }
+            set
+            {
+                this.m_nSlots = value;
+            }
+        }
+
+        public DateTime StartTime
+        {
+            get
+            {
+                return this.m_StartTime;
+            }
+            set
+            {
+                this.m_StartTime = value;
+            }
+        }
+    }
+}
+
Index: /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGCell.cs
===================================================================
--- /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGCell.cs	(revision 622)
+++ /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGCell.cs	(revision 622)
@@ -0,0 +1,113 @@
+﻿namespace IndianHealthService.ClinicalScheduling
+{
+    using System;
+    using System.Drawing;
+    using System.Text;
+    /// <summary>
+    /// This class was regenerated from Calendargrid.dll using Reflector.exe
+    /// by Sam Habiel for WorldVista. The original source code is lost.
+    /// </summary>
+    public class CGCell
+    {
+        private Brush m_ApptTypeColor;
+        public bool m_bIsSelected;
+        private int m_Col;
+        private Rectangle m_Rectangle;
+        private int m_Row;
+        private string m_sKey;
+
+        public CGCell()
+        {
+            this.m_ApptTypeColor = Brushes.Cornsilk;
+        }
+
+        public CGCell(Rectangle r, int row, int col)
+        {
+            this.m_Rectangle = r;
+            this.m_Row = row;
+            this.m_Col = col;
+            this.m_sKey = BuildKey(this.m_Row, this.m_Col);
+            this.m_ApptTypeColor = Brushes.Cornsilk;
+        }
+
+        public static string BuildKey(int nRow, int nCol)
+        {
+            StringBuilder builder = new StringBuilder("r");
+            builder.Append(nRow.ToString());
+            builder.Append("c");
+            builder.Append(nCol.ToString());
+            return builder.ToString();
+        }
+
+        public Brush AppointmentTypeColor
+        {
+            get
+            {
+                return this.m_ApptTypeColor;
+            }
+            set
+            {
+                this.m_ApptTypeColor = value;
+            }
+        }
+
+        public int CellColumn
+        {
+            get
+            {
+                return this.m_Col;
+            }
+            set
+            {
+                this.m_Col = value;
+                this.m_sKey = BuildKey(this.m_Row, this.m_Col);
+            }
+        }
+
+        public Rectangle CellRectangle
+        {
+            get
+            {
+                return this.m_Rectangle;
+            }
+            set
+            {
+                this.m_Rectangle = value;
+            }
+        }
+
+        public int CellRow
+        {
+            get
+            {
+                return this.m_Row;
+            }
+            set
+            {
+                this.m_Row = value;
+                this.m_sKey = BuildKey(this.m_Row, this.m_Col);
+            }
+        }
+
+        public bool IsSelected
+        {
+            get
+            {
+                return this.m_bIsSelected;
+            }
+            set
+            {
+                this.m_bIsSelected = value;
+            }
+        }
+
+        public string Key
+        {
+            get
+            {
+                return this.m_sKey;
+            }
+        }
+    }
+}
+
Index: /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGCells.cs
===================================================================
--- /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGCells.cs	(revision 622)
+++ /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGCells.cs	(revision 622)
@@ -0,0 +1,60 @@
+﻿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>
+    public class CGCells : IEnumerable
+    {
+        private Hashtable cellList = new Hashtable();
+
+        internal CGCells()
+        {
+        }
+
+        public void AddCell(CGCell r)
+        {
+            this.cellList.Add(r.Key, r);
+        }
+
+        public void ClearAllCells()
+        {
+            this.cellList.Clear();
+        }
+
+        public CGCell GetCellFromRowCol(int nRow, int nCol)
+        {
+            string str = CGCell.BuildKey(nRow, nCol);
+            return (CGCell) this.cellList[str];
+        }
+
+        public IEnumerator GetEnumerator()
+        {
+            return this.cellList.GetEnumerator();
+        }
+
+        public void RemoveCell(string sKey)
+        {
+            this.cellList.Remove(sKey);
+        }
+
+        public int CellCount
+        {
+            get
+            {
+                return this.cellList.Count;
+            }
+        }
+
+        public Hashtable CellHashTable
+        {
+            get
+            {
+                return this.cellList;
+            }
+        }
+    }
+}
+
Index: /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGRange.cs
===================================================================
--- /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGRange.cs	(revision 622)
+++ /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGRange.cs	(revision 622)
@@ -0,0 +1,109 @@
+﻿namespace IndianHealthService.ClinicalScheduling
+{
+    using System;
+    /// <summary>
+    /// This class was regenerated from Calendargrid.dll using Reflector.exe
+    /// by Sam Habiel for WorldVista. The original source code is lost.
+    /// </summary>
+    public class CGRange
+    {
+        private CGCells m_Cells;
+        private CGCell m_gcEnd;
+        private CGCell m_gcStart;
+
+        public CGRange()
+        {
+            this.m_Cells = new CGCells();
+        }
+
+        public CGRange(CGCells gridCells, CGCell gcStart, CGCell gcEnd)
+        {
+            this.CreateRange(gridCells, gcStart, gcEnd);
+        }
+
+        public void AppendCell(CGCells gridCells, CGCell aCell)
+        {
+            if ((aCell != this.StartCell) && (aCell.CellColumn == this.StartCell.CellColumn))
+            {
+                CGCell startCell = this.StartCell;
+                this.m_Cells.ClearAllCells();
+                this.CreateRange(gridCells, startCell, aCell);
+            }
+        }
+
+        public bool CellIsInRange(CGCell cgCell)
+        {
+            return this.m_Cells.CellHashTable.ContainsKey(cgCell.Key);
+        }
+
+        public void CreateRange(CGCells gridCells, CGCell sCell, CGCell eCell)
+        {
+            this.m_Cells.ClearAllCells();
+            this.m_Cells.AddCell(sCell);
+            this.m_gcStart = sCell;
+            this.m_gcEnd = eCell;
+            if (sCell != eCell)
+            {
+                int num;
+                CGCell r = null;
+                if (sCell.CellRow < eCell.CellRow)
+                {
+                    for (num = sCell.CellRow + 1; num <= eCell.CellRow; num++)
+                    {
+                        r = gridCells.GetCellFromRowCol(num, eCell.CellColumn);
+                        this.m_Cells.AddCell(r);
+                    }
+                }
+                else
+                {
+                    for (num = sCell.CellRow - 1; num >= eCell.CellRow; num--)
+                    {
+                        r = gridCells.GetCellFromRowCol(num, eCell.CellColumn);
+                        this.m_Cells.AddCell(r);
+                    }
+                }
+            }
+        }
+
+        public void SubtractCell(CGCells gridCells, CGCell aCell, bool bUp)
+        {
+            int nRow = bUp ? (this.m_gcEnd.CellRow - 1) : (this.m_gcEnd.CellRow + 1);
+            int cellColumn = this.m_gcEnd.CellColumn;
+            this.Cells.RemoveCell(this.m_gcEnd.Key);
+            this.m_gcEnd = gridCells.GetCellFromRowCol(nRow, cellColumn);
+        }
+
+        public CGCells Cells
+        {
+            get
+            {
+                return this.m_Cells;
+            }
+        }
+
+        public CGCell EndCell
+        {
+            get
+            {
+                return this.m_gcEnd;
+            }
+            set
+            {
+                this.m_gcEnd = value;
+            }
+        }
+
+        public CGCell StartCell
+        {
+            get
+            {
+                return this.m_gcStart;
+            }
+            set
+            {
+                this.m_gcStart = value;
+            }
+        }
+    }
+}
+
Index: /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGResource.cs
===================================================================
--- /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGResource.cs	(revision 622)
+++ /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGResource.cs	(revision 622)
@@ -0,0 +1,129 @@
+﻿namespace IndianHealthService.ClinicalScheduling
+{
+    using System;
+    /// <summary>
+    /// This class was regenerated from Calendargrid.dll using Reflector.exe
+    /// by Sam Habiel for WorldVista. The original source code is lost.
+    /// </summary>
+    public class CGResource
+    {
+        private bool m_bInactive = false;
+        private int m_nHospitalLocationID = 0;
+        private int m_nResourceID = 0;
+        private int m_nTimeScale = 15;
+        private string m_sCancellationLetterText;
+        private string m_sHospitalLocation = "";
+        private string m_sLetterText;
+        private string m_sNoShowLetterText;
+        private string m_sResourceName = "";
+
+        public string CancellationLetterText
+        {
+            get
+            {
+                return this.m_sCancellationLetterText;
+            }
+            set
+            {
+                this.m_sCancellationLetterText = value;
+            }
+        }
+
+        public string HospitalLocation
+        {
+            get
+            {
+                return this.m_sHospitalLocation;
+            }
+            set
+            {
+                this.m_sHospitalLocation = value;
+            }
+        }
+
+        public int HospitalLocationID
+        {
+            get
+            {
+                return this.m_nHospitalLocationID;
+            }
+            set
+            {
+                this.m_nHospitalLocationID = value;
+            }
+        }
+
+        public bool Inactive
+        {
+            get
+            {
+                return this.m_bInactive;
+            }
+            set
+            {
+                this.m_bInactive = value;
+            }
+        }
+
+        public string LetterText
+        {
+            get
+            {
+                return this.m_sLetterText;
+            }
+            set
+            {
+                this.m_sLetterText = value;
+            }
+        }
+
+        public string NoShowLetterText
+        {
+            get
+            {
+                return this.m_sNoShowLetterText;
+            }
+            set
+            {
+                this.m_sNoShowLetterText = value;
+            }
+        }
+
+        public int ResourceID
+        {
+            get
+            {
+                return this.m_nResourceID;
+            }
+            set
+            {
+                this.m_nResourceID = value;
+            }
+        }
+
+        public string ResourceName
+        {
+            get
+            {
+                return this.m_sResourceName;
+            }
+            set
+            {
+                this.m_sResourceName = value;
+            }
+        }
+
+        public int TimeScale
+        {
+            get
+            {
+                return this.m_nTimeScale;
+            }
+            set
+            {
+                this.m_nTimeScale = value;
+            }
+        }
+    }
+}
+
Index: /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGSelectionChangedArgs.cs
===================================================================
--- /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGSelectionChangedArgs.cs	(revision 622)
+++ /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGSelectionChangedArgs.cs	(revision 622)
@@ -0,0 +1,52 @@
+﻿namespace IndianHealthService.ClinicalScheduling
+{
+    using System;
+    /// <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 CGSelectionChangedArgs : EventArgs
+    {
+        private DateTime m_dEnd;
+        private DateTime m_dStart;
+        private string m_sResource;
+
+        public DateTime EndTime
+        {
+            get
+            {
+                return this.m_dEnd;
+            }
+            set
+            {
+                this.m_dEnd = value;
+            }
+        }
+
+        public string Resource
+        {
+            get
+            {
+                return this.m_sResource;
+            }
+            set
+            {
+                this.m_sResource = value;
+            }
+        }
+
+        public DateTime StartTime
+        {
+            get
+            {
+                return this.m_dStart;
+            }
+            set
+            {
+                this.m_dStart = value;
+            }
+        }
+    }
+}
+
Index: /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGSelectionChangedHandler.cs
===================================================================
--- /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGSelectionChangedHandler.cs	(revision 622)
+++ /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGSelectionChangedHandler.cs	(revision 622)
@@ -0,0 +1,11 @@
+﻿namespace IndianHealthService.ClinicalScheduling
+{
+    using System;
+    using System.Runtime.CompilerServices;
+    /// <summary>
+    /// This class was regenerated from Calendargrid.dll using Reflector.exe
+    /// by Sam Habiel for WorldVista. The original source code is lost.
+    /// </summary>
+    public delegate void CGSelectionChangedHandler(object sender, CGSelectionChangedArgs e);
+}
+
Index: /Scheduling/trunk/cs/bsdx0200GUISourceCode/CalendarGrid.cs
===================================================================
--- /Scheduling/trunk/cs/bsdx0200GUISourceCode/CalendarGrid.cs	(revision 622)
+++ /Scheduling/trunk/cs/bsdx0200GUISourceCode/CalendarGrid.cs	(revision 622)
@@ -0,0 +1,1277 @@
+﻿namespace IndianHealthService.ClinicalScheduling
+{
+    using System;
+    using System.Collections;
+    using System.ComponentModel;
+    using System.Drawing;
+    using System.Globalization;
+    using System.Runtime.CompilerServices;
+    using System.Runtime.InteropServices;
+    using System.Windows.Forms;
+    /// <summary>
+    /// This class was regenerated from Calendargrid.dll using Reflector.exe
+    /// by Sam Habiel for WorldVista. The original source code is lost.
+    /// </summary>
+    public class CalendarGrid : Panel
+    {
+        private Container components;
+        private Font fontArial10;
+        private Font fontArial8;
+        private CGAppointments m_Appointments;
+        private Hashtable m_ApptOverlapTable;
+        private bool m_bAutoDrag = true;
+        private bool m_bDragDropStart;
+        private bool m_bDrawWalkIns = true;
+        private bool m_bGridEnter;
+        private bool m_bInitialUpdate;
+        private bool m_bMouseDown;
+        private bool m_bScroll;
+        private bool m_bScrollDown;
+        private bool m_bSelectingRange;
+        private int m_cellHeight;
+        private int m_cellWidth;
+        private int m_col0Width;
+        private Hashtable m_ColumnInfoTable;
+        private CGCell m_currentCell;
+        private DateTime m_dtStart;
+        private Font m_fCell;
+        private string m_GridBackColor;
+        private CGCells m_gridCells;
+        private int m_nColumns = 5;
+        private int m_nSelectID;
+        private int m_nTimeScale = 20;
+        private ArrayList m_pAvArray;
+        private string m_sDragSource;
+        private CGAppointments m_SelectedAppointments;
+        private CGRange m_selectedRange;
+        private StringFormat m_sf;
+        private StringFormat m_sfHour;
+        private StringFormat m_sfRight;
+        private ArrayList m_sResourcesArray;
+        private Timer m_Timer;
+        private ToolTip m_toolTip;
+        private const int WM_HSCROLL = 0x114;
+        private const int WM_VSCROLL = 0x115;
+
+        public event CGAppointmentChangedHandler CGAppointmentAdded;
+
+        public event CGAppointmentChangedHandler CGAppointmentChanged;
+
+        public event CGSelectionChangedHandler CGSelectionChanged;
+
+        public CalendarGrid()
+        {
+            this.InitializeComponent();
+            base.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
+            base.SetStyle(ControlStyles.UserPaint, true);
+            base.SetStyle(ControlStyles.DoubleBuffer, true);
+            this.m_nColumns = 5;
+            this.m_gridCells = new CGCells();
+            this.m_selectedRange = new CGRange();
+            this.m_SelectedAppointments = new CGAppointments();
+            this.m_dtStart = new DateTime(0x7d3, 1, 0x1b);
+            this.m_ApptOverlapTable = new Hashtable();
+            this.m_ColumnInfoTable = new Hashtable();
+            this.m_sResourcesArray = new ArrayList();
+            base.ResizeRedraw = true;
+            this.m_col0Width = 100;
+            this.fontArial8 = new Font("Arial", 8f);
+            this.fontArial10 = new Font("Arial", 10f);
+            this.m_fCell = this.fontArial10;
+            this.m_sf = new StringFormat();
+            this.m_sfRight = new StringFormat();
+            this.m_sfHour = new StringFormat();
+            this.m_sf.LineAlignment = StringAlignment.Center;
+            this.m_sfRight.LineAlignment = StringAlignment.Center;
+            this.m_sfRight.Alignment = StringAlignment.Far;
+            this.m_sfHour.LineAlignment = StringAlignment.Center;
+            this.m_sfHour.Alignment = StringAlignment.Far;
+            this.m_bInitialUpdate = false;
+        }
+
+        private Rectangle AdjustRectForOverlap()
+        {
+            return new Rectangle();
+        }
+
+        private void AutoDragStart()
+        {
+            this.m_bAutoDrag = true;
+            this.m_Timer = new Timer();
+            this.m_Timer.Interval = 5;
+            this.m_Timer.Tick += new EventHandler(this.tickEventHandler);
+            this.m_Timer.Start();
+        }
+
+        private void AutoDragStop()
+        {
+            this.m_bAutoDrag = false;
+            if (this.m_Timer != null)
+            {
+                this.m_Timer.Stop();
+                this.m_Timer.Dispose();
+                this.m_Timer = null;
+            }
+        }
+
+        private void BuildGridCellsArray(Graphics g)
+        {
+            try
+            {
+                SizeF ef = g.MeasureString("Test", this.m_fCell);
+                this.m_cellHeight = ((int) ef.Height) + 4;
+                int nColumns = this.m_nColumns;
+                int num2 = 60 / this.m_nTimeScale;
+                int num3 = 0x18 * num2;
+                nColumns++;
+                num3++;
+                this.m_cellWidth = 600 / nColumns;
+                if (base.ClientRectangle.Width > 600)
+                {
+                    this.m_cellWidth = (base.ClientRectangle.Width - this.m_col0Width) / (nColumns - 1);
+                }
+                if (this.m_nColumns == 1)
+                {
+                    this.m_cellWidth = base.ClientRectangle.Width - this.m_col0Width;
+                }
+                g.TranslateTransform((float) base.AutoScrollPosition.X, (float) base.AutoScrollPosition.Y);
+                for (int i = num3; i > -1; i--)
+                {
+                    for (int j = 1; j < nColumns; j++)
+                    {
+                        int x = 0;
+                        if (j == 1)
+                        {
+                            x = this.m_col0Width;
+                        }
+                        if (j > 1)
+                        {
+                            x = this.m_col0Width + (this.m_cellWidth * (j - 1));
+                        }
+                        Point point = new Point(x, i * this.m_cellHeight);
+                        Rectangle r = new Rectangle(point.X, point.Y, this.m_cellWidth, this.m_cellHeight);
+                        if (i != 0)
+                        {
+                            CGCell cell = null;
+                            cell = new CGCell(r, i, j);
+                            this.m_gridCells.AddCell(cell);
+                        }
+                    }
+                }
+            }
+            catch (Exception exception)
+            {
+                string message = exception.Message;
+            }
+        }
+
+        private void CalendarGrid_DragDrop(object Sender, DragEventArgs e)
+        {
+            CGAppointment data = (CGAppointment) e.Data.GetData(typeof(CGAppointment));
+            Point point = base.PointToClient(new Point(e.X, e.Y));
+            int x = point.X - base.AutoScrollPosition.X;
+            int y = point.Y - base.AutoScrollPosition.Y;
+            Point pt = new Point(x, y);
+            foreach (DictionaryEntry entry in this.m_gridCells.CellHashTable)
+            {
+                CGCell cgCell = (CGCell) entry.Value;
+                if (cgCell.CellRectangle.Contains(pt))
+                {
+                    DateTime timeFromCell = this.GetTimeFromCell(cgCell);
+                    string resourceFromColumn = this.GetResourceFromColumn(cgCell.CellColumn);
+                    int duration = data.Duration;
+                    TimeSpan span = new TimeSpan(0, duration, 0);
+                    DateTime time2 = timeFromCell + span;
+                    data.Selected = false;
+                    this.m_nSelectID = 0;
+                    CGAppointmentChangedArgs args = new CGAppointmentChangedArgs();
+                    args.Appointment = data;
+                    args.StartTime = timeFromCell;
+                    args.EndTime = time2;
+                    args.Resource = resourceFromColumn;
+                    args.OldResource = data.Resource;
+                    args.AccessTypeID = data.AccessTypeID;
+                    args.Slots = data.Slots;
+                    if (this.ApptDragSource == "grid")
+                    {
+                        this.CGAppointmentChanged(this, args);
+                    }
+                    else
+                    {
+                        this.CGAppointmentAdded(this, args);
+                    }
+                    break;
+                }
+            }
+            this.SetOverlapTable();
+            base.Invalidate();
+        }
+
+        private void CalendarGrid_DragEnter(object Sender, DragEventArgs e)
+        {
+            if (e.Data.GetDataPresent(typeof(CGAppointment)))
+            {
+                if ((e.KeyState & 8) == 8)
+                {
+                    e.Effect = DragDropEffects.Copy;
+                }
+                else
+                {
+                    e.Effect = DragDropEffects.Move;
+                }
+            }
+            else
+            {
+                e.Effect = DragDropEffects.None;
+            }
+        }
+
+        private void CalendarGrid_MouseDown(object sender, MouseEventArgs e)
+        {
+            if (e.Button == MouseButtons.Left)
+            {
+                foreach (DictionaryEntry entry in this.m_gridCells.CellHashTable)
+                {
+                    CGCell cell = (CGCell) entry.Value;
+                    cell.IsSelected = false;
+                }
+                this.m_selectedRange.Cells.ClearAllCells();
+                this.m_bMouseDown = true;
+                this.OnLButtonDown(e.X, e.Y, true);
+            }
+        }
+
+        private void CalendarGrid_MouseMove(object Sender, MouseEventArgs e)
+        {
+            if (this.m_bMouseDown)
+            {
+                if ((e.Y >= base.ClientRectangle.Bottom) || (e.Y <= base.ClientRectangle.Top))
+                {
+                    this.m_bScrollDown = e.Y >= base.ClientRectangle.Bottom;
+                }
+                if ((e.Y < base.ClientRectangle.Bottom) && (e.Y > base.ClientRectangle.Top))
+                {
+                    bool bAutoDrag = this.m_bAutoDrag;
+                }
+                if (this.m_bSelectingRange)
+                {
+                    this.OnLButtonDown(e.X, e.Y, false);
+                }
+                if (this.m_nSelectID != 0)
+                {
+                    if (this.m_bGridEnter)
+                    {
+                        this.m_bGridEnter = false;
+                    }
+                    else if (!this.m_bDragDropStart)
+                    {
+                        CGAppointment data = (CGAppointment) this.m_Appointments.AppointmentTable[this.m_nSelectID];
+                        this.ApptDragSource = "grid";
+                        base.DoDragDrop(data, DragDropEffects.Move);
+                        this.m_bDragDropStart = true;
+                    }
+                }
+            }
+            else
+            {
+                int y = e.Y - base.AutoScrollPosition.Y;
+                int x = e.X - base.AutoScrollPosition.X;
+                Point pt = new Point(x, y);
+                foreach (CGAppointment appointment2 in this.m_Appointments.AppointmentTable.Values)
+                {
+                    if (appointment2.GridRectangle.Contains(pt))
+                    {
+                        this.m_toolTip.SetToolTip(this, appointment2.ToString());
+                        return;
+                    }
+                }
+                this.m_toolTip.RemoveAll();
+            }
+        }
+
+        private void CalendarGrid_MouseUp(object Sender, MouseEventArgs e)
+        {
+            if (this.m_bAutoDrag)
+            {
+                this.m_bAutoDrag = false;
+                this.AutoDragStop();
+            }
+            this.m_bMouseDown = false;
+            if (this.m_bSelectingRange)
+            {
+                CGSelectionChangedArgs args = new CGSelectionChangedArgs();
+                args.StartTime = this.GetTimeFromCell(this.m_selectedRange.StartCell);
+                args.EndTime = this.GetTimeFromCell(this.m_selectedRange.EndCell);
+                args.Resource = this.GetResourceFromColumn(this.m_selectedRange.StartCell.CellColumn);
+                if (args.EndTime < args.StartTime)
+                {
+                    DateTime startTime = args.StartTime;
+                    args.StartTime = args.EndTime;
+                    args.EndTime = startTime;
+                }
+                TimeSpan span = new TimeSpan(0, 0, this.m_nTimeScale, 0, 0);
+                args.EndTime += span;
+                this.CGSelectionChanged(this, args);
+                this.m_bSelectingRange = false;
+            }
+        }
+
+        private void CalendarGrid_Paint(object sender, PaintEventArgs e)
+        {
+            if (e.Graphics != null)
+            {
+                this.DrawGrid(e.Graphics);
+                if (!this.m_bInitialUpdate)
+                {
+                    this.SetAppointmentTypes();
+                    base.Invalidate();
+                    this.m_bInitialUpdate = true;
+                }
+            }
+        }
+
+        public void CloseGrid()
+        {
+            foreach (CGAppointment appointment in this.m_Appointments.AppointmentTable.Values)
+            {
+                appointment.Selected = false;
+            }
+            this.m_nSelectID = 0;
+        }
+
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (this.components != null))
+            {
+                this.components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        private void DrawAppointments(Graphics g, int col0Width, int cellWidth, int cellHeight)
+        {
+            if (!base.DesignMode && (this.m_Appointments != null))
+            {
+                int num = 0;
+                int num2 = 0;
+                int x = 0;
+                ArrayList list = new ArrayList();
+                foreach (CGAppointment appointment in this.m_Appointments.AppointmentTable.Values)
+                {
+                    bool bRet = false;
+                    Rectangle rect = this.GetAppointmentRect(appointment, col0Width, cellWidth, cellHeight, out bRet);
+                    if (bRet && (!appointment.WalkIn || this.m_bDrawWalkIns))
+                    {
+                        rect.Inflate(-10, 0);
+                        num = (int) this.m_ApptOverlapTable[appointment.m_nKey];
+                        num2 = rect.Right - rect.Left;
+                        x = num2 / (num + 1);
+                        rect.Width = x;
+                        if (num > 0)
+                        {
+                            foreach (object obj2 in list)
+                            {
+                                Rectangle rectangle2 = (Rectangle) obj2;
+                                if (rect.IntersectsWith(rectangle2))
+                                {
+                                    rect.Offset(x, 0);
+                                }
+                            }
+                        }
+                        appointment.GridRectangle = rect;
+                        if (appointment.Selected)
+                        {
+                            Pen pen = new Pen(Brushes.Black, 5f);
+                            g.DrawRectangle(pen, rect);
+                            pen.Dispose();
+                        }
+                        else
+                        {
+                            g.DrawRectangle(Pens.Blue, rect);
+                        }
+                        string s = appointment.ToString();
+                        Rectangle rectangle3 = new Rectangle(rect.X + 1, rect.Y + 1, rect.Width - 1, rect.Height - 1);
+                        g.FillRectangle(Brushes.White, rectangle3);
+                        Brush black = Brushes.Black;
+                        if (appointment.CheckInTime.Ticks > 0L)
+                        {
+                            black = Brushes.Green;
+                            g.FillRectangle(Brushes.LightGreen, rectangle3);
+                        }
+                        if (appointment.NoShow)
+                        {
+                            black = Brushes.Red;
+                            g.FillRectangle(Brushes.LightPink, rectangle3);
+                        }
+                        if (appointment.WalkIn)
+                        {
+                            black = Brushes.Blue;
+                            g.FillRectangle(Brushes.LightSteelBlue, rectangle3);
+                        }
+                        g.DrawString(s, this.fontArial8, black, rectangle3);
+                        list.Add(rect);
+                    }
+                }
+            }
+        }
+
+        private void DrawGrid(Graphics g)
+        {
+            try
+            {
+                Pen pen = new Pen(Color.Black);
+                SizeF ef = g.MeasureString("Test", this.m_fCell);
+                int num = 10;
+                this.m_cellHeight = ((int) ef.Height) + num;
+                int nColumns = this.m_nColumns;
+                int num3 = 60 / this.m_nTimeScale;
+                int num4 = 0x18 * num3;
+                nColumns++;
+                num4++;
+                this.m_cellWidth = 600 / nColumns;
+                if (base.ClientRectangle.Width > 600)
+                {
+                    this.m_cellWidth = (base.ClientRectangle.Width - this.m_col0Width) / (nColumns - 1);
+                }
+                if (this.m_nColumns == 1)
+                {
+                    this.m_cellWidth = base.ClientRectangle.Width - this.m_col0Width;
+                }
+                base.AutoScrollMinSize = new Size(600, this.m_cellHeight * num4);
+                g.FillRectangle(Brushes.LightGray, base.ClientRectangle);
+                int num5 = 0;
+                int num6 = 0;
+                bool flag = this.m_gridCells.CellCount == 0;
+                g.TranslateTransform((float) base.AutoScrollPosition.X, (float) base.AutoScrollPosition.Y);
+                for (int i = 1; i < num4; i++)
+                {
+                    int x = 0;
+                    Point point = new Point(x, i * this.m_cellHeight);
+                    Rectangle rectangle2 = new Rectangle(point.X, point.Y, this.m_cellWidth, this.m_cellHeight);
+                    Rectangle rect = new Rectangle(0, rectangle2.Y, this.m_col0Width, rectangle2.Height * num3);
+                    int height = rect.Height;
+                    height = (height > (this.m_col0Width / 4)) ? (this.m_col0Width / 4) : height;
+                    if (num5 == 0)
+                    {
+                        g.FillRectangle(Brushes.LightGray, rect);
+                        g.DrawRectangle(pen, rect.X, rect.Y, rect.Width, rect.Height);
+                        string str = string.Format("{0}", num6).PadLeft(2, '0');
+                        Font font = new Font("Arial", (float) height, FontStyle.Bold, GraphicsUnit.Pixel);
+                        Rectangle rectangle3 = new Rectangle(rect.X, rect.Y, rect.Width / 2, rect.Height);
+                        g.DrawString(str, font, Brushes.Black, rectangle3, this.m_sfHour);
+                        num6++;
+                        font.Dispose();
+                    }
+                    string s = string.Format("{0}", num5);
+                    s = ":" + s.PadLeft(2, '0');
+                    Rectangle layoutRectangle = new Rectangle(rect.X + ((rect.Width * 2) / 3), rectangle2.Top, rect.Width / 3, rectangle2.Height);
+                    g.DrawString(s, this.m_fCell, Brushes.Black, layoutRectangle, this.m_sfRight);
+                    Point point2 = new Point(rect.X + ((rect.Width * 2) / 3), rectangle2.Bottom);
+                    Point point3 = new Point(rect.Right, rectangle2.Bottom);
+                    g.DrawLine(pen, point2, point3);
+                    num5 += this.m_nTimeScale;
+                    num5 = (num5 >= 60) ? 0 : num5;
+                    if ((i == (num4 - 1)) && !this.m_bScroll)
+                    {
+                        g.TranslateTransform((float) -base.AutoScrollPosition.X, (float) -base.AutoScrollPosition.Y);
+                        rect = new Rectangle(0, 0, this.m_col0Width, this.m_cellHeight);
+                        g.FillRectangle(Brushes.LightGray, rect);
+                        g.DrawRectangle(pen, rect);
+                        g.TranslateTransform((float) base.AutoScrollPosition.X, (float) base.AutoScrollPosition.Y);
+                    }
+                }
+                for (int j = num4; j > -1; j--)
+                {
+                    for (int k = 1; k < nColumns; k++)
+                    {
+                        int num12 = 0;
+                        if (k == 1)
+                        {
+                            num12 = this.m_col0Width;
+                        }
+                        if (k > 1)
+                        {
+                            num12 = this.m_col0Width + (this.m_cellWidth * (k - 1));
+                        }
+                        Point point4 = new Point(num12, j * this.m_cellHeight);
+                        Rectangle r = new Rectangle(point4.X, point4.Y, this.m_cellWidth, this.m_cellHeight);
+                        if (j != 0)
+                        {
+                            CGCell cellFromRowCol = null;
+                            if (flag)
+                            {
+                                cellFromRowCol = new CGCell(r, j, k);
+                                this.m_gridCells.AddCell(cellFromRowCol);
+                            }
+                            else
+                            {
+                                cellFromRowCol = this.m_gridCells.GetCellFromRowCol(j, k);
+                                cellFromRowCol.CellRectangle = r;
+                            }
+                            if (this.m_sResourcesArray.Count > 0)
+                            {
+                                if (this.m_selectedRange.CellIsInRange(cellFromRowCol))
+                                {
+                                    g.FillRectangle(Brushes.Aquamarine, r);
+                                }
+                                else
+                                {
+                                    g.FillRectangle(cellFromRowCol.AppointmentTypeColor, r);
+                                }
+                                g.DrawRectangle(pen, r.X, r.Y, r.Width, r.Height);
+                                if (j == 1)
+                                {
+                                    this.DrawAppointments(g, this.m_col0Width, this.m_cellWidth, this.m_cellHeight);
+                                }
+                            }
+                            continue;
+                        }
+                        if (!this.m_bScroll)
+                        {
+                            g.TranslateTransform(0f, (float) -base.AutoScrollPosition.Y);
+                            Rectangle rectangle6 = r;
+                            g.FillRectangle(Brushes.LightBlue, rectangle6);
+                            g.DrawRectangle(pen, rectangle6.X, rectangle6.Y, rectangle6.Width, rectangle6.Height);
+                            string str3 = "";
+                            if (this.m_sResourcesArray.Count > 1)
+                            {
+                                foreach (DictionaryEntry entry in this.m_ColumnInfoTable)
+                                {
+                                    int num13 = (int) entry.Value;
+                                    num13++;
+                                    if (num13 == k)
+                                    {
+                                        str3 = entry.Key.ToString();
+                                        break;
+                                    }
+                                }
+                            }
+                            else
+                            {
+                                DateTime dtStart = this.m_dtStart;
+                                if (k > 1)
+                                {
+                                    dtStart = dtStart.AddDays((double) (k - 1));
+                                }
+                                string format = "ddd, MMM d";
+                                str3 = dtStart.ToString(format, DateTimeFormatInfo.InvariantInfo);
+                            }
+                            g.DrawString(str3, this.m_fCell, Brushes.Black, rectangle6, this.m_sf);
+                            g.TranslateTransform(0f, (float) base.AutoScrollPosition.Y);
+                        }
+                    }
+                }
+                this.m_bScroll = false;
+                pen.Dispose();
+            }
+            catch (Exception)
+            {
+            }
+        }
+
+        public Rectangle GetAppointmentRect(CGAppointment a, int col0Width, int cellWidth, int cellHeight, out bool bRet)
+        {
+            DateTime startTime = a.StartTime;
+            DateTime endTime = a.EndTime;
+            string resource = a.Resource;
+            int num = 0;
+            int num2 = 0;
+            int num3 = 0;
+            int num4 = 0;
+            int num5 = 0;
+            Rectangle rectangle = new Rectangle();
+            int totalMinutes = (int) startTime.TimeOfDay.TotalMinutes;
+            int num7 = (int) endTime.TimeOfDay.TotalMinutes;
+            if (this.m_sResourcesArray.Count > 1)
+            {
+                num5 = (int) this.m_ColumnInfoTable[resource];
+                num5++;
+            }
+            else
+            {
+                num5 = ((int) (startTime.DayOfWeek - this.m_dtStart.DayOfWeek)) + 1;
+            }
+            if (num5 < 1)
+            {
+                bRet = false;
+                return rectangle;
+            }
+            num = col0Width + (cellWidth * (num5 - 1));
+            int num8 = totalMinutes + this.m_nTimeScale;
+            int num9 = (num7 > 0) ? num7 : 0x5a0;
+            num9 -= totalMinutes;
+            num2 = (cellHeight * num8) / this.m_nTimeScale;
+            num3 = (cellHeight * num9) / this.m_nTimeScale;
+            num4 = cellWidth;
+            rectangle.X = num;
+            rectangle.Y = num2;
+            rectangle.Width = num4;
+            rectangle.Height = num3;
+            bRet = true;
+            return rectangle;
+        }
+
+        public bool GetCellFromTime(DateTime dDate, ref int nRow, ref int nCol, bool bStartCell, string sResource)
+        {
+            int num = (dDate.Hour * 60) + dDate.Minute;
+            nRow = num / this.m_nTimeScale;
+            if (bStartCell)
+            {
+                nRow++;
+            }
+            if (this.m_sResourcesArray.Count > 1)
+            {
+                if (sResource == "")
+                {
+                    sResource = this.m_sResourcesArray[0].ToString();
+                }
+                nCol = (int) this.m_ColumnInfoTable[sResource];
+                nCol++;
+                return true;
+            }
+            DateTime time = new DateTime(dDate.Year, dDate.Month, dDate.Day);
+            TimeSpan span = (TimeSpan) (time - this.StartDate);
+            int totalDays = 0;
+            totalDays = (int) span.TotalDays;
+            nCol = totalDays;
+            nCol++;
+            return true;
+        }
+
+        private string GetResourceFromColumn(int nCol)
+        {
+            if (this.m_sResourcesArray.Count == 1)
+            {
+                return this.m_sResourcesArray[0].ToString();
+            }
+            foreach (DictionaryEntry entry in this.m_ColumnInfoTable)
+            {
+                int num = (int) entry.Value;
+                num++;
+                if (num == nCol)
+                {
+                    return entry.Key.ToString();
+                }
+            }
+            return "";
+        }
+
+        public bool GetSelectedTime(out DateTime dStart, out DateTime dEnd, out string sResource)
+        {
+            if (this.m_selectedRange.Cells.CellCount == 0)
+            {
+                dEnd = new DateTime();
+                dStart = dEnd;
+                sResource = "";
+                return false;
+            }
+            CGCell startCell = this.m_selectedRange.StartCell;
+            CGCell endCell = this.m_selectedRange.EndCell;
+            if (startCell.CellRow > endCell.CellRow)
+            {
+                CGCell cell3 = startCell;
+                startCell = endCell;
+                endCell = cell3;
+            }
+            dStart = this.GetTimeFromCell(startCell);
+            dEnd = this.GetTimeFromCell(endCell);
+            dEnd = dEnd.AddMinutes((double) this.m_nTimeScale);
+            sResource = this.GetResourceFromColumn(startCell.CellColumn);
+            return true;
+        }
+
+        public bool GetSelectedType(out int nAccessTypeID)
+        {
+            nAccessTypeID = 0;
+            if (this.m_selectedRange.Cells.CellCount == 0)
+            {
+                return false;
+            }
+            CGCell startCell = this.m_selectedRange.StartCell;
+            CGCell endCell = this.m_selectedRange.EndCell;
+            if (startCell.CellRow > endCell.CellRow)
+            {
+                CGCell cell3 = startCell;
+                startCell = endCell;
+                endCell = cell3;
+            }
+            DateTime timeFromCell = this.GetTimeFromCell(startCell);
+            DateTime time2 = this.GetTimeFromCell(endCell).AddMinutes((double) this.m_nTimeScale);
+            foreach (CGAvailability availability in this.m_pAvArray)
+            {
+                if (this.TimesOverlap(availability.StartTime, availability.EndTime, timeFromCell, time2))
+                {
+                    nAccessTypeID = availability.AvailabilityType;
+                    break;
+                }
+            }
+            return (nAccessTypeID > 0);
+        }
+
+        public DateTime GetTimeFromCell(CGCell cgCell)
+        {
+            int cellRow = cgCell.CellRow;
+            int cellColumn = cgCell.CellColumn;
+            DateTime dtStart = this.m_dtStart;
+            int num3 = (cellRow - 1) * this.m_nTimeScale;
+            int num4 = num3 / 60;
+            if (num4 > 0)
+            {
+                num3 = num3 % (num4 * 60);
+            }
+            dtStart = dtStart.AddHours((double) num4).AddMinutes((double) num3);
+            if (this.m_sResourcesArray.Count == 1)
+            {
+                dtStart = dtStart.AddDays((double) (cellColumn - 1));
+            }
+            return dtStart;
+        }
+
+        public bool GetTypeFromCell(CGCell cgCell, out int nAccessTypeID)
+        {
+            nAccessTypeID = 0;
+            CGCell cell = cgCell;
+            CGCell cell2 = cgCell;
+            if (cell.CellRow > cell2.CellRow)
+            {
+                CGCell cell3 = cell;
+                cell = cell2;
+                cell2 = cell3;
+            }
+            DateTime timeFromCell = this.GetTimeFromCell(cell);
+            DateTime time2 = this.GetTimeFromCell(cell2).AddMinutes((double) this.m_nTimeScale);
+            foreach (CGAvailability availability in this.m_pAvArray)
+            {
+                if (this.TimesOverlap(availability.StartTime, availability.EndTime, timeFromCell, time2))
+                {
+                    nAccessTypeID = availability.AvailabilityType;
+                    break;
+                }
+            }
+            return (nAccessTypeID > 0);
+        }
+
+        private bool HitTest(int X, int Y, ref int nRow, ref int nCol)
+        {
+            Y -= base.AutoScrollPosition.Y;
+            X -= base.AutoScrollPosition.X;
+            foreach (DictionaryEntry entry in this.m_gridCells)
+            {
+                CGCell cell = (CGCell) entry.Value;
+                if (cell.CellRectangle.Contains(X, Y))
+                {
+                    nRow = cell.CellRow;
+                    nCol = cell.CellColumn;
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        public void InitializeCalendarGrid()
+        {
+            this.AllowDrop = true;
+        }
+
+        private void InitializeComponent()
+        {
+            this.AutoScroll = true;
+            base.AutoScrollMinSize = new Size(600, 400);
+            this.BackColor = SystemColors.Window;
+            base.Paint += new PaintEventHandler(this.CalendarGrid_Paint);
+            base.MouseDown += new MouseEventHandler(this.CalendarGrid_MouseDown);
+            base.MouseUp += new MouseEventHandler(this.CalendarGrid_MouseUp);
+            base.MouseMove += new MouseEventHandler(this.CalendarGrid_MouseMove);
+            base.DragEnter += new DragEventHandler(this.CalendarGrid_DragEnter);
+            base.DragDrop += new DragEventHandler(this.CalendarGrid_DragDrop);
+            this.m_toolTip = new ToolTip();
+        }
+
+        private int MinSince80(DateTime d)
+        {
+            DateTime time = new DateTime(0x7bc, 1, 1, 0, 0, 0);
+            TimeSpan span = (TimeSpan) (d - time);
+            return (int) span.TotalMinutes;
+        }
+
+        private void OnLButtonDown(int X, int Y, bool bStart)
+        {
+            this.m_bDragDropStart = false;
+            this.m_nSelectID = 0;
+            if (!this.m_bSelectingRange)
+            {
+                int y = Y - base.AutoScrollPosition.Y;
+                int x = X - base.AutoScrollPosition.X;
+                Point pt = new Point(x, y);
+                if (Control.ModifierKeys == Keys.Control)
+                {
+                    this.m_bMouseDown = false;
+                    foreach (CGAppointment appointment in this.m_Appointments.AppointmentTable.Values)
+                    {
+                        if (!appointment.GridRectangle.Contains(pt))
+                        {
+                            continue;
+                        }
+                        if (this.m_SelectedAppointments.AppointmentTable.ContainsKey(appointment.AppointmentKey))
+                        {
+                            this.m_SelectedAppointments.RemoveAppointment(appointment.AppointmentKey);
+                            if (this.m_SelectedAppointments.AppointmentTable.Count == 0)
+                            {
+                                this.m_nSelectID = 0;
+                            }
+                            else
+                            {
+                                foreach (CGAppointment appointment2 in this.m_Appointments.AppointmentTable.Values)
+                                {
+                                    this.m_nSelectID = appointment2.AppointmentKey;
+                                }
+                            }
+                        }
+                        else
+                        {
+                            this.m_SelectedAppointments.AddAppointment(appointment);
+                            this.m_nSelectID = appointment.AppointmentKey;
+                        }
+                        appointment.Selected = !appointment.Selected;
+                        break;
+                    }
+                    base.Invalidate();
+                    return;
+                }
+                foreach (CGAppointment appointment3 in this.m_Appointments.AppointmentTable.Values)
+                {
+                    if (!appointment3.GridRectangle.Contains(pt))
+                    {
+                        continue;
+                    }
+                    this.m_bMouseDown = false;
+                    if (appointment3.Selected)
+                    {
+                        appointment3.Selected = false;
+                        this.m_SelectedAppointments.ClearAllAppointments();
+                        this.m_nSelectID = 0;
+                    }
+                    else
+                    {
+                        foreach (CGAppointment appointment4 in this.m_Appointments.AppointmentTable.Values)
+                        {
+                            appointment4.Selected = false;
+                        }
+                        this.m_SelectedAppointments.ClearAllAppointments();
+                        this.m_SelectedAppointments.AddAppointment(appointment3);
+                        appointment3.Selected = true;
+                        this.m_nSelectID = appointment3.AppointmentKey;
+                        this.m_bMouseDown = true;
+                        this.m_bGridEnter = true;
+                    }
+                    base.Invalidate();
+                    return;
+                }
+            }
+            int nRow = -1;
+            int nCol = -1;
+            if (this.HitTest(X, Y, ref nRow, ref nCol))
+            {
+                CGCell cellFromRowCol = this.m_gridCells.GetCellFromRowCol(nRow, nCol);
+                if (cellFromRowCol != null)
+                {
+                    if (bStart)
+                    {
+                        this.m_currentCell = cellFromRowCol;
+                        this.m_selectedRange.StartCell = null;
+                        this.m_selectedRange.EndCell = null;
+                        this.m_selectedRange.CreateRange(this.m_gridCells, cellFromRowCol, cellFromRowCol);
+                        bStart = false;
+                        this.m_bMouseDown = true;
+                        this.m_bSelectingRange = true;
+                    }
+                    else if (cellFromRowCol != this.m_currentCell)
+                    {
+                        if (!this.m_selectedRange.Cells.CellHashTable.ContainsKey(cellFromRowCol.Key))
+                        {
+                            this.m_selectedRange.AppendCell(this.m_gridCells, cellFromRowCol);
+                        }
+                        else
+                        {
+                            bool bUp = cellFromRowCol.CellRow < this.m_currentCell.CellRow;
+                            this.m_selectedRange.SubtractCell(this.m_gridCells, cellFromRowCol, bUp);
+                        }
+                        this.m_currentCell = cellFromRowCol;
+                    }
+                    cellFromRowCol.IsSelected = true;
+                    base.Invalidate();
+                }
+            }
+        }
+
+        public void OnUpdateArrays()
+        {
+            try
+            {
+                this.m_gridCells.ClearAllCells();
+                this.SetColumnInfo();
+                this.SetOverlapTable();
+                Graphics g = base.CreateGraphics();
+                this.BuildGridCellsArray(g);
+                this.SetAppointmentTypes();
+            }
+            catch (Exception exception)
+            {
+                string message = exception.Message;
+            }
+        }
+
+        private void SetAppointmentTypes()
+        {
+            if (this.m_gridCells.CellCount != 0)
+            {
+                foreach (DictionaryEntry entry in this.m_gridCells.CellHashTable)
+                {
+                    CGCell cell = (CGCell) entry.Value;
+                    cell.AppointmentTypeColor = (this.m_GridBackColor == "blue") ? Brushes.CornflowerBlue : Brushes.Khaki;
+                }
+                if ((this.m_pAvArray != null) && (this.m_pAvArray.Count != 0))
+                {
+                    foreach (CGAvailability availability in this.m_pAvArray)
+                    {
+                        int nRow = 0;
+                        int nCol = 0;
+                        int num3 = 0;
+                        int num4 = 0;
+                        Brush brush = new SolidBrush(Color.FromArgb(availability.Red, availability.Green, availability.Blue));
+                        this.GetCellFromTime(availability.StartTime, ref nRow, ref nCol, true, availability.ResourceList);
+                        this.GetCellFromTime(availability.EndTime, ref num3, ref num4, false, availability.ResourceList);
+                        for (int i = nCol; i <= num4; i++)
+                        {
+                            for (int j = nRow; (i == num4) && (j <= num3); j++)
+                            {
+                                string str = "r" + j.ToString() + "c" + i.ToString();
+                                CGCell cell2 = (CGCell) this.m_gridCells.CellHashTable[str];
+                                if (cell2 != null)
+                                {
+                                    cell2.AppointmentTypeColor = brush;
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+
+        private void SetColumnInfo()
+        {
+            this.m_ColumnInfoTable.Clear();
+            for (int i = 0; i < this.m_sResourcesArray.Count; i++)
+            {
+                this.m_ColumnInfoTable.Add(this.m_sResourcesArray[i], i);
+            }
+            if (this.m_sResourcesArray.Count > 1)
+            {
+                this.m_nColumns = this.m_sResourcesArray.Count;
+            }
+        }
+
+        public void SetOverlapTable()
+        {
+            Hashtable hashtable = new Hashtable();
+            int y = 0;
+            int num2 = 0;
+            int x = 0;
+            foreach (CGAppointment appointment in this.m_Appointments.AppointmentTable.Values)
+            {
+                if (!appointment.WalkIn || this.m_bDrawWalkIns)
+                {
+                    string resource = appointment.Resource;
+                    y = appointment.StartTime.Minute + (60 * appointment.StartTime.Hour);
+                    num2 = appointment.EndTime.Minute + (60 * appointment.EndTime.Hour);
+                    x = (this.m_sResourcesArray.Count > 1) ? (((int) this.m_ColumnInfoTable[resource]) + 1) : appointment.StartTime.DayOfYear;
+                    Rectangle rectangle = new Rectangle(x, y, 1, num2 - y);
+                    hashtable.Add(appointment.m_nKey, rectangle);
+                }
+            }
+            this.m_ApptOverlapTable.Clear();
+            foreach (int num4 in hashtable.Keys)
+            {
+                this.m_ApptOverlapTable.Add(num4, 0);
+            }
+            if (this.m_ApptOverlapTable.Count != 0)
+            {
+                int num5 = (this.m_sResourcesArray.Count > 1) ? 1 : this.StartDate.DayOfYear;
+                int num6 = (this.m_sResourcesArray.Count > 1) ? (this.m_sResourcesArray.Count + 1) : (this.Columns + this.StartDate.DayOfYear);
+                for (int i = num5; i < num6; i++)
+                {
+                    ArrayList list = new ArrayList();
+                    for (int j = 1; j < this.Rows; j++)
+                    {
+                        Rectangle rectangle2 = new Rectangle(i, j * this.m_nTimeScale, 1, this.m_nTimeScale);
+                        int num9 = -1;
+                        list.Clear();
+                        foreach (int num10 in hashtable.Keys)
+                        {
+                            Rectangle rect = (Rectangle) hashtable[num10];
+                            if (rectangle2.IntersectsWith(rect))
+                            {
+                                num9++;
+                                list.Add(num10);
+                            }
+                        }
+                        if (num9 > 0)
+                        {
+                            foreach (object obj2 in list)
+                            {
+                                int num11 = (int) obj2;
+                                if (((int) this.m_ApptOverlapTable[num11]) < num9)
+                                {
+                                    this.m_ApptOverlapTable[num11] = num9;
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+
+        private void tickEventHandler(object o, EventArgs e)
+        {
+            Point point = new Point(base.AutoScrollPosition.X, base.AutoScrollPosition.Y);
+            int x = point.X;
+            int num = point.Y * -1;
+            num = this.m_bScrollDown ? (num + 5) : (num - 5);
+            point.Y = num;
+            base.AutoScrollPosition = point;
+            base.Invalidate();
+        }
+
+        private bool TimesOverlap(DateTime dStart1, DateTime dEnd1, DateTime dStart2, DateTime dEnd2)
+        {
+            long ticks = dEnd1.Ticks - dStart1.Ticks;
+            TimeSpan ts = new TimeSpan(ticks);
+            ticks = dEnd2.Ticks - dStart2.Ticks;
+            new TimeSpan(ticks).Subtract(ts);
+            Rectangle rect = new Rectangle();
+            Rectangle rectangle2 = new Rectangle();
+            rect.X = 0;
+            rectangle2.X = 0;
+            rect.Width = 1;
+            rectangle2.Width = 1;
+            rect.Y = this.MinSince80(dStart1);
+            rect.Height = this.MinSince80(dEnd1) - rect.Y;
+            rectangle2.Y = this.MinSince80(dStart2);
+            rectangle2.Height = this.MinSince80(dEnd2) - rectangle2.Y;
+            return rectangle2.IntersectsWith(rect);
+        }
+
+        protected override void WndProc(ref Message msg)
+        {
+            try
+            {
+                if (msg.Msg == 0x115)
+                {
+                    this.m_bScroll = true;
+                    base.Invalidate(false);
+                    this.m_bScroll = false;
+                }
+                if (msg.Msg == 0x114)
+                {
+                    base.Invalidate(false);
+                }
+                base.WndProc(ref msg);
+            }
+            catch (Exception exception)
+            {
+                MessageBox.Show("CalendarGrid::WndProc:  " + exception.Message + "\nStack: " + exception.StackTrace);
+            }
+        }
+
+        public CGAppointments Appointments
+        {
+            get
+            {
+                return this.m_Appointments;
+            }
+            set
+            {
+                this.m_Appointments = value;
+            }
+        }
+
+        public string ApptDragSource
+        {
+            get
+            {
+                return this.m_sDragSource;
+            }
+            set
+            {
+                this.m_sDragSource = value;
+            }
+        }
+
+        public ArrayList AvailabilityArray
+        {
+            get
+            {
+                return this.m_pAvArray;
+            }
+            set
+            {
+                this.m_pAvArray = value;
+            }
+        }
+
+        public int CellHeight
+        {
+            get
+            {
+                return this.m_cellHeight;
+            }
+        }
+
+        public ToolTip CGToolTip
+        {
+            get
+            {
+                return this.m_toolTip;
+            }
+        }
+
+        public int Columns
+        {
+            get
+            {
+                return this.m_nColumns;
+            }
+            set
+            {
+                if ((value > 0) && (value < 11))
+                {
+                    this.m_nColumns = value;
+                    this.m_gridCells.ClearAllCells();
+                    this.m_selectedRange.Cells.ClearAllCells();
+                    Graphics g = base.CreateGraphics();
+                    this.BuildGridCellsArray(g);
+                    this.SetAppointmentTypes();
+                    base.Invalidate();
+                }
+            }
+        }
+
+        public bool DrawWalkIns
+        {
+            get
+            {
+                return this.m_bDrawWalkIns;
+            }
+            set
+            {
+                this.m_bDrawWalkIns = value;
+            }
+        }
+
+        public string GridBackColor
+        {
+            get
+            {
+                return this.m_GridBackColor;
+            }
+            set
+            {
+                this.m_GridBackColor = value;
+            }
+        }
+
+        public bool GridEnter
+        {
+            get
+            {
+                return this.m_bGridEnter;
+            }
+            set
+            {
+                this.m_bGridEnter = value;
+            }
+        }
+
+        public ArrayList Resources
+        {
+            get
+            {
+                return this.m_sResourcesArray;
+            }
+            set
+            {
+                this.m_sResourcesArray = value;
+            }
+        }
+
+        public int Rows
+        {
+            get
+            {
+                return (0x5a0 / this.m_nTimeScale);
+            }
+        }
+
+        public int SelectedAppointment
+        {
+            get
+            {
+                return this.m_nSelectID;
+            }
+            set
+            {
+                this.m_nSelectID = value;
+            }
+        }
+
+        public CGAppointments SelectedAppointments
+        {
+            get
+            {
+                return this.m_SelectedAppointments;
+            }
+        }
+
+        public CGRange SelectedRange
+        {
+            get
+            {
+                return this.m_selectedRange;
+            }
+        }
+
+        public DateTime StartDate
+        {
+            get
+            {
+                return this.m_dtStart;
+            }
+            set
+            {
+                this.m_dtStart = value;
+            }
+        }
+
+        public int TimeScale
+        {
+            get
+            {
+                return this.m_nTimeScale;
+            }
+            set
+            {
+                if ((((value == 5) || (value == 10)) || ((value == 15) || (value == 20))) || ((value == 30) || (value == 60)))
+                {
+                    this.m_nTimeScale = value;
+                    this.m_gridCells.ClearAllCells();
+                    this.m_selectedRange.Cells.ClearAllCells();
+                    Graphics g = base.CreateGraphics();
+                    this.BuildGridCellsArray(g);
+                    this.SetAppointmentTypes();
+                    base.Invalidate();
+                }
+            }
+        }
+    }
+}
+
Index: heduling/trunk/cs/bsdx0200GUISourceCode/CalendarGrid.csproj
===================================================================
--- /Scheduling/trunk/cs/bsdx0200GUISourceCode/CalendarGrid.csproj	(revision 621)
+++ 	(revision )
@@ -1,129 +1,0 @@
-﻿<Project DefaultTargets="Build" ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <ProjectType>Local</ProjectType>
-    <ProductVersion>8.0.30729</ProductVersion>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{8D1686A4-87D3-43F9-9E54-6CFB307A734E}</ProjectGuid>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ApplicationIcon>
-    </ApplicationIcon>
-    <AssemblyKeyContainerName>
-    </AssemblyKeyContainerName>
-    <AssemblyName>CalendarGrid</AssemblyName>
-    <AssemblyOriginatorKeyFile>
-    </AssemblyOriginatorKeyFile>
-    <DefaultClientScript>JScript</DefaultClientScript>
-    <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
-    <DefaultTargetSchema>IE50</DefaultTargetSchema>
-    <DelaySign>false</DelaySign>
-    <OutputType>Library</OutputType>
-    <RootNamespace>CalendarGrid</RootNamespace>
-    <StartupObject>
-    </StartupObject>
-    <FileUpgradeFlags>
-    </FileUpgradeFlags>
-    <OldToolsVersion>0.0</OldToolsVersion>
-    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
-    <UpgradeBackupLocation>
-    </UpgradeBackupLocation>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <OutputPath>bin\Debug\</OutputPath>
-    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
-    <BaseAddress>285212672</BaseAddress>
-    <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
-    <ConfigurationOverrideFile>
-    </ConfigurationOverrideFile>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <DocumentationFile>
-    </DocumentationFile>
-    <DebugSymbols>true</DebugSymbols>
-    <FileAlignment>4096</FileAlignment>
-    <Optimize>false</Optimize>
-    <RegisterForComInterop>false</RegisterForComInterop>
-    <RemoveIntegerChecks>false</RemoveIntegerChecks>
-    <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
-    <WarningLevel>4</WarningLevel>
-    <DebugType>full</DebugType>
-    <ErrorReport>prompt</ErrorReport>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <OutputPath>bin\Release\</OutputPath>
-    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
-    <BaseAddress>285212672</BaseAddress>
-    <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
-    <ConfigurationOverrideFile>
-    </ConfigurationOverrideFile>
-    <DefineConstants>TRACE</DefineConstants>
-    <DocumentationFile>
-    </DocumentationFile>
-    <DebugSymbols>false</DebugSymbols>
-    <FileAlignment>4096</FileAlignment>
-    <Optimize>true</Optimize>
-    <RegisterForComInterop>false</RegisterForComInterop>
-    <RemoveIntegerChecks>false</RemoveIntegerChecks>
-    <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
-    <WarningLevel>4</WarningLevel>
-    <DebugType>none</DebugType>
-    <ErrorReport>prompt</ErrorReport>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="RPX20Lib">
-      <Name>RPX20Lib</Name>
-      <HintPath>..\..\RPX20\ReleaseMinDependency\RPX20Lib.dll</HintPath>
-    </Reference>
-    <Reference Include="System">
-      <Name>System</Name>
-    </Reference>
-    <Reference Include="System.Data">
-      <Name>System.Data</Name>
-    </Reference>
-    <Reference Include="System.Design">
-      <Name>System.Design</Name>
-    </Reference>
-    <Reference Include="System.Drawing">
-      <Name>System.Drawing</Name>
-    </Reference>
-    <Reference Include="System.Windows.Forms">
-      <Name>System.Windows.Forms</Name>
-    </Reference>
-    <Reference Include="System.Xml">
-      <Name>System.XML</Name>
-    </Reference>
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="AssemblyInfo.cs" />
-    <Compile Include="CalendarGrid.cs">
-      <SubType>Component</SubType>
-    </Compile>
-    <Compile Include="CGAppointment.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="CGAppointments.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="CGCell.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="CGCells.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="CGDocument.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="CGRange.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <EmbeddedResource Include="CalendarGrid.resx">
-      <DependentUpon>CalendarGrid.cs</DependentUpon>
-    </EmbeddedResource>
-  </ItemGroup>
-  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
-  <PropertyGroup>
-    <PreBuildEvent>
-    </PreBuildEvent>
-    <PostBuildEvent>
-    </PostBuildEvent>
-  </PropertyGroup>
-</Project>
Index: heduling/trunk/cs/bsdx0200GUISourceCode/CalendarGrid.csproj.user
===================================================================
--- /Scheduling/trunk/cs/bsdx0200GUISourceCode/CalendarGrid.csproj.user	(revision 621)
+++ 	(revision )
@@ -1,56 +1,0 @@
-﻿<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ReferencePath>C:\Documents and Settings\hwhitt\My Documents\Visual Studio Projects\RPX20\ReleaseMinDependency\</ReferencePath>
-    <CopyProjectDestinationFolder>
-    </CopyProjectDestinationFolder>
-    <CopyProjectUncPath>
-    </CopyProjectUncPath>
-    <CopyProjectOption>0</CopyProjectOption>
-    <ProjectView>ProjectFiles</ProjectView>
-    <ProjectTrust>0</ProjectTrust>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <EnableASPDebugging>false</EnableASPDebugging>
-    <EnableASPXDebugging>false</EnableASPXDebugging>
-    <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
-    <EnableSQLServerDebugging>false</EnableSQLServerDebugging>
-    <RemoteDebugEnabled>false</RemoteDebugEnabled>
-    <RemoteDebugMachine>
-    </RemoteDebugMachine>
-    <StartAction>Project</StartAction>
-    <StartArguments>
-    </StartArguments>
-    <StartPage>
-    </StartPage>
-    <StartProgram>
-    </StartProgram>
-    <StartURL>
-    </StartURL>
-    <StartWorkingDirectory>
-    </StartWorkingDirectory>
-    <StartWithIE>true</StartWithIE>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <EnableASPDebugging>false</EnableASPDebugging>
-    <EnableASPXDebugging>false</EnableASPXDebugging>
-    <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
-    <EnableSQLServerDebugging>false</EnableSQLServerDebugging>
-    <RemoteDebugEnabled>false</RemoteDebugEnabled>
-    <RemoteDebugMachine>
-    </RemoteDebugMachine>
-    <StartAction>Project</StartAction>
-    <StartArguments>
-    </StartArguments>
-    <StartPage>
-    </StartPage>
-    <StartProgram>
-    </StartProgram>
-    <StartURL>
-    </StartURL>
-    <StartWorkingDirectory>
-    </StartWorkingDirectory>
-    <StartWithIE>true</StartWithIE>
-  </PropertyGroup>
-</Project>
Index: /Scheduling/trunk/cs/bsdx0200GUISourceCode/ClinicalScheduling.csproj
===================================================================
--- /Scheduling/trunk/cs/bsdx0200GUISourceCode/ClinicalScheduling.csproj	(revision 621)
+++ /Scheduling/trunk/cs/bsdx0200GUISourceCode/ClinicalScheduling.csproj	(revision 622)
@@ -102,8 +102,4 @@
       <HintPath>.\BMXNet20.dll</HintPath>
     </Reference>
-    <Reference Include="CalendarGrid, Version=1.0.2790.30319, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>.\CalendarGrid.dll</HintPath>
-    </Reference>
     <Reference Include="CrystalDecisions.CrystalReports.Engine, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL">
       <Private>True</Private>
@@ -190,4 +186,12 @@
       <SubType>Code</SubType>
     </Compile>
+    <Compile Include="CalendarGrid.cs">
+      <SubType>Component</SubType>
+    </Compile>
+    <Compile Include="CGAppointment.cs" />
+    <Compile Include="CGAppointmentChangedArgs.cs" />
+    <Compile Include="CGAppointmentChangedHandler.cs" />
+    <Compile Include="CGAppointments.cs" />
+    <Compile Include="CGAvailability.cs" />
     <Compile Include="CGAVDocument.cs">
       <SubType>Code</SubType>
@@ -196,4 +200,6 @@
       <SubType>Form</SubType>
     </Compile>
+    <Compile Include="CGCell.cs" />
+    <Compile Include="CGCells.cs" />
     <Compile Include="CGDocument.cs">
       <SubType>Code</SubType>
@@ -202,7 +208,11 @@
       <SubType>Form</SubType>
     </Compile>
+    <Compile Include="CGRange.cs" />
+    <Compile Include="CGResource.cs" />
     <Compile Include="CGSchedLib.cs">
       <SubType>Code</SubType>
     </Compile>
+    <Compile Include="CGSelectionChangedArgs.cs" />
+    <Compile Include="CGSelectionChangedHandler.cs" />
     <Compile Include="CGView.cs">
       <SubType>Form</SubType>
@@ -237,4 +247,7 @@
       <DesignTime>True</DesignTime>
       <AutoGen>True</AutoGen>
+    </Compile>
+    <Compile Include="DAccessBlock.cs">
+      <SubType>Form</SubType>
     </Compile>
     <Compile Include="DAccessGroup.cs">
Index: /Scheduling/trunk/cs/bsdx0200GUISourceCode/DAccessBlock.cs
===================================================================
--- /Scheduling/trunk/cs/bsdx0200GUISourceCode/DAccessBlock.cs	(revision 622)
+++ /Scheduling/trunk/cs/bsdx0200GUISourceCode/DAccessBlock.cs	(revision 622)
@@ -0,0 +1,418 @@
+﻿namespace IndianHealthService.ClinicalScheduling
+{
+    using System;
+    using System.ComponentModel;
+    using System.Data;
+    using System.Drawing;
+    using System.Windows.Forms;
+    using System.Xml;
+    /// <summary>
+    /// This class was regenerated from Calendargrid.dll using Reflector.exe
+    /// by Sam Habiel for WorldVista. The original source code is lost.
+    /// </summary>
+    public class DAccessBlock : Form
+    {
+        private ComboBox cboAccessTypeFilter;
+        private Button cmdCancel;
+        private Button cmdOK;
+        private Container components;
+        private Label label1;
+        private Label label15;
+        private Label label2;
+        private Label label3;
+        private Label label4;
+        private Label label6;
+        private Label label7;
+        private Label lblClinic;
+        private Label lblEndTime;
+        private Label lblStartTime;
+        private ListBox lstAccessTypes;
+        private DataSet m_dsGlobal;
+        private DataTable m_dtTypes;
+        private DataView m_dvTypes;
+        private CGAppointment m_pAppt;
+        private NumericUpDown nudSlots;
+        private Panel panel1;
+        private Panel panel2;
+        private TextBox txtNote;
+
+        public DAccessBlock()
+        {
+            this.InitializeComponent();
+        }
+
+        private void cboAccessTypeFilter_SelectionChangeCommitted(object sender, EventArgs e)
+        {
+            if (this.cboAccessTypeFilter.Text == "<Show All Access Types>")
+            {
+                this.LoadListBox("ALL");
+            }
+            else
+            {
+                this.LoadListBox("SELECTED");
+            }
+        }
+
+        private void cmdOK_Click(object sender, EventArgs e)
+        {
+            this.UpdateDialogData(false);
+        }
+
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (this.components != null))
+            {
+                this.components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        private void InitializeComponent()
+        {
+            this.panel1 = new Panel();
+            this.cmdCancel = new Button();
+            this.cmdOK = new Button();
+            this.panel2 = new Panel();
+            this.label4 = new Label();
+            this.cboAccessTypeFilter = new ComboBox();
+            this.lstAccessTypes = new ListBox();
+            this.nudSlots = new NumericUpDown();
+            this.label6 = new Label();
+            this.lblEndTime = new Label();
+            this.label7 = new Label();
+            this.label2 = new Label();
+            this.lblClinic = new Label();
+            this.label15 = new Label();
+            this.txtNote = new TextBox();
+            this.label1 = new Label();
+            this.lblStartTime = new Label();
+            this.label3 = new Label();
+            this.panel1.SuspendLayout();
+            this.panel2.SuspendLayout();
+            this.nudSlots.BeginInit();
+            base.SuspendLayout();
+            this.panel1.Controls.Add(this.cmdCancel);
+            this.panel1.Controls.Add(this.cmdOK);
+            this.panel1.Dock = DockStyle.Bottom;
+            this.panel1.Location = new Point(0, 0x14e);
+            this.panel1.Name = "panel1";
+            this.panel1.Size = new Size(0x192, 40);
+            this.panel1.TabIndex = 2;
+            this.cmdCancel.DialogResult = DialogResult.Cancel;
+            this.cmdCancel.Location = new Point(0x120, 8);
+            this.cmdCancel.Name = "cmdCancel";
+            this.cmdCancel.Size = new Size(0x40, 0x18);
+            this.cmdCancel.TabIndex = 1;
+            this.cmdCancel.Text = "Cancel";
+            this.cmdOK.DialogResult = DialogResult.OK;
+            this.cmdOK.Location = new Point(0xd0, 8);
+            this.cmdOK.Name = "cmdOK";
+            this.cmdOK.Size = new Size(0x40, 0x18);
+            this.cmdOK.TabIndex = 0;
+            this.cmdOK.Text = "OK";
+            this.cmdOK.Click += new EventHandler(this.cmdOK_Click);
+            this.panel2.Controls.Add(this.label4);
+            this.panel2.Controls.Add(this.cboAccessTypeFilter);
+            this.panel2.Controls.Add(this.lstAccessTypes);
+            this.panel2.Controls.Add(this.nudSlots);
+            this.panel2.Controls.Add(this.label6);
+            this.panel2.Controls.Add(this.lblEndTime);
+            this.panel2.Controls.Add(this.label7);
+            this.panel2.Controls.Add(this.label2);
+            this.panel2.Controls.Add(this.lblClinic);
+            this.panel2.Controls.Add(this.label15);
+            this.panel2.Controls.Add(this.txtNote);
+            this.panel2.Controls.Add(this.label1);
+            this.panel2.Controls.Add(this.lblStartTime);
+            this.panel2.Controls.Add(this.label3);
+            this.panel2.Dock = DockStyle.Fill;
+            this.panel2.Location = new Point(0, 0);
+            this.panel2.Name = "panel2";
+            this.panel2.Size = new Size(0x192, 0x14e);
+            this.panel2.TabIndex = 3;
+            this.label4.Location = new Point(8, 0x88);
+            this.label4.Name = "label4";
+            this.label4.Size = new Size(80, 0x10);
+            this.label4.TabIndex = 0x29;
+            this.label4.Text = "Access Group:";
+            this.label4.TextAlign = ContentAlignment.MiddleRight;
+            this.cboAccessTypeFilter.DropDownStyle = ComboBoxStyle.DropDownList;
+            this.cboAccessTypeFilter.Location = new Point(0x58, 0x88);
+            this.cboAccessTypeFilter.Name = "cboAccessTypeFilter";
+            this.cboAccessTypeFilter.Size = new Size(0x128, 0x15);
+            this.cboAccessTypeFilter.TabIndex = 40;
+            this.cboAccessTypeFilter.SelectionChangeCommitted += new EventHandler(this.cboAccessTypeFilter_SelectionChangeCommitted);
+            this.lstAccessTypes.Location = new Point(0x58, 0xb0);
+            this.lstAccessTypes.Name = "lstAccessTypes";
+            this.lstAccessTypes.Size = new Size(0x128, 0x52);
+            this.lstAccessTypes.TabIndex = 0x26;
+            this.nudSlots.Location = new Point(0x58, 0x38);
+            int[] bits = new int[4];
+            bits[0] = 0x3e6;
+            this.nudSlots.Maximum = new decimal(bits);
+            this.nudSlots.Name = "nudSlots";
+            this.nudSlots.Size = new Size(40, 20);
+            this.nudSlots.TabIndex = 0x25;
+            int[] numArray2 = new int[4];
+            numArray2[0] = 1;
+            this.nudSlots.Value = new decimal(numArray2);
+            this.label6.Location = new Point(40, 0x38);
+            this.label6.Name = "label6";
+            this.label6.Size = new Size(40, 0x10);
+            this.label6.TabIndex = 0x24;
+            this.label6.Text = "Slots:";
+            this.label6.TextAlign = ContentAlignment.MiddleRight;
+            this.lblEndTime.BorderStyle = BorderStyle.Fixed3D;
+            this.lblEndTime.Location = new Point(0x110, 8);
+            this.lblEndTime.Name = "lblEndTime";
+            this.lblEndTime.Size = new Size(0x70, 0x10);
+            this.lblEndTime.TabIndex = 0x22;
+            this.label7.Location = new Point(0xd0, 8);
+            this.label7.Name = "label7";
+            this.label7.Size = new Size(0x40, 0x10);
+            this.label7.TabIndex = 0x21;
+            this.label7.Text = "End Time:";
+            this.label7.TextAlign = ContentAlignment.MiddleRight;
+            this.label2.Location = new Point(0x10, 0xb0);
+            this.label2.Name = "label2";
+            this.label2.Size = new Size(0x48, 0x10);
+            this.label2.TabIndex = 0x1d;
+            this.label2.Text = "Access Type:";
+            this.label2.TextAlign = ContentAlignment.MiddleRight;
+            this.lblClinic.BorderStyle = BorderStyle.Fixed3D;
+            this.lblClinic.Location = new Point(0x58, 0x20);
+            this.lblClinic.Name = "lblClinic";
+            this.lblClinic.Size = new Size(0x128, 0x10);
+            this.lblClinic.TabIndex = 0x1b;
+            this.label15.Location = new Point(40, 0x20);
+            this.label15.Name = "label15";
+            this.label15.Size = new Size(40, 0x10);
+            this.label15.TabIndex = 0x1a;
+            this.label15.Text = "Clinic:";
+            this.label15.TextAlign = ContentAlignment.MiddleRight;
+            this.txtNote.AcceptsReturn = true;
+            this.txtNote.Location = new Point(0x58, 80);
+            this.txtNote.Multiline = true;
+            this.txtNote.Name = "txtNote";
+            this.txtNote.Size = new Size(0x128, 0x30);
+            this.txtNote.TabIndex = 0x19;
+            this.label1.Location = new Point(0x18, 0x58);
+            this.label1.Name = "label1";
+            this.label1.Size = new Size(0x38, 0x10);
+            this.label1.TabIndex = 0x18;
+            this.label1.Text = "Note:";
+            this.label1.TextAlign = ContentAlignment.MiddleRight;
+            this.lblStartTime.BorderStyle = BorderStyle.Fixed3D;
+            this.lblStartTime.Location = new Point(0x58, 8);
+            this.lblStartTime.Name = "lblStartTime";
+            this.lblStartTime.Size = new Size(120, 0x10);
+            this.lblStartTime.TabIndex = 0x16;
+            this.label3.Location = new Point(0x18, 8);
+            this.label3.Name = "label3";
+            this.label3.Size = new Size(0x40, 0x10);
+            this.label3.TabIndex = 20;
+            this.label3.Text = "Start Time:";
+            this.label3.TextAlign = ContentAlignment.MiddleRight;
+            base.AcceptButton = this.cmdOK;
+            this.AutoScaleBaseSize = new Size(5, 13);
+            base.CancelButton = this.cmdCancel;
+            base.ClientSize = new Size(0x192, 0x176);
+            base.Controls.Add(this.panel2);
+            base.Controls.Add(this.panel1);
+            base.FormBorderStyle = FormBorderStyle.FixedDialog;
+            base.Name = "DAccessBlock";
+            base.StartPosition = FormStartPosition.CenterParent;
+            this.Text = "Access Block";
+            this.panel1.ResumeLayout(false);
+            this.panel2.ResumeLayout(false);
+            this.panel2.PerformLayout();
+            this.nudSlots.EndInit();
+            base.ResumeLayout(false);
+        }
+
+        public void InitializePage(CGAppointment pAppt, DataSet dsGlobal)
+        {
+            this.m_pAppt = new CGAppointment();
+            this.m_pAppt.StartTime = pAppt.StartTime;
+            this.m_pAppt.EndTime = pAppt.EndTime;
+            this.m_pAppt.Resource = pAppt.Resource;
+            this.m_pAppt.Note = pAppt.Note;
+            this.m_pAppt.Slots = pAppt.Slots;
+            this.m_pAppt.AccessTypeID = pAppt.AccessTypeID;
+            this.m_pAppt.AccessTypeName = pAppt.AccessTypeName;
+            this.m_dsGlobal = dsGlobal;
+            this.LoadListBox("ALL");
+            DataTable table = dsGlobal.Tables["AccessGroup"];
+            DataSet set = new DataSet("dsTemp");
+            set.Tables.Add(table.Copy());
+            DataTable table2 = set.Tables["AccessGroup"];
+            DataView view = new DataView(table2);
+            view.AddNew()["ACCESS_GROUP"] = "<Show All Access Types>";
+            view.Sort = "ACCESS_GROUP ASC";
+            this.cboAccessTypeFilter.DataSource = view;
+            this.cboAccessTypeFilter.DisplayMember = "ACCESS_GROUP";
+            this.cboAccessTypeFilter.SelectedIndex = this.cboAccessTypeFilter.Items.Count - 1;
+            this.UpdateDialogData(true);
+        }
+
+        public void InitializePage(DateTime dStart, DateTime dEnd, string sClinic, string sNote, DataSet dsGlobal)
+        {
+            this.m_pAppt = new CGAppointment();
+            this.m_pAppt.StartTime = dStart;
+            this.m_pAppt.EndTime = dEnd;
+            this.m_pAppt.Resource = sClinic;
+            this.m_pAppt.Note = sNote;
+            this.m_pAppt.Slots = 1;
+            this.m_dsGlobal = dsGlobal;
+            this.LoadListBox("ALL");
+            DataTable table = dsGlobal.Tables["AccessGroup"];
+            DataSet set = new DataSet("dsTemp");
+            set.Tables.Add(table.Copy());
+            DataTable table2 = set.Tables["AccessGroup"];
+            DataView view = new DataView(table2);
+            view.AddNew()["ACCESS_GROUP"] = "<Show All Access Types>";
+            view.Sort = "ACCESS_GROUP ASC";
+            this.cboAccessTypeFilter.DataSource = view;
+            this.cboAccessTypeFilter.DisplayMember = "ACCESS_GROUP";
+            this.cboAccessTypeFilter.SelectedIndex = this.cboAccessTypeFilter.Items.Count - 1;
+            this.m_pAppt.AccessTypeID = 0;
+            this.UpdateDialogData(true);
+        }
+
+        public void LoadListBox(string sGroup)
+        {
+            string str = "";
+            if (sGroup == "ALL")
+            {
+                this.m_dtTypes = this.m_dsGlobal.Tables["AccessTypes"];
+                this.m_dvTypes = new DataView(this.m_dtTypes);
+                str = "INACTIVE <> 'YES'";
+                this.m_dvTypes.RowFilter = str;
+                this.lstAccessTypes.DataSource = this.m_dvTypes;
+                this.lstAccessTypes.DisplayMember = "ACCESS_TYPE_NAME";
+                this.lstAccessTypes.ValueMember = "BMXIEN";
+            }
+            else
+            {
+                this.m_dtTypes = this.m_dsGlobal.Tables["AccessGroupType"];
+                this.m_dvTypes = new DataView(this.m_dtTypes);
+                str = "ACCESS_GROUP = '" + this.cboAccessTypeFilter.Text + "'";
+                this.m_dvTypes.RowFilter = str;
+                this.lstAccessTypes.DataSource = this.m_dvTypes;
+                this.lstAccessTypes.DisplayMember = "ACCESS_TYPE";
+                this.lstAccessTypes.ValueMember = "ACCESS_TYPE_ID";
+            }
+        }
+
+        private void UpdateDialogData(bool b)
+        {
+            if (b)
+            {
+                this.lblClinic.Text = this.m_pAppt.Resource;
+                this.lblEndTime.Text = this.m_pAppt.EndTime.ToShortDateString() + " " + this.m_pAppt.EndTime.ToShortTimeString();
+                this.lblStartTime.Text = this.m_pAppt.StartTime.ToShortDateString() + " " + this.m_pAppt.StartTime.ToShortTimeString();
+                this.txtNote.Text = this.m_pAppt.Note;
+                this.nudSlots.Value = this.m_pAppt.Slots;
+                if (this.m_pAppt.AccessTypeID != 0)
+                {
+                    this.lstAccessTypes.SelectedValue = this.m_pAppt.AccessTypeID;
+                }
+            }
+            else
+            {
+                this.m_pAppt.Note = this.txtNote.Text;
+                int selectedIndex = this.lstAccessTypes.SelectedIndex;
+                string str = this.lstAccessTypes.SelectedValue.ToString();
+                str = (str == "") ? "-1" : str;
+                int num = Convert.ToInt16(str);
+                this.m_pAppt.AccessTypeID = num;
+                this.m_pAppt.Slots = Convert.ToInt16(this.nudSlots.Value);
+            }
+        }
+
+        public int AccessTypeID
+        {
+            get
+            {
+                return this.m_pAppt.AccessTypeID;
+            }
+            set
+            {
+                this.m_pAppt.AccessTypeID = value;
+            }
+        }
+
+        public CGAppointment Appointment
+        {
+            get
+            {
+                return this.m_pAppt;
+            }
+            set
+            {
+                this.m_pAppt = value;
+            }
+        }
+
+        public DateTime EndTime
+        {
+            get
+            {
+                return this.m_pAppt.EndTime;
+            }
+            set
+            {
+                this.m_pAppt.EndTime = value;
+            }
+        }
+
+        public string Note
+        {
+            get
+            {
+                return this.m_pAppt.Note;
+            }
+            set
+            {
+                this.m_pAppt.Note = value;
+            }
+        }
+
+        public string Resource
+        {
+            get
+            {
+                return this.m_pAppt.Resource;
+            }
+            set
+            {
+                this.m_pAppt.Resource = value;
+            }
+        }
+
+        public int Slots
+        {
+            get
+            {
+                return this.m_pAppt.Slots;
+            }
+            set
+            {
+                this.m_pAppt.Slots = value;
+            }
+        }
+
+        public DateTime StartTime
+        {
+            get
+            {
+                return this.m_pAppt.StartTime;
+            }
+            set
+            {
+                this.m_pAppt.StartTime = value;
+            }
+        }
+    }
+}
+
Index: /Scheduling/trunk/cs/bsdx0200GUISourceCode/bin/Release/ClinicalScheduling.XML
===================================================================
--- /Scheduling/trunk/cs/bsdx0200GUISourceCode/bin/Release/ClinicalScheduling.XML	(revision 621)
+++ /Scheduling/trunk/cs/bsdx0200GUISourceCode/bin/Release/ClinicalScheduling.XML	(revision 622)
@@ -1084,4 +1084,82 @@
             </summary>
         </member>
+        <member name="T:IndianHealthService.ClinicalScheduling.CalendarGrid">
+            <summary>
+            This class was regenerated from Calendargrid.dll using Reflector.exe
+            by Sam Habiel for WorldVista. The original source code is lost.
+            </summary>
+        </member>
+        <member name="T:IndianHealthService.ClinicalScheduling.DAccessBlock">
+            <summary>
+            This class was regenerated from Calendargrid.dll using Reflector.exe
+            by Sam Habiel for WorldVista. The original source code is lost.
+            </summary>
+        </member>
+        <member name="T:IndianHealthService.ClinicalScheduling.CGAppointment">
+            <summary>
+            This class was regenerated from Calendargrid.dll using Reflector.exe
+            by Sam Habiel for WorldVista. The original source code is lost.
+            </summary>
+        </member>
+        <member name="T:IndianHealthService.ClinicalScheduling.CGAppointmentChangedArgs">
+            <summary>
+            This class was regenerated from Calendargrid.dll using Reflector.exe
+            by Sam Habiel for WorldVista. The original source code is lost.
+            </summary>
+        </member>
+        <member name="T:IndianHealthService.ClinicalScheduling.CGAppointmentChangedHandler">
+            <summary>
+            This class was regenerated from Calendargrid.dll using Reflector.exe
+            by Sam Habiel for WorldVista. The original source code is lost.
+            </summary>
+        </member>
+        <member name="T:IndianHealthService.ClinicalScheduling.CGAppointments">
+            <summary>
+            This class was regenerated from Calendargrid.dll using Reflector.exe
+            by Sam Habiel for WorldVista. The original source code is lost.
+            </summary>
+        </member>
+        <member name="T:IndianHealthService.ClinicalScheduling.CGAvailability">
+            <summary>
+            This class was regenerated from Calendargrid.dll using Reflector.exe
+            by Sam Habiel for WorldVista. The original source code is lost.
+            </summary>
+        </member>
+        <member name="T:IndianHealthService.ClinicalScheduling.CGCell">
+            <summary>
+            This class was regenerated from Calendargrid.dll using Reflector.exe
+            by Sam Habiel for WorldVista. The original source code is lost.
+            </summary>
+        </member>
+        <member name="T:IndianHealthService.ClinicalScheduling.CGCells">
+            <summary>
+            This class was regenerated from Calendargrid.dll using Reflector.exe
+            by Sam Habiel for WorldVista. The original source code is lost.
+            </summary>
+        </member>
+        <member name="T:IndianHealthService.ClinicalScheduling.CGRange">
+            <summary>
+            This class was regenerated from Calendargrid.dll using Reflector.exe
+            by Sam Habiel for WorldVista. The original source code is lost.
+            </summary>
+        </member>
+        <member name="T:IndianHealthService.ClinicalScheduling.CGResource">
+            <summary>
+            This class was regenerated from Calendargrid.dll using Reflector.exe
+            by Sam Habiel for WorldVista. The original source code is lost.
+            </summary>
+        </member>
+        <member name="T:IndianHealthService.ClinicalScheduling.CGSelectionChangedArgs">
+            <summary>
+            This class was regenerated from Calendargrid.dll using Reflector.exe
+            by Sam Habiel for WorldVista. The original source code is lost.
+            </summary>
+        </member>
+        <member name="T:IndianHealthService.ClinicalScheduling.CGSelectionChangedHandler">
+            <summary>
+            This class was regenerated from Calendargrid.dll using Reflector.exe
+            by Sam Habiel for WorldVista. The original source code is lost.
+            </summary>
+        </member>
     </members>
 </doc>
