Changeset 1039 for Scheduling
- Timestamp:
- Dec 12, 2010, 2:44:49 AM (14 years ago)
- Location:
- Scheduling/trunk/cs/bsdx0200GUISourceCode
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
Scheduling/trunk/cs/bsdx0200GUISourceCode/CGAVDocument.cs
r913 r1039 555 555 } 556 556 } 557 558 557 } 559 558 -
Scheduling/trunk/cs/bsdx0200GUISourceCode/CGAVView.cs
r1038 r1039 59 59 this.lblResource = new System.Windows.Forms.Label(); 60 60 this.panelCenter = new System.Windows.Forms.Panel(); 61 this.calendarGrid1 = new IndianHealthService.ClinicalScheduling.CalendarGrid();62 61 this.ctxCalendarGrid = new System.Windows.Forms.ContextMenu(); 63 62 this.ctxCalGridAdd = new System.Windows.Forms.MenuItem(); … … 93 92 this.splitter1 = new System.Windows.Forms.Splitter(); 94 93 this.saveAccessBlocksWorker = new System.ComponentModel.BackgroundWorker(); 94 this.calendarGrid1 = new IndianHealthService.ClinicalScheduling.CalendarGrid(); 95 95 this.panelRight.SuspendLayout(); 96 96 this.panelClip.SuspendLayout(); … … 106 106 this.panelRight.Location = new System.Drawing.Point(728, 0); 107 107 this.panelRight.Name = "panelRight"; 108 this.panelRight.Size = new System.Drawing.Size(120, 3 93);108 this.panelRight.Size = new System.Drawing.Size(120, 364); 109 109 this.panelRight.TabIndex = 1; 110 110 // … … 167 167 this.panelBottom.Controls.Add(this.statusBar1); 168 168 this.panelBottom.Dock = System.Windows.Forms.DockStyle.Bottom; 169 this.panelBottom.Location = new System.Drawing.Point(8, 3 69);169 this.panelBottom.Location = new System.Drawing.Point(8, 340); 170 170 this.panelBottom.Name = "panelBottom"; 171 171 this.panelBottom.Size = new System.Drawing.Size(720, 24); … … 219 219 this.panelCenter.Location = new System.Drawing.Point(8, 24); 220 220 this.panelCenter.Name = "panelCenter"; 221 this.panelCenter.Size = new System.Drawing.Size(712, 3 45);221 this.panelCenter.Size = new System.Drawing.Size(712, 316); 222 222 this.panelCenter.TabIndex = 4; 223 // 224 // ctxCalendarGrid 225 // 226 this.ctxCalendarGrid.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { 227 this.ctxCalGridAdd, 228 this.ctxCalGridEdit, 229 this.ctxCalGridDelete}); 230 this.ctxCalendarGrid.Popup += new System.EventHandler(this.ctxCalendarGrid_Popup); 231 // 232 // ctxCalGridAdd 233 // 234 this.ctxCalGridAdd.Index = 0; 235 this.ctxCalGridAdd.Text = "Add New Access Block"; 236 this.ctxCalGridAdd.Click += new System.EventHandler(this.ctxCalGridAdd_Click); 237 // 238 // ctxCalGridEdit 239 // 240 this.ctxCalGridEdit.Index = 1; 241 this.ctxCalGridEdit.Text = "Edit Access Block"; 242 this.ctxCalGridEdit.Click += new System.EventHandler(this.ctxCalGridEdit_Click); 243 // 244 // ctxCalGridDelete 245 // 246 this.ctxCalGridDelete.Index = 2; 247 this.ctxCalGridDelete.Text = "Delete Access Block"; 248 this.ctxCalGridDelete.Click += new System.EventHandler(this.ctxCalGridDelete_Click); 249 // 250 // tvSchedules 251 // 252 this.tvSchedules.BackColor = System.Drawing.SystemColors.ControlLight; 253 this.tvSchedules.Dock = System.Windows.Forms.DockStyle.Left; 254 this.tvSchedules.HotTracking = true; 255 this.tvSchedules.Location = new System.Drawing.Point(0, 0); 256 this.tvSchedules.Name = "tvSchedules"; 257 this.tvSchedules.Size = new System.Drawing.Size(8, 364); 258 this.tvSchedules.Sorted = true; 259 this.tvSchedules.TabIndex = 5; 260 // 261 // mainMenu1 262 // 263 this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { 264 this.menuItem1, 265 this.mnuAvailability, 266 this.mnuCalendar, 267 this.mnuHelp}); 268 // 269 // menuItem1 270 // 271 this.menuItem1.Index = 0; 272 this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { 273 this.mnuLoadTemplate, 274 this.mnuSaveTemplate, 275 this.mnuDeleteAllSlots, 276 this.menuItem6, 277 this.mnuSchedulingManagment, 278 this.menuItem5, 279 this.mnuClose}); 280 this.menuItem1.Text = "&File"; 281 // 282 // mnuLoadTemplate 283 // 284 this.mnuLoadTemplate.Index = 0; 285 this.mnuLoadTemplate.Shortcut = System.Windows.Forms.Shortcut.CtrlA; 286 this.mnuLoadTemplate.Text = "&Apply Template"; 287 this.mnuLoadTemplate.Click += new System.EventHandler(this.mnuLoadTemplate_Click); 288 // 289 // mnuSaveTemplate 290 // 291 this.mnuSaveTemplate.Index = 1; 292 this.mnuSaveTemplate.Shortcut = System.Windows.Forms.Shortcut.CtrlS; 293 this.mnuSaveTemplate.Text = "&Save Template"; 294 this.mnuSaveTemplate.Click += new System.EventHandler(this.mnuSaveTemplate_Click); 295 // 296 // mnuDeleteAllSlots 297 // 298 this.mnuDeleteAllSlots.Index = 2; 299 this.mnuDeleteAllSlots.Shortcut = System.Windows.Forms.Shortcut.CtrlD; 300 this.mnuDeleteAllSlots.Text = "&Delete All Slots"; 301 this.mnuDeleteAllSlots.Click += new System.EventHandler(this.mnuDeleteAllSlots_Click); 302 // 303 // menuItem6 304 // 305 this.menuItem6.Index = 3; 306 this.menuItem6.Text = "-"; 307 // 308 // mnuSchedulingManagment 309 // 310 this.mnuSchedulingManagment.Index = 4; 311 this.mnuSchedulingManagment.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftM; 312 this.mnuSchedulingManagment.Text = "Scheduling &Management"; 313 this.mnuSchedulingManagment.Click += new System.EventHandler(this.mnuSchedulingManagment_Click); 314 // 315 // menuItem5 316 // 317 this.menuItem5.Index = 5; 318 this.menuItem5.Text = "-"; 319 // 320 // mnuClose 321 // 322 this.mnuClose.Index = 6; 323 this.mnuClose.Shortcut = System.Windows.Forms.Shortcut.CtrlW; 324 this.mnuClose.Text = "&Close"; 325 this.mnuClose.Click += new System.EventHandler(this.mnuClose_Click); 326 // 327 // mnuAvailability 328 // 329 this.mnuAvailability.Index = 1; 330 this.mnuAvailability.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { 331 this.mnuAddNewAV, 332 this.mnuRemoveAV, 333 this.mnuEditAV}); 334 this.mnuAvailability.Text = "&Access Blocks"; 335 this.mnuAvailability.Popup += new System.EventHandler(this.mnuAvailability_Popup); 336 // 337 // mnuAddNewAV 338 // 339 this.mnuAddNewAV.Index = 0; 340 this.mnuAddNewAV.Shortcut = System.Windows.Forms.Shortcut.CtrlN; 341 this.mnuAddNewAV.Text = "Add &New Block"; 342 this.mnuAddNewAV.Click += new System.EventHandler(this.mnuAddNewAV_Click); 343 // 344 // mnuRemoveAV 345 // 346 this.mnuRemoveAV.Index = 1; 347 this.mnuRemoveAV.Shortcut = System.Windows.Forms.Shortcut.CtrlR; 348 this.mnuRemoveAV.Text = "&Remove Block"; 349 this.mnuRemoveAV.Click += new System.EventHandler(this.mnuRemoveAV_Click); 350 // 351 // mnuEditAV 352 // 353 this.mnuEditAV.Index = 2; 354 this.mnuEditAV.Shortcut = System.Windows.Forms.Shortcut.CtrlE; 355 this.mnuEditAV.Text = "&Edit Block"; 356 this.mnuEditAV.Click += new System.EventHandler(this.mnuEditAV_Click); 357 // 358 // mnuCalendar 359 // 360 this.mnuCalendar.Index = 2; 361 this.mnuCalendar.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { 362 this.mnu1Day, 363 this.mnu5Day, 364 this.mnu7Day, 365 this.menuItem7, 366 this.mnuTimeScale, 367 this.mnuViewRightPanel}); 368 this.mnuCalendar.Text = "&View"; 369 // 370 // mnu1Day 371 // 372 this.mnu1Day.Index = 0; 373 this.mnu1Day.Shortcut = System.Windows.Forms.Shortcut.Ctrl1; 374 this.mnu1Day.Text = "&1-Day View"; 375 this.mnu1Day.Click += new System.EventHandler(this.mnu1Day_Click); 376 // 377 // mnu5Day 378 // 379 this.mnu5Day.Index = 1; 380 this.mnu5Day.Shortcut = System.Windows.Forms.Shortcut.Ctrl5; 381 this.mnu5Day.Text = "&5-Day View"; 382 this.mnu5Day.Click += new System.EventHandler(this.mnu5Day_Click); 383 // 384 // mnu7Day 385 // 386 this.mnu7Day.Index = 2; 387 this.mnu7Day.Shortcut = System.Windows.Forms.Shortcut.Ctrl7; 388 this.mnu7Day.Text = "&7-Day View"; 389 this.mnu7Day.Click += new System.EventHandler(this.mnu7Day_Click); 390 // 391 // menuItem7 392 // 393 this.menuItem7.Index = 3; 394 this.menuItem7.Text = "-"; 395 // 396 // mnuTimeScale 397 // 398 this.mnuTimeScale.Index = 4; 399 this.mnuTimeScale.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { 400 this.mnu10Minute, 401 this.mnu15Minute, 402 this.mnu20Minute, 403 this.mnu30Minute}); 404 this.mnuTimeScale.Text = "&Time Scale"; 405 // 406 // mnu10Minute 407 // 408 this.mnu10Minute.Index = 0; 409 this.mnu10Minute.Shortcut = System.Windows.Forms.Shortcut.Ctrl0; 410 this.mnu10Minute.Text = "&10-Minute"; 411 this.mnu10Minute.Click += new System.EventHandler(this.mnu10Minute_Click); 412 // 413 // mnu15Minute 414 // 415 this.mnu15Minute.Index = 1; 416 this.mnu15Minute.Shortcut = System.Windows.Forms.Shortcut.Ctrl4; 417 this.mnu15Minute.Text = "&15-Minute"; 418 this.mnu15Minute.Click += new System.EventHandler(this.mnu15Minute_Click); 419 // 420 // mnu20Minute 421 // 422 this.mnu20Minute.Index = 2; 423 this.mnu20Minute.Shortcut = System.Windows.Forms.Shortcut.Ctrl3; 424 this.mnu20Minute.Text = "&20-Minute"; 425 this.mnu20Minute.Click += new System.EventHandler(this.mnu20Minute_Click); 426 // 427 // mnu30Minute 428 // 429 this.mnu30Minute.Index = 3; 430 this.mnu30Minute.Shortcut = System.Windows.Forms.Shortcut.Ctrl2; 431 this.mnu30Minute.Text = "&30-Minute"; 432 this.mnu30Minute.Click += new System.EventHandler(this.mnu30Minute_Click); 433 // 434 // mnuViewRightPanel 435 // 436 this.mnuViewRightPanel.Index = 5; 437 this.mnuViewRightPanel.Text = "&Access Block Clipboard"; 438 this.mnuViewRightPanel.Click += new System.EventHandler(this.mnuViewRightPanel_Click); 439 // 440 // mnuHelp 441 // 442 this.mnuHelp.Index = 3; 443 this.mnuHelp.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { 444 this.mnuHelpAbout}); 445 this.mnuHelp.Text = "&Help"; 446 // 447 // mnuHelpAbout 448 // 449 this.mnuHelpAbout.Index = 0; 450 this.mnuHelpAbout.Text = "&About"; 451 this.mnuHelpAbout.Click += new System.EventHandler(this.mnuHelpAbout_Click); 452 // 453 // splitter1 454 // 455 this.splitter1.Dock = System.Windows.Forms.DockStyle.Right; 456 this.splitter1.Location = new System.Drawing.Point(720, 24); 457 this.splitter1.Name = "splitter1"; 458 this.splitter1.Size = new System.Drawing.Size(8, 316); 459 this.splitter1.TabIndex = 6; 460 this.splitter1.TabStop = false; 461 // 462 // saveAccessBlocksWorker 463 // 464 this.saveAccessBlocksWorker.WorkerReportsProgress = true; 465 this.saveAccessBlocksWorker.DoWork += new System.ComponentModel.DoWorkEventHandler(this.saveAccessBlocksWorker_DoWork); 466 this.saveAccessBlocksWorker.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.saveAccessBlocksWorker_ProgressChanged); 467 this.saveAccessBlocksWorker.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.saveAccessBlocksWorker_RunWorkerCompleted); 223 468 // 224 469 // calendarGrid1 … … 241 486 this.calendarGrid1.Resources = ((System.Collections.ArrayList)(resources.GetObject("calendarGrid1.Resources"))); 242 487 this.calendarGrid1.SelectedAppointment = 0; 243 this.calendarGrid1.Size = new System.Drawing.Size(712, 3 45);488 this.calendarGrid1.Size = new System.Drawing.Size(712, 316); 244 489 this.calendarGrid1.StartDate = new System.DateTime(2003, 1, 27, 0, 0, 0, 0); 245 490 this.calendarGrid1.TabIndex = 2; … … 250 495 this.calendarGrid1.DoubleClick += new System.EventHandler(this.calendarGrid1_DoubleClick); 251 496 // 252 // ctxCalendarGrid253 //254 this.ctxCalendarGrid.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {255 this.ctxCalGridAdd,256 this.ctxCalGridEdit,257 this.ctxCalGridDelete});258 this.ctxCalendarGrid.Popup += new System.EventHandler(this.ctxCalendarGrid_Popup);259 //260 // ctxCalGridAdd261 //262 this.ctxCalGridAdd.Index = 0;263 this.ctxCalGridAdd.Text = "Add New Access Block";264 this.ctxCalGridAdd.Click += new System.EventHandler(this.ctxCalGridAdd_Click);265 //266 // ctxCalGridEdit267 //268 this.ctxCalGridEdit.Index = 1;269 this.ctxCalGridEdit.Text = "Edit Access Block";270 this.ctxCalGridEdit.Click += new System.EventHandler(this.ctxCalGridEdit_Click);271 //272 // ctxCalGridDelete273 //274 this.ctxCalGridDelete.Index = 2;275 this.ctxCalGridDelete.Text = "Delete Access Block";276 this.ctxCalGridDelete.Click += new System.EventHandler(this.ctxCalGridDelete_Click);277 //278 // tvSchedules279 //280 this.tvSchedules.BackColor = System.Drawing.SystemColors.ControlLight;281 this.tvSchedules.Dock = System.Windows.Forms.DockStyle.Left;282 this.tvSchedules.HotTracking = true;283 this.tvSchedules.Location = new System.Drawing.Point(0, 0);284 this.tvSchedules.Name = "tvSchedules";285 this.tvSchedules.Size = new System.Drawing.Size(8, 393);286 this.tvSchedules.Sorted = true;287 this.tvSchedules.TabIndex = 5;288 //289 // mainMenu1290 //291 this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {292 this.menuItem1,293 this.mnuAvailability,294 this.mnuCalendar,295 this.mnuHelp});296 //297 // menuItem1298 //299 this.menuItem1.Index = 0;300 this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {301 this.mnuLoadTemplate,302 this.mnuSaveTemplate,303 this.mnuDeleteAllSlots,304 this.menuItem6,305 this.mnuSchedulingManagment,306 this.menuItem5,307 this.mnuClose});308 this.menuItem1.Text = "&File";309 //310 // mnuLoadTemplate311 //312 this.mnuLoadTemplate.Index = 0;313 this.mnuLoadTemplate.Shortcut = System.Windows.Forms.Shortcut.CtrlA;314 this.mnuLoadTemplate.Text = "&Apply Template";315 this.mnuLoadTemplate.Click += new System.EventHandler(this.mnuLoadTemplate_Click);316 //317 // mnuSaveTemplate318 //319 this.mnuSaveTemplate.Index = 1;320 this.mnuSaveTemplate.Shortcut = System.Windows.Forms.Shortcut.CtrlS;321 this.mnuSaveTemplate.Text = "&Save Template";322 this.mnuSaveTemplate.Click += new System.EventHandler(this.mnuSaveTemplate_Click);323 //324 // mnuDeleteAllSlots325 //326 this.mnuDeleteAllSlots.Index = 2;327 this.mnuDeleteAllSlots.Shortcut = System.Windows.Forms.Shortcut.CtrlD;328 this.mnuDeleteAllSlots.Text = "&Delete All Slots";329 this.mnuDeleteAllSlots.Click += new System.EventHandler(this.mnuDeleteAllSlots_Click);330 //331 // menuItem6332 //333 this.menuItem6.Index = 3;334 this.menuItem6.Text = "-";335 //336 // mnuSchedulingManagment337 //338 this.mnuSchedulingManagment.Index = 4;339 this.mnuSchedulingManagment.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftM;340 this.mnuSchedulingManagment.Text = "Scheduling &Management";341 this.mnuSchedulingManagment.Click += new System.EventHandler(this.mnuSchedulingManagment_Click);342 //343 // menuItem5344 //345 this.menuItem5.Index = 5;346 this.menuItem5.Text = "-";347 //348 // mnuClose349 //350 this.mnuClose.Index = 6;351 this.mnuClose.Shortcut = System.Windows.Forms.Shortcut.CtrlW;352 this.mnuClose.Text = "&Close";353 this.mnuClose.Click += new System.EventHandler(this.mnuClose_Click);354 //355 // mnuAvailability356 //357 this.mnuAvailability.Index = 1;358 this.mnuAvailability.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {359 this.mnuAddNewAV,360 this.mnuRemoveAV,361 this.mnuEditAV});362 this.mnuAvailability.Text = "&Access Blocks";363 this.mnuAvailability.Popup += new System.EventHandler(this.mnuAvailability_Popup);364 //365 // mnuAddNewAV366 //367 this.mnuAddNewAV.Index = 0;368 this.mnuAddNewAV.Shortcut = System.Windows.Forms.Shortcut.CtrlN;369 this.mnuAddNewAV.Text = "Add &New Block";370 this.mnuAddNewAV.Click += new System.EventHandler(this.mnuAddNewAV_Click);371 //372 // mnuRemoveAV373 //374 this.mnuRemoveAV.Index = 1;375 this.mnuRemoveAV.Shortcut = System.Windows.Forms.Shortcut.CtrlR;376 this.mnuRemoveAV.Text = "&Remove Block";377 this.mnuRemoveAV.Click += new System.EventHandler(this.mnuRemoveAV_Click);378 //379 // mnuEditAV380 //381 this.mnuEditAV.Index = 2;382 this.mnuEditAV.Shortcut = System.Windows.Forms.Shortcut.CtrlE;383 this.mnuEditAV.Text = "&Edit Block";384 this.mnuEditAV.Click += new System.EventHandler(this.mnuEditAV_Click);385 //386 // mnuCalendar387 //388 this.mnuCalendar.Index = 2;389 this.mnuCalendar.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {390 this.mnu1Day,391 this.mnu5Day,392 this.mnu7Day,393 this.menuItem7,394 this.mnuTimeScale,395 this.mnuViewRightPanel});396 this.mnuCalendar.Text = "&View";397 //398 // mnu1Day399 //400 this.mnu1Day.Index = 0;401 this.mnu1Day.Shortcut = System.Windows.Forms.Shortcut.Ctrl1;402 this.mnu1Day.Text = "&1-Day View";403 this.mnu1Day.Click += new System.EventHandler(this.mnu1Day_Click);404 //405 // mnu5Day406 //407 this.mnu5Day.Index = 1;408 this.mnu5Day.Shortcut = System.Windows.Forms.Shortcut.Ctrl5;409 this.mnu5Day.Text = "&5-Day View";410 this.mnu5Day.Click += new System.EventHandler(this.mnu5Day_Click);411 //412 // mnu7Day413 //414 this.mnu7Day.Index = 2;415 this.mnu7Day.Shortcut = System.Windows.Forms.Shortcut.Ctrl7;416 this.mnu7Day.Text = "&7-Day View";417 this.mnu7Day.Click += new System.EventHandler(this.mnu7Day_Click);418 //419 // menuItem7420 //421 this.menuItem7.Index = 3;422 this.menuItem7.Text = "-";423 //424 // mnuTimeScale425 //426 this.mnuTimeScale.Index = 4;427 this.mnuTimeScale.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {428 this.mnu10Minute,429 this.mnu15Minute,430 this.mnu20Minute,431 this.mnu30Minute});432 this.mnuTimeScale.Text = "&Time Scale";433 //434 // mnu10Minute435 //436 this.mnu10Minute.Index = 0;437 this.mnu10Minute.Shortcut = System.Windows.Forms.Shortcut.Ctrl0;438 this.mnu10Minute.Text = "&10-Minute";439 this.mnu10Minute.Click += new System.EventHandler(this.mnu10Minute_Click);440 //441 // mnu15Minute442 //443 this.mnu15Minute.Index = 1;444 this.mnu15Minute.Shortcut = System.Windows.Forms.Shortcut.Ctrl4;445 this.mnu15Minute.Text = "&15-Minute";446 this.mnu15Minute.Click += new System.EventHandler(this.mnu15Minute_Click);447 //448 // mnu20Minute449 //450 this.mnu20Minute.Index = 2;451 this.mnu20Minute.Shortcut = System.Windows.Forms.Shortcut.Ctrl3;452 this.mnu20Minute.Text = "&20-Minute";453 this.mnu20Minute.Click += new System.EventHandler(this.mnu20Minute_Click);454 //455 // mnu30Minute456 //457 this.mnu30Minute.Index = 3;458 this.mnu30Minute.Shortcut = System.Windows.Forms.Shortcut.Ctrl2;459 this.mnu30Minute.Text = "&30-Minute";460 this.mnu30Minute.Click += new System.EventHandler(this.mnu30Minute_Click);461 //462 // mnuViewRightPanel463 //464 this.mnuViewRightPanel.Index = 5;465 this.mnuViewRightPanel.Text = "&Access Block Clipboard";466 this.mnuViewRightPanel.Click += new System.EventHandler(this.mnuViewRightPanel_Click);467 //468 // mnuHelp469 //470 this.mnuHelp.Index = 3;471 this.mnuHelp.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {472 this.mnuHelpAbout});473 this.mnuHelp.Text = "&Help";474 //475 // mnuHelpAbout476 //477 this.mnuHelpAbout.Index = 0;478 this.mnuHelpAbout.Text = "&About";479 this.mnuHelpAbout.Click += new System.EventHandler(this.mnuHelpAbout_Click);480 //481 // splitter1482 //483 this.splitter1.Dock = System.Windows.Forms.DockStyle.Right;484 this.splitter1.Location = new System.Drawing.Point(720, 24);485 this.splitter1.Name = "splitter1";486 this.splitter1.Size = new System.Drawing.Size(8, 345);487 this.splitter1.TabIndex = 6;488 this.splitter1.TabStop = false;489 //490 // saveAccessBlocksWorker491 //492 this.saveAccessBlocksWorker.WorkerReportsProgress = true;493 this.saveAccessBlocksWorker.DoWork += new System.ComponentModel.DoWorkEventHandler(this.saveAccessBlocksWorker_DoWork);494 this.saveAccessBlocksWorker.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.saveAccessBlocksWorker_ProgressChanged);495 this.saveAccessBlocksWorker.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.saveAccessBlocksWorker_RunWorkerCompleted);496 //497 497 // CGAVView 498 498 // 499 499 this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); 500 this.ClientSize = new System.Drawing.Size(848, 3 93);500 this.ClientSize = new System.Drawing.Size(848, 364); 501 501 this.Controls.Add(this.panelCenter); 502 502 this.Controls.Add(this.splitter1); … … 768 768 }//End AvailabilityAddNew 769 769 770 771 /// <summary> 772 /// Delete All slots from certain dates in one swoop. DAL does actualy deletion. 773 /// </summary> 770 774 private void MassSlotDelete() 771 775 { 772 DialogResult msgResult = MessageBox.Show("Delete all Access Slots?", "Delete Slots?",MessageBoxButtons.YesNo); 773 if (msgResult != DialogResult.Yes) return; 774 775 CGAppointments appointments = new CGAppointments(); 776 appointments = this.Document.AVBlocks; 777 778 foreach (CGAppointment a in appointments.AppointmentTable.Values) 779 { 780 int nApptID = a.AppointmentKey; 781 Debug.Assert(nApptID != 0); 782 try 783 { 784 Document.DeleteAvailability(nApptID); 785 } 786 catch (Exception ex) 787 { 788 MessageBox.Show("Unable to delete access block" + ex.Message, "Clinical Scheduling"); 789 } 790 791 } 792 793 this.m_DocManager.UpdateViews((string)this.m_Document.Resources[0], ""); 776 // Ask users for from and to dates 777 DMassSlotDelete dMassSlotDelete = new DMassSlotDelete(); 778 DialogResult res = dMassSlotDelete.ShowDialog(); 779 780 // peel off if user cancelled. 781 if (res != DialogResult.OK) return; 782 783 // Get this ResourceID from here, and the start and end dates from the dialog. 784 string sResourceID = this.m_Document.ResourceID.ToString(); 785 DateTime dStartDate = dMassSlotDelete.StartDate; 786 DateTime dEndDate = dMassSlotDelete.EndDate; 787 788 // Deletes Slots through DAL. 789 DataTable result = this.m_DocManager.DAL.MassSlotDelete(sResourceID, dStartDate, dEndDate); 790 791 // One row (and only one) expected: 792 Debug.Assert(result.Rows.Count == 1); 793 794 // -1 Expected in first row, otherwise, there is an error 795 if (result.Rows[0][0].ToString() != "-1") 796 throw new ApplicationException( 797 @"VISTA couldn't delete the slots. Contact tech support.\r\n 798 Error Message from VISTA: " + result.Rows[0][1].ToString()); 799 800 // Update Access Blocks views 801 this.Document.RefreshDaysSchedule(); // Retrieve the slots from the server 802 this.Document.UpdateAllViews(); // Recalibrate the calendar grid with the new cells 803 this.calendarGrid1.Invalidate(); // Redraw it. 804 805 // Tell other clients that slots have changed. 794 806 RaiseRPMSEvent("BSDX SCHEDULE", m_Document.DocName); 795 this.calendarGrid1.Invalidate();796 807 } 797 808 … … 1050 1061 { 1051 1062 this.saveAccessBlocksWorker.RunWorkerAsync(dlg); 1063 /* 1064 * Moved to RunWorkerAsync. Leave until I think I am safe removing it. 1065 * 1066 */ 1067 1052 1068 //OpenFileDialog openFileDialog1 = dlg.FileDialog; 1053 1069 //openFileDialog1.RestoreDirectory = false; // go back to our dir … … 1494 1510 1495 1511 string sResourceID = this.m_Document.ResourceID.ToString(); 1496 DataTable dt;1497 1512 1498 1513 for (int j = 1; j < nWeeksToApply + 1; j++) 1499 1514 { 1500 float fProgressPercentage = ((float) j/ (float)nWeeksToApply) * 100;1515 float fProgressPercentage = ((float)(j-1) / (float)nWeeksToApply) * 100; 1501 1516 int iProgressPercentage = (int)fProgressPercentage; 1502 1517 worker.ReportProgress(iProgressPercentage); 1503 //Convert start and end to string 1504 //string sStart = dtStart.ToString("M/d/yyyy"); 1505 //string sEnd = dtEnd.ToString("M/d/yyyy"); 1506 //i18n 1507 string sStart = FMDateTime.Create(dtStart).DateOnly.FMDateString; 1508 string sEnd = FMDateTime.Create(dtEnd).DateOnly.FMDateString; 1509 //Cancel all existing access blocks in the date range 1510 string sSql = "BSDX CANCEL AV BY DATE^" + sResourceID + "^" + sStart + "^" + sEnd; 1511 CGDocumentManager.RPMSDataTableDelegate d = new CGDocumentManager.RPMSDataTableDelegate(m_DocManager.RPMSDataTable); 1512 //dt = this.m_DocManager.RPMSDataTable(sSql, "Cancelled"); 1513 dt = d(sSql, "Cancelled"); 1514 //for each CGAppointment in AVBlocks, call AddNew 1515 string sResource = ""; 1516 sResource = (string)this.Document.Resources[0]; 1518 string sResource = (string)this.Document.Resources[0]; 1517 1519 foreach (CGAppointment a in cgaTemp.AppointmentTable.Values) 1518 1520 { … … 1548 1550 private void saveAccessBlocksWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) 1549 1551 { 1552 // Update Access Blocks views 1553 this.Document.RefreshDaysSchedule(); // Retrieve the slots from the server 1554 this.Document.UpdateAllViews(); // Recalibrate the calendar grid with the new cells 1555 this.calendarGrid1.Invalidate(); // Redraw it. 1556 1557 // Tell other clients that slots have changed. 1558 RaiseRPMSEvent("BSDX SCHEDULE", m_Document.DocName); 1559 1550 1560 this.statusBar1.Text = "Done saving access blocks."; 1551 1561 } … … 1558 1568 private void mnuDeleteAllSlots_Click(object sender, EventArgs e) 1559 1569 { 1560 1570 MassSlotDelete(); 1561 1571 } 1562 1572 -
Scheduling/trunk/cs/bsdx0200GUISourceCode/CGDocumentManager.cs
r1011 r1039 324 324 m_ds.Refresh(); 325 325 326 DataTable ver = _dal.GetVersion("BSDX"); //sCmd, "VersionInfo", m_dsGlobal);326 DataTable ver = _dal.GetVersion("BSDX"); 327 327 ver.TableName = "VersionInfo"; 328 328 m_dsGlobal.Tables.Add(ver); 329 330 //Keep the following commented code for future use: 329 331 330 //How to extract the version numbers: 332 //DataTable dtVersion = m_dsGlobal.Tables["VersionInfo"]; 333 //Debug.Assert(dtVersion.Rows.Count == 1); 334 //DataRow rVersion = dtVersion.Rows[0]; 335 //string sMajor = rVersion["MAJOR_VERSION"].ToString(); 336 //string sMinor = rVersion["MINOR_VERSION"].ToString(); 337 //string sBuild = rVersion["BUILD"].ToString(); 338 //decimal fBuild = Convert.ToDecimal(sBuild); 331 DataTable dtVersion = m_dsGlobal.Tables["VersionInfo"]; 332 Debug.Assert(dtVersion.Rows.Count == 1); 333 DataRow rVersion = dtVersion.Rows[0]; 334 string sMajor = rVersion["MAJOR_VERSION"].ToString(); 335 string sMinor = rVersion["MINOR_VERSION"].ToString(); 336 string sBuild = rVersion["BUILD"].ToString(); 337 decimal fBuild = Convert.ToDecimal(sBuild); 338 339 //Make sure that the server is running the same version the client is. 340 Version x = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; 341 342 //if version numbers mismatch, don't continue. 343 //TODO: For future: Include in v. 1.5 344 /* 345 if (!(x.Major.ToString() == sMajor && x.Minor.ToString() + x.Build.ToString() == sMinor)) 346 { 347 MessageBox.Show( 348 "Server runs version " + sMajor + "." + sMinor + "\r\n" + 349 "You are running " + x.ToString() + "\r\n\r\n" + 350 "Major, Minor and Build versions must match", 351 "Version Mismatch"); 352 m_ds.Close(); 353 return; 354 } 355 */ 356 339 357 340 358 //Change encoding -
Scheduling/trunk/cs/bsdx0200GUISourceCode/ClinicalScheduling.csproj
r966 r1039 292 292 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 293 293 </Compile> 294 <Compile Include="DMassSlotDelete.cs"> 295 <SubType>Form</SubType> 296 </Compile> 297 <Compile Include="DMassSlotDelete.Designer.cs"> 298 <DependentUpon>DMassSlotDelete.cs</DependentUpon> 299 </Compile> 294 300 <Compile Include="Options.cs" /> 295 301 <Compile Include="Printing.cs" /> … … 355 361 <DependentUpon>DManagement.cs</DependentUpon> 356 362 <SubType>Designer</SubType> 363 </EmbeddedResource> 364 <EmbeddedResource Include="DMassSlotDelete.resx"> 365 <DependentUpon>DMassSlotDelete.cs</DependentUpon> 357 366 </EmbeddedResource> 358 367 <EmbeddedResource Include="DNoShow.resx"> -
Scheduling/trunk/cs/bsdx0200GUISourceCode/DAL.cs
r850 r1039 117 117 } 118 118 119 /// <summary> 120 /// Delete All Slots for a Resource 121 /// </summary> 122 /// <param name="sResourceID"></param> 123 /// <param name="BeginDate"></param> 124 /// <param name="EndDate"></param> 125 /// <returns></returns> 126 public DataTable MassSlotDelete(string sResourceID, DateTime BeginDate, DateTime EndDate) 127 { 128 string sBegin = FMDateTime.Create(BeginDate).DateOnly.FMDateString; 129 string sEnd = FMDateTime.Create(EndDate).DateOnly.FMDateString; 130 string cmd = String.Format("BSDX CANCEL AV BY DATE^{0}^{1}^{2}", sResourceID, sBegin, sEnd); 131 return RPMSDataTable(cmd, "Cancelled"); 132 } 119 133 120 134 /// <summary>
Note:
See TracChangeset
for help on using the changeset viewer.