Index: /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGAVView.cs
===================================================================
--- /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGAVView.cs	(revision 1037)
+++ /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGAVView.cs	(revision 1038)
@@ -59,4 +59,5 @@
             this.lblResource = new System.Windows.Forms.Label();
             this.panelCenter = new System.Windows.Forms.Panel();
+            this.calendarGrid1 = new IndianHealthService.ClinicalScheduling.CalendarGrid();
             this.ctxCalendarGrid = new System.Windows.Forms.ContextMenu();
             this.ctxCalGridAdd = new System.Windows.Forms.MenuItem();
@@ -68,5 +69,5 @@
             this.mnuLoadTemplate = new System.Windows.Forms.MenuItem();
             this.mnuSaveTemplate = new System.Windows.Forms.MenuItem();
-            this.mnuDeleteAllAppointments = new System.Windows.Forms.MenuItem();
+            this.mnuDeleteAllSlots = new System.Windows.Forms.MenuItem();
             this.menuItem6 = new System.Windows.Forms.MenuItem();
             this.mnuSchedulingManagment = new System.Windows.Forms.MenuItem();
@@ -92,5 +93,4 @@
             this.splitter1 = new System.Windows.Forms.Splitter();
             this.saveAccessBlocksWorker = new System.ComponentModel.BackgroundWorker();
-            this.calendarGrid1 = new IndianHealthService.ClinicalScheduling.CalendarGrid();
             this.panelRight.SuspendLayout();
             this.panelClip.SuspendLayout();
@@ -221,250 +221,4 @@
             this.panelCenter.Size = new System.Drawing.Size(712, 345);
             this.panelCenter.TabIndex = 4;
-            // 
-            // ctxCalendarGrid
-            // 
-            this.ctxCalendarGrid.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
-            this.ctxCalGridAdd,
-            this.ctxCalGridEdit,
-            this.ctxCalGridDelete});
-            this.ctxCalendarGrid.Popup += new System.EventHandler(this.ctxCalendarGrid_Popup);
-            // 
-            // ctxCalGridAdd
-            // 
-            this.ctxCalGridAdd.Index = 0;
-            this.ctxCalGridAdd.Text = "Add New Access Block";
-            this.ctxCalGridAdd.Click += new System.EventHandler(this.ctxCalGridAdd_Click);
-            // 
-            // ctxCalGridEdit
-            // 
-            this.ctxCalGridEdit.Index = 1;
-            this.ctxCalGridEdit.Text = "Edit Access Block";
-            this.ctxCalGridEdit.Click += new System.EventHandler(this.ctxCalGridEdit_Click);
-            // 
-            // ctxCalGridDelete
-            // 
-            this.ctxCalGridDelete.Index = 2;
-            this.ctxCalGridDelete.Text = "Delete Access Block";
-            this.ctxCalGridDelete.Click += new System.EventHandler(this.ctxCalGridDelete_Click);
-            // 
-            // tvSchedules
-            // 
-            this.tvSchedules.BackColor = System.Drawing.SystemColors.ControlLight;
-            this.tvSchedules.Dock = System.Windows.Forms.DockStyle.Left;
-            this.tvSchedules.HotTracking = true;
-            this.tvSchedules.Location = new System.Drawing.Point(0, 0);
-            this.tvSchedules.Name = "tvSchedules";
-            this.tvSchedules.Size = new System.Drawing.Size(8, 393);
-            this.tvSchedules.Sorted = true;
-            this.tvSchedules.TabIndex = 5;
-            // 
-            // mainMenu1
-            // 
-            this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
-            this.menuItem1,
-            this.mnuAvailability,
-            this.mnuCalendar,
-            this.mnuHelp});
-            // 
-            // menuItem1
-            // 
-            this.menuItem1.Index = 0;
-            this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
-            this.mnuLoadTemplate,
-            this.mnuSaveTemplate,
-            this.mnuDeleteAllAppointments,
-            this.menuItem6,
-            this.mnuSchedulingManagment,
-            this.menuItem5,
-            this.mnuClose});
-            this.menuItem1.Text = "&File";
-            // 
-            // mnuLoadTemplate
-            // 
-            this.mnuLoadTemplate.Index = 0;
-            this.mnuLoadTemplate.Shortcut = System.Windows.Forms.Shortcut.CtrlA;
-            this.mnuLoadTemplate.Text = "&Apply Template";
-            this.mnuLoadTemplate.Click += new System.EventHandler(this.mnuLoadTemplate_Click);
-            // 
-            // mnuSaveTemplate
-            // 
-            this.mnuSaveTemplate.Index = 1;
-            this.mnuSaveTemplate.Shortcut = System.Windows.Forms.Shortcut.CtrlS;
-            this.mnuSaveTemplate.Text = "&Save Template";
-            this.mnuSaveTemplate.Click += new System.EventHandler(this.mnuSaveTemplate_Click);
-            // 
-            // mnuDeleteAllAppointments
-            // 
-            this.mnuDeleteAllAppointments.Enabled = false;
-            this.mnuDeleteAllAppointments.Index = 2;
-            this.mnuDeleteAllAppointments.Shortcut = System.Windows.Forms.Shortcut.CtrlD;
-            this.mnuDeleteAllAppointments.Text = "&Delete All Appointments";
-            this.mnuDeleteAllAppointments.Click += new System.EventHandler(this.mnuDeleteAllAppointments_Click);
-            // 
-            // menuItem6
-            // 
-            this.menuItem6.Index = 3;
-            this.menuItem6.Text = "-";
-            // 
-            // mnuSchedulingManagment
-            // 
-            this.mnuSchedulingManagment.Index = 4;
-            this.mnuSchedulingManagment.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftM;
-            this.mnuSchedulingManagment.Text = "Scheduling &Management";
-            this.mnuSchedulingManagment.Click += new System.EventHandler(this.mnuSchedulingManagment_Click);
-            // 
-            // menuItem5
-            // 
-            this.menuItem5.Index = 5;
-            this.menuItem5.Text = "-";
-            // 
-            // mnuClose
-            // 
-            this.mnuClose.Index = 6;
-            this.mnuClose.Shortcut = System.Windows.Forms.Shortcut.CtrlW;
-            this.mnuClose.Text = "&Close";
-            this.mnuClose.Click += new System.EventHandler(this.mnuClose_Click);
-            // 
-            // mnuAvailability
-            // 
-            this.mnuAvailability.Index = 1;
-            this.mnuAvailability.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
-            this.mnuAddNewAV,
-            this.mnuRemoveAV,
-            this.mnuEditAV});
-            this.mnuAvailability.Text = "&Access Blocks";
-            this.mnuAvailability.Popup += new System.EventHandler(this.mnuAvailability_Popup);
-            // 
-            // mnuAddNewAV
-            // 
-            this.mnuAddNewAV.Index = 0;
-            this.mnuAddNewAV.Shortcut = System.Windows.Forms.Shortcut.CtrlN;
-            this.mnuAddNewAV.Text = "Add &New Block";
-            this.mnuAddNewAV.Click += new System.EventHandler(this.mnuAddNewAV_Click);
-            // 
-            // mnuRemoveAV
-            // 
-            this.mnuRemoveAV.Index = 1;
-            this.mnuRemoveAV.Shortcut = System.Windows.Forms.Shortcut.CtrlR;
-            this.mnuRemoveAV.Text = "&Remove Block";
-            this.mnuRemoveAV.Click += new System.EventHandler(this.mnuRemoveAV_Click);
-            // 
-            // mnuEditAV
-            // 
-            this.mnuEditAV.Index = 2;
-            this.mnuEditAV.Shortcut = System.Windows.Forms.Shortcut.CtrlE;
-            this.mnuEditAV.Text = "&Edit Block";
-            this.mnuEditAV.Click += new System.EventHandler(this.mnuEditAV_Click);
-            // 
-            // mnuCalendar
-            // 
-            this.mnuCalendar.Index = 2;
-            this.mnuCalendar.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
-            this.mnu1Day,
-            this.mnu5Day,
-            this.mnu7Day,
-            this.menuItem7,
-            this.mnuTimeScale,
-            this.mnuViewRightPanel});
-            this.mnuCalendar.Text = "&View";
-            // 
-            // mnu1Day
-            // 
-            this.mnu1Day.Index = 0;
-            this.mnu1Day.Shortcut = System.Windows.Forms.Shortcut.Ctrl1;
-            this.mnu1Day.Text = "&1-Day View";
-            this.mnu1Day.Click += new System.EventHandler(this.mnu1Day_Click);
-            // 
-            // mnu5Day
-            // 
-            this.mnu5Day.Index = 1;
-            this.mnu5Day.Shortcut = System.Windows.Forms.Shortcut.Ctrl5;
-            this.mnu5Day.Text = "&5-Day View";
-            this.mnu5Day.Click += new System.EventHandler(this.mnu5Day_Click);
-            // 
-            // mnu7Day
-            // 
-            this.mnu7Day.Index = 2;
-            this.mnu7Day.Shortcut = System.Windows.Forms.Shortcut.Ctrl7;
-            this.mnu7Day.Text = "&7-Day View";
-            this.mnu7Day.Click += new System.EventHandler(this.mnu7Day_Click);
-            // 
-            // menuItem7
-            // 
-            this.menuItem7.Index = 3;
-            this.menuItem7.Text = "-";
-            // 
-            // mnuTimeScale
-            // 
-            this.mnuTimeScale.Index = 4;
-            this.mnuTimeScale.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
-            this.mnu10Minute,
-            this.mnu15Minute,
-            this.mnu20Minute,
-            this.mnu30Minute});
-            this.mnuTimeScale.Text = "&Time Scale";
-            // 
-            // mnu10Minute
-            // 
-            this.mnu10Minute.Index = 0;
-            this.mnu10Minute.Shortcut = System.Windows.Forms.Shortcut.Ctrl0;
-            this.mnu10Minute.Text = "&10-Minute";
-            this.mnu10Minute.Click += new System.EventHandler(this.mnu10Minute_Click);
-            // 
-            // mnu15Minute
-            // 
-            this.mnu15Minute.Index = 1;
-            this.mnu15Minute.Shortcut = System.Windows.Forms.Shortcut.Ctrl4;
-            this.mnu15Minute.Text = "&15-Minute";
-            this.mnu15Minute.Click += new System.EventHandler(this.mnu15Minute_Click);
-            // 
-            // mnu20Minute
-            // 
-            this.mnu20Minute.Index = 2;
-            this.mnu20Minute.Shortcut = System.Windows.Forms.Shortcut.Ctrl3;
-            this.mnu20Minute.Text = "&20-Minute";
-            this.mnu20Minute.Click += new System.EventHandler(this.mnu20Minute_Click);
-            // 
-            // mnu30Minute
-            // 
-            this.mnu30Minute.Index = 3;
-            this.mnu30Minute.Shortcut = System.Windows.Forms.Shortcut.Ctrl2;
-            this.mnu30Minute.Text = "&30-Minute";
-            this.mnu30Minute.Click += new System.EventHandler(this.mnu30Minute_Click);
-            // 
-            // mnuViewRightPanel
-            // 
-            this.mnuViewRightPanel.Index = 5;
-            this.mnuViewRightPanel.Text = "&Access Block Clipboard";
-            this.mnuViewRightPanel.Click += new System.EventHandler(this.mnuViewRightPanel_Click);
-            // 
-            // mnuHelp
-            // 
-            this.mnuHelp.Index = 3;
-            this.mnuHelp.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
-            this.mnuHelpAbout});
-            this.mnuHelp.Text = "&Help";
-            // 
-            // mnuHelpAbout
-            // 
-            this.mnuHelpAbout.Index = 0;
-            this.mnuHelpAbout.Text = "&About";
-            this.mnuHelpAbout.Click += new System.EventHandler(this.mnuHelpAbout_Click);
-            // 
-            // splitter1
-            // 
-            this.splitter1.Dock = System.Windows.Forms.DockStyle.Right;
-            this.splitter1.Location = new System.Drawing.Point(720, 24);
-            this.splitter1.Name = "splitter1";
-            this.splitter1.Size = new System.Drawing.Size(8, 345);
-            this.splitter1.TabIndex = 6;
-            this.splitter1.TabStop = false;
-            // 
-            // saveAccessBlocksWorker
-            // 
-            this.saveAccessBlocksWorker.WorkerReportsProgress = true;
-            this.saveAccessBlocksWorker.DoWork += new System.ComponentModel.DoWorkEventHandler(this.saveAccessBlocksWorker_DoWork);
-            this.saveAccessBlocksWorker.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.saveAccessBlocksWorker_ProgressChanged);
-            this.saveAccessBlocksWorker.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.saveAccessBlocksWorker_RunWorkerCompleted);
             // 
             // calendarGrid1
@@ -495,4 +249,249 @@
             this.calendarGrid1.CGSelectionChanged += new IndianHealthService.ClinicalScheduling.CGSelectionChangedHandler(this.calendarGrid1_CGSelectionChanged);
             this.calendarGrid1.DoubleClick += new System.EventHandler(this.calendarGrid1_DoubleClick);
+            // 
+            // ctxCalendarGrid
+            // 
+            this.ctxCalendarGrid.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
+            this.ctxCalGridAdd,
+            this.ctxCalGridEdit,
+            this.ctxCalGridDelete});
+            this.ctxCalendarGrid.Popup += new System.EventHandler(this.ctxCalendarGrid_Popup);
+            // 
+            // ctxCalGridAdd
+            // 
+            this.ctxCalGridAdd.Index = 0;
+            this.ctxCalGridAdd.Text = "Add New Access Block";
+            this.ctxCalGridAdd.Click += new System.EventHandler(this.ctxCalGridAdd_Click);
+            // 
+            // ctxCalGridEdit
+            // 
+            this.ctxCalGridEdit.Index = 1;
+            this.ctxCalGridEdit.Text = "Edit Access Block";
+            this.ctxCalGridEdit.Click += new System.EventHandler(this.ctxCalGridEdit_Click);
+            // 
+            // ctxCalGridDelete
+            // 
+            this.ctxCalGridDelete.Index = 2;
+            this.ctxCalGridDelete.Text = "Delete Access Block";
+            this.ctxCalGridDelete.Click += new System.EventHandler(this.ctxCalGridDelete_Click);
+            // 
+            // tvSchedules
+            // 
+            this.tvSchedules.BackColor = System.Drawing.SystemColors.ControlLight;
+            this.tvSchedules.Dock = System.Windows.Forms.DockStyle.Left;
+            this.tvSchedules.HotTracking = true;
+            this.tvSchedules.Location = new System.Drawing.Point(0, 0);
+            this.tvSchedules.Name = "tvSchedules";
+            this.tvSchedules.Size = new System.Drawing.Size(8, 393);
+            this.tvSchedules.Sorted = true;
+            this.tvSchedules.TabIndex = 5;
+            // 
+            // mainMenu1
+            // 
+            this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
+            this.menuItem1,
+            this.mnuAvailability,
+            this.mnuCalendar,
+            this.mnuHelp});
+            // 
+            // menuItem1
+            // 
+            this.menuItem1.Index = 0;
+            this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
+            this.mnuLoadTemplate,
+            this.mnuSaveTemplate,
+            this.mnuDeleteAllSlots,
+            this.menuItem6,
+            this.mnuSchedulingManagment,
+            this.menuItem5,
+            this.mnuClose});
+            this.menuItem1.Text = "&File";
+            // 
+            // mnuLoadTemplate
+            // 
+            this.mnuLoadTemplate.Index = 0;
+            this.mnuLoadTemplate.Shortcut = System.Windows.Forms.Shortcut.CtrlA;
+            this.mnuLoadTemplate.Text = "&Apply Template";
+            this.mnuLoadTemplate.Click += new System.EventHandler(this.mnuLoadTemplate_Click);
+            // 
+            // mnuSaveTemplate
+            // 
+            this.mnuSaveTemplate.Index = 1;
+            this.mnuSaveTemplate.Shortcut = System.Windows.Forms.Shortcut.CtrlS;
+            this.mnuSaveTemplate.Text = "&Save Template";
+            this.mnuSaveTemplate.Click += new System.EventHandler(this.mnuSaveTemplate_Click);
+            // 
+            // mnuDeleteAllSlots
+            // 
+            this.mnuDeleteAllSlots.Index = 2;
+            this.mnuDeleteAllSlots.Shortcut = System.Windows.Forms.Shortcut.CtrlD;
+            this.mnuDeleteAllSlots.Text = "&Delete All Slots";
+            this.mnuDeleteAllSlots.Click += new System.EventHandler(this.mnuDeleteAllSlots_Click);
+            // 
+            // menuItem6
+            // 
+            this.menuItem6.Index = 3;
+            this.menuItem6.Text = "-";
+            // 
+            // mnuSchedulingManagment
+            // 
+            this.mnuSchedulingManagment.Index = 4;
+            this.mnuSchedulingManagment.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftM;
+            this.mnuSchedulingManagment.Text = "Scheduling &Management";
+            this.mnuSchedulingManagment.Click += new System.EventHandler(this.mnuSchedulingManagment_Click);
+            // 
+            // menuItem5
+            // 
+            this.menuItem5.Index = 5;
+            this.menuItem5.Text = "-";
+            // 
+            // mnuClose
+            // 
+            this.mnuClose.Index = 6;
+            this.mnuClose.Shortcut = System.Windows.Forms.Shortcut.CtrlW;
+            this.mnuClose.Text = "&Close";
+            this.mnuClose.Click += new System.EventHandler(this.mnuClose_Click);
+            // 
+            // mnuAvailability
+            // 
+            this.mnuAvailability.Index = 1;
+            this.mnuAvailability.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
+            this.mnuAddNewAV,
+            this.mnuRemoveAV,
+            this.mnuEditAV});
+            this.mnuAvailability.Text = "&Access Blocks";
+            this.mnuAvailability.Popup += new System.EventHandler(this.mnuAvailability_Popup);
+            // 
+            // mnuAddNewAV
+            // 
+            this.mnuAddNewAV.Index = 0;
+            this.mnuAddNewAV.Shortcut = System.Windows.Forms.Shortcut.CtrlN;
+            this.mnuAddNewAV.Text = "Add &New Block";
+            this.mnuAddNewAV.Click += new System.EventHandler(this.mnuAddNewAV_Click);
+            // 
+            // mnuRemoveAV
+            // 
+            this.mnuRemoveAV.Index = 1;
+            this.mnuRemoveAV.Shortcut = System.Windows.Forms.Shortcut.CtrlR;
+            this.mnuRemoveAV.Text = "&Remove Block";
+            this.mnuRemoveAV.Click += new System.EventHandler(this.mnuRemoveAV_Click);
+            // 
+            // mnuEditAV
+            // 
+            this.mnuEditAV.Index = 2;
+            this.mnuEditAV.Shortcut = System.Windows.Forms.Shortcut.CtrlE;
+            this.mnuEditAV.Text = "&Edit Block";
+            this.mnuEditAV.Click += new System.EventHandler(this.mnuEditAV_Click);
+            // 
+            // mnuCalendar
+            // 
+            this.mnuCalendar.Index = 2;
+            this.mnuCalendar.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
+            this.mnu1Day,
+            this.mnu5Day,
+            this.mnu7Day,
+            this.menuItem7,
+            this.mnuTimeScale,
+            this.mnuViewRightPanel});
+            this.mnuCalendar.Text = "&View";
+            // 
+            // mnu1Day
+            // 
+            this.mnu1Day.Index = 0;
+            this.mnu1Day.Shortcut = System.Windows.Forms.Shortcut.Ctrl1;
+            this.mnu1Day.Text = "&1-Day View";
+            this.mnu1Day.Click += new System.EventHandler(this.mnu1Day_Click);
+            // 
+            // mnu5Day
+            // 
+            this.mnu5Day.Index = 1;
+            this.mnu5Day.Shortcut = System.Windows.Forms.Shortcut.Ctrl5;
+            this.mnu5Day.Text = "&5-Day View";
+            this.mnu5Day.Click += new System.EventHandler(this.mnu5Day_Click);
+            // 
+            // mnu7Day
+            // 
+            this.mnu7Day.Index = 2;
+            this.mnu7Day.Shortcut = System.Windows.Forms.Shortcut.Ctrl7;
+            this.mnu7Day.Text = "&7-Day View";
+            this.mnu7Day.Click += new System.EventHandler(this.mnu7Day_Click);
+            // 
+            // menuItem7
+            // 
+            this.menuItem7.Index = 3;
+            this.menuItem7.Text = "-";
+            // 
+            // mnuTimeScale
+            // 
+            this.mnuTimeScale.Index = 4;
+            this.mnuTimeScale.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
+            this.mnu10Minute,
+            this.mnu15Minute,
+            this.mnu20Minute,
+            this.mnu30Minute});
+            this.mnuTimeScale.Text = "&Time Scale";
+            // 
+            // mnu10Minute
+            // 
+            this.mnu10Minute.Index = 0;
+            this.mnu10Minute.Shortcut = System.Windows.Forms.Shortcut.Ctrl0;
+            this.mnu10Minute.Text = "&10-Minute";
+            this.mnu10Minute.Click += new System.EventHandler(this.mnu10Minute_Click);
+            // 
+            // mnu15Minute
+            // 
+            this.mnu15Minute.Index = 1;
+            this.mnu15Minute.Shortcut = System.Windows.Forms.Shortcut.Ctrl4;
+            this.mnu15Minute.Text = "&15-Minute";
+            this.mnu15Minute.Click += new System.EventHandler(this.mnu15Minute_Click);
+            // 
+            // mnu20Minute
+            // 
+            this.mnu20Minute.Index = 2;
+            this.mnu20Minute.Shortcut = System.Windows.Forms.Shortcut.Ctrl3;
+            this.mnu20Minute.Text = "&20-Minute";
+            this.mnu20Minute.Click += new System.EventHandler(this.mnu20Minute_Click);
+            // 
+            // mnu30Minute
+            // 
+            this.mnu30Minute.Index = 3;
+            this.mnu30Minute.Shortcut = System.Windows.Forms.Shortcut.Ctrl2;
+            this.mnu30Minute.Text = "&30-Minute";
+            this.mnu30Minute.Click += new System.EventHandler(this.mnu30Minute_Click);
+            // 
+            // mnuViewRightPanel
+            // 
+            this.mnuViewRightPanel.Index = 5;
+            this.mnuViewRightPanel.Text = "&Access Block Clipboard";
+            this.mnuViewRightPanel.Click += new System.EventHandler(this.mnuViewRightPanel_Click);
+            // 
+            // mnuHelp
+            // 
+            this.mnuHelp.Index = 3;
+            this.mnuHelp.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
+            this.mnuHelpAbout});
+            this.mnuHelp.Text = "&Help";
+            // 
+            // mnuHelpAbout
+            // 
+            this.mnuHelpAbout.Index = 0;
+            this.mnuHelpAbout.Text = "&About";
+            this.mnuHelpAbout.Click += new System.EventHandler(this.mnuHelpAbout_Click);
+            // 
+            // splitter1
+            // 
+            this.splitter1.Dock = System.Windows.Forms.DockStyle.Right;
+            this.splitter1.Location = new System.Drawing.Point(720, 24);
+            this.splitter1.Name = "splitter1";
+            this.splitter1.Size = new System.Drawing.Size(8, 345);
+            this.splitter1.TabIndex = 6;
+            this.splitter1.TabStop = false;
+            // 
+            // saveAccessBlocksWorker
+            // 
+            this.saveAccessBlocksWorker.WorkerReportsProgress = true;
+            this.saveAccessBlocksWorker.DoWork += new System.ComponentModel.DoWorkEventHandler(this.saveAccessBlocksWorker_DoWork);
+            this.saveAccessBlocksWorker.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.saveAccessBlocksWorker_ProgressChanged);
+            this.saveAccessBlocksWorker.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.saveAccessBlocksWorker_RunWorkerCompleted);
             // 
             // CGAVView
@@ -575,5 +574,5 @@
 		private System.Windows.Forms.MenuItem ctxCalGridDelete;
         private BackgroundWorker saveAccessBlocksWorker;
-        private MenuItem mnuDeleteAllAppointments;
+        private MenuItem mnuDeleteAllSlots;
 		private bool				m_bDragDropStart = false;
 
@@ -769,5 +768,5 @@
 		}//End AvailabilityAddNew
 
-        private void MassAppointmentDelete()
+        private void MassSlotDelete()
         {
             DialogResult msgResult = MessageBox.Show("Delete all Access Slots?", "Delete Slots?",MessageBoxButtons.YesNo);
@@ -1557,8 +1556,9 @@
         }
 
-        private void mnuDeleteAllAppointments_Click(object sender, EventArgs e)
+        private void mnuDeleteAllSlots_Click(object sender, EventArgs e)
         {
-            MassAppointmentDelete();
+
         }
+
 	}
 }
Index: /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGDocument.cs
===================================================================
--- /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGDocument.cs	(revision 1037)
+++ /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGDocument.cs	(revision 1038)
@@ -1031,7 +1031,5 @@
 			/*
 			 * BSDX NOSHOW RPC Returns 1  in ERRORID if  successfully sets NOSHOW flag in BSDX APPOINTMENT and, if applicable, File 2
-			 *Otherwise, returns 0 for failure and errormessage in ERRORTXT
-			 *THIS routine returns "" if success or the message in ERRORTEXT if failed
-			 *Exceptions should be caught by caller
+			 *Otherwise, returns negative numbers for failure and errormessage in ERRORTXT
 			 *
 			 */
Index: /Scheduling/trunk/cs/bsdx0200GUISourceCode/CalendarGrid.cs
===================================================================
--- /Scheduling/trunk/cs/bsdx0200GUISourceCode/CalendarGrid.cs	(revision 1037)
+++ /Scheduling/trunk/cs/bsdx0200GUISourceCode/CalendarGrid.cs	(revision 1038)
@@ -667,4 +667,12 @@
             int startTotalMinutesoffset = (int) startTime.TimeOfDay.TotalMinutes;
             int endTotalMinutesoffset = (int) endTime.TimeOfDay.TotalMinutes;
+            
+            // To fix a bug with 1 day view: if the start time of appt is before Calendar Start Date, don't draw anything.
+            if (startTime < this.m_dtStart)
+            {
+                bRet = false;
+                return rectangle;
+            }
+            
             // if grid has more than one reource
             if (this.m_sResourcesArray.Count > 1)
@@ -677,13 +685,12 @@
             else
             {
-                //columnToPutAppt = (startTime - this.m_dtStart).Days + 1;
-                //test sam
                 columnToPutAppt = (startTime - this.m_dtStart).Days + 1;
             }
-            if (columnToPutAppt < 1)
-            {
-                bRet = false;
-                return rectangle;
-            }
+            // this if should not get tripped; it did the same function as the new first if check. 
+            //if (columnToPutAppt < 1)
+            //{
+            //    bRet = false;
+            //    return rectangle;
+            //}
             originX = col0Width + (cellWidth * (columnToPutAppt - 1));
             int num8 = startTotalMinutesoffset + this.m_nTimeScale;
Index: /Scheduling/trunk/cs/bsdx0200GUISourceCode/UCPatientAppts.cs
===================================================================
--- /Scheduling/trunk/cs/bsdx0200GUISourceCode/UCPatientAppts.cs	(revision 1037)
+++ /Scheduling/trunk/cs/bsdx0200GUISourceCode/UCPatientAppts.cs	(revision 1038)
@@ -32,18 +32,36 @@
             catch (Exception ex) { MessageBox.Show(ex.Message); }
 
-            dvAppt = new DataView(dtAppt);
-            dvAppt.Sort = "ApptDate ASC";
             SetPastFilter(false);
-            dgAppts.DataSource = dvAppt;
-
+            
+            // dgAppts.DataSource = dvAppt;
         }
         /// <summary>
         /// Sets the filter for the DataView on whether to show past appointments or not
+        /// Uses LINQ. Must use .Net 3.5 or above. Hope the LINQ is self-explanatory.
         /// </summary>
         /// <param name="ShowPastAppts">boolean - self explanatory</param>
         void SetPastFilter(bool ShowPastAppts)
         {
-            if (ShowPastAppts) dvAppt.RowFilter = "";
-            else dvAppt.RowFilter = "ApptDate > " + "'" + DateTime.Today.ToShortDateString() + "'";
+            if (ShowPastAppts)
+            {
+                var uncancelledAppts = from appt in dtAppt.AsEnumerable()
+                                       orderby appt.Field<DateTime>("ApptDate")
+                                       select appt;
+
+                dvAppt = uncancelledAppts.AsDataView();
+            }
+            else
+            {
+                var uncancelledAppts = from appt in dtAppt.AsEnumerable()
+                                       where appt.Field<DateTime>("ApptDate") > DateTime.Today
+                                       orderby appt.Field<DateTime>("ApptDate")
+                                       select appt;
+
+                dvAppt = uncancelledAppts.AsDataView();
+            }
+
+            // It's strange that I have to bind it here; but look like dvAppt points to a new memory
+            // location when reassigned up above in the LINQ statement, so we have to rebind it.
+            dgAppts.DataSource = dvAppt;
         }
 
