Changeset 1011 for Scheduling/trunk/cs/bsdx0200GUISourceCode
- Timestamp:
- Nov 18, 2010, 7:47:04 AM (14 years ago)
- Location:
- Scheduling/trunk/cs/bsdx0200GUISourceCode
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
Scheduling/trunk/cs/bsdx0200GUISourceCode/AssemblyInfo.cs
r966 r1011 28 28 // by using the '*' as shown below: 29 29 30 [assembly: AssemblyVersion("1.4. 1.*")]30 [assembly: AssemblyVersion("1.4.2.*")] 31 31 32 32 // … … 58 58 [assembly: AssemblyKeyFile("")] 59 59 [assembly: AssemblyKeyName("")] 60 [assembly: AssemblyFileVersionAttribute("1.4. 1.0")]60 [assembly: AssemblyFileVersionAttribute("1.4.2.0")] 61 61 [assembly: ComVisibleAttribute(false)] -
Scheduling/trunk/cs/bsdx0200GUISourceCode/CGAVView.cs
r917 r1011 68 68 this.mnuLoadTemplate = new System.Windows.Forms.MenuItem(); 69 69 this.mnuSaveTemplate = new System.Windows.Forms.MenuItem(); 70 this.mnuDeleteAllAppointments = new System.Windows.Forms.MenuItem(); 70 71 this.menuItem6 = new System.Windows.Forms.MenuItem(); 71 72 this.mnuSchedulingManagment = new System.Windows.Forms.MenuItem(); … … 90 91 this.mnuHelpAbout = new System.Windows.Forms.MenuItem(); 91 92 this.splitter1 = new System.Windows.Forms.Splitter(); 93 this.saveAccessBlocksWorker = new System.ComponentModel.BackgroundWorker(); 92 94 this.calendarGrid1 = new IndianHealthService.ClinicalScheduling.CalendarGrid(); 93 95 this.panelRight.SuspendLayout(); … … 104 106 this.panelRight.Location = new System.Drawing.Point(728, 0); 105 107 this.panelRight.Name = "panelRight"; 106 this.panelRight.Size = new System.Drawing.Size(120, 412);108 this.panelRight.Size = new System.Drawing.Size(120, 393); 107 109 this.panelRight.TabIndex = 1; 108 110 // … … 125 127 this.lstClip.Location = new System.Drawing.Point(0, 32); 126 128 this.lstClip.Name = "lstClip"; 127 this.lstClip.Size = new System.Drawing.Size(120, 4 07);129 this.lstClip.Size = new System.Drawing.Size(120, 416); 128 130 this.lstClip.TabIndex = 0; 129 131 this.lstClip.DragDrop += new System.Windows.Forms.DragEventHandler(this.lstClip_DragDrop); 132 this.lstClip.DragEnter += new System.Windows.Forms.DragEventHandler(this.lstClip_DragEnter); 133 this.lstClip.MouseDown += new System.Windows.Forms.MouseEventHandler(this.lstClip_MouseDown); 130 134 this.lstClip.MouseMove += new System.Windows.Forms.MouseEventHandler(this.lstClip_MouseMove); 131 this.lstClip.MouseDown += new System.Windows.Forms.MouseEventHandler(this.lstClip_MouseDown);132 this.lstClip.DragEnter += new System.Windows.Forms.DragEventHandler(this.lstClip_DragEnter);133 135 // 134 136 // ctxApptClipMenu … … 165 167 this.panelBottom.Controls.Add(this.statusBar1); 166 168 this.panelBottom.Dock = System.Windows.Forms.DockStyle.Bottom; 167 this.panelBottom.Location = new System.Drawing.Point(8, 3 88);169 this.panelBottom.Location = new System.Drawing.Point(8, 369); 168 170 this.panelBottom.Name = "panelBottom"; 169 171 this.panelBottom.Size = new System.Drawing.Size(720, 24); … … 217 219 this.panelCenter.Location = new System.Drawing.Point(8, 24); 218 220 this.panelCenter.Name = "panelCenter"; 219 this.panelCenter.Size = new System.Drawing.Size(712, 3 64);221 this.panelCenter.Size = new System.Drawing.Size(712, 345); 220 222 this.panelCenter.TabIndex = 4; 221 223 // … … 253 255 this.tvSchedules.Location = new System.Drawing.Point(0, 0); 254 256 this.tvSchedules.Name = "tvSchedules"; 255 this.tvSchedules.Size = new System.Drawing.Size(8, 412);257 this.tvSchedules.Size = new System.Drawing.Size(8, 393); 256 258 this.tvSchedules.Sorted = true; 257 259 this.tvSchedules.TabIndex = 5; … … 271 273 this.mnuLoadTemplate, 272 274 this.mnuSaveTemplate, 275 this.mnuDeleteAllAppointments, 273 276 this.menuItem6, 274 277 this.mnuSchedulingManagment, … … 291 294 this.mnuSaveTemplate.Click += new System.EventHandler(this.mnuSaveTemplate_Click); 292 295 // 296 // mnuDeleteAllAppointments 297 // 298 this.mnuDeleteAllAppointments.Enabled = false; 299 this.mnuDeleteAllAppointments.Index = 2; 300 this.mnuDeleteAllAppointments.Shortcut = System.Windows.Forms.Shortcut.CtrlD; 301 this.mnuDeleteAllAppointments.Text = "&Delete All Appointments"; 302 this.mnuDeleteAllAppointments.Click += new System.EventHandler(this.mnuDeleteAllAppointments_Click); 303 // 293 304 // menuItem6 294 305 // 295 this.menuItem6.Index = 2;306 this.menuItem6.Index = 3; 296 307 this.menuItem6.Text = "-"; 297 308 // 298 309 // mnuSchedulingManagment 299 310 // 300 this.mnuSchedulingManagment.Index = 3;311 this.mnuSchedulingManagment.Index = 4; 301 312 this.mnuSchedulingManagment.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftM; 302 313 this.mnuSchedulingManagment.Text = "Scheduling &Management"; … … 305 316 // menuItem5 306 317 // 307 this.menuItem5.Index = 4;318 this.menuItem5.Index = 5; 308 319 this.menuItem5.Text = "-"; 309 320 // 310 321 // mnuClose 311 322 // 312 this.mnuClose.Index = 5;323 this.mnuClose.Index = 6; 313 324 this.mnuClose.Shortcut = System.Windows.Forms.Shortcut.CtrlW; 314 325 this.mnuClose.Text = "&Close"; … … 446 457 this.splitter1.Location = new System.Drawing.Point(720, 24); 447 458 this.splitter1.Name = "splitter1"; 448 this.splitter1.Size = new System.Drawing.Size(8, 3 64);459 this.splitter1.Size = new System.Drawing.Size(8, 345); 449 460 this.splitter1.TabIndex = 6; 450 461 this.splitter1.TabStop = false; 462 // 463 // saveAccessBlocksWorker 464 // 465 this.saveAccessBlocksWorker.WorkerReportsProgress = true; 466 this.saveAccessBlocksWorker.DoWork += new System.ComponentModel.DoWorkEventHandler(this.saveAccessBlocksWorker_DoWork); 467 this.saveAccessBlocksWorker.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.saveAccessBlocksWorker_ProgressChanged); 468 this.saveAccessBlocksWorker.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.saveAccessBlocksWorker_RunWorkerCompleted); 451 469 // 452 470 // calendarGrid1 … … 469 487 this.calendarGrid1.Resources = ((System.Collections.ArrayList)(resources.GetObject("calendarGrid1.Resources"))); 470 488 this.calendarGrid1.SelectedAppointment = 0; 471 this.calendarGrid1.Size = new System.Drawing.Size(712, 3 64);489 this.calendarGrid1.Size = new System.Drawing.Size(712, 345); 472 490 this.calendarGrid1.StartDate = new System.DateTime(2003, 1, 27, 0, 0, 0, 0); 473 491 this.calendarGrid1.TabIndex = 2; 474 492 this.calendarGrid1.TimeScale = 20; 493 this.calendarGrid1.CGAppointmentAdded += new IndianHealthService.ClinicalScheduling.CGAppointmentChangedHandler(this.calendarGrid1_CGAppointmentAdded); 494 this.calendarGrid1.CGAppointmentChanged += new IndianHealthService.ClinicalScheduling.CGAppointmentChangedHandler(this.calendarGrid1_CGAppointmentChanged); 495 this.calendarGrid1.CGSelectionChanged += new IndianHealthService.ClinicalScheduling.CGSelectionChangedHandler(this.calendarGrid1_CGSelectionChanged); 475 496 this.calendarGrid1.DoubleClick += new System.EventHandler(this.calendarGrid1_DoubleClick); 476 this.calendarGrid1.CGSelectionChanged += new IndianHealthService.ClinicalScheduling.CGSelectionChangedHandler(this.calendarGrid1_CGSelectionChanged);477 this.calendarGrid1.CGAppointmentChanged += new IndianHealthService.ClinicalScheduling.CGAppointmentChangedHandler(this.calendarGrid1_CGAppointmentChanged);478 this.calendarGrid1.CGAppointmentAdded += new IndianHealthService.ClinicalScheduling.CGAppointmentChangedHandler(this.calendarGrid1_CGAppointmentAdded);479 497 // 480 498 // CGAVView 481 499 // 482 500 this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); 483 this.ClientSize = new System.Drawing.Size(848, 412);501 this.ClientSize = new System.Drawing.Size(848, 393); 484 502 this.Controls.Add(this.panelCenter); 485 503 this.Controls.Add(this.splitter1); … … 492 510 this.Name = "CGAVView"; 493 511 this.Text = "CGAVView"; 512 this.Closing += new System.ComponentModel.CancelEventHandler(this.CGAVView_Closing); 494 513 this.Load += new System.EventHandler(this.CGAVView_Load); 495 this.Closing += new System.ComponentModel.CancelEventHandler(this.CGAVView_Closing);496 514 this.panelRight.ResumeLayout(false); 497 515 this.panelClip.ResumeLayout(false); … … 556 574 private System.Windows.Forms.MenuItem ctxCalGridEdit; 557 575 private System.Windows.Forms.MenuItem ctxCalGridDelete; 576 private BackgroundWorker saveAccessBlocksWorker; 577 private MenuItem mnuDeleteAllAppointments; 558 578 private bool m_bDragDropStart = false; 559 579 … … 749 769 }//End AvailabilityAddNew 750 770 771 private void MassAppointmentDelete() 772 { 773 DialogResult msgResult = MessageBox.Show("Delete all Access Slots?", "Delete Slots?",MessageBoxButtons.YesNo); 774 if (msgResult != DialogResult.Yes) return; 775 776 CGAppointments appointments = new CGAppointments(); 777 appointments = this.Document.AVBlocks; 778 779 foreach (CGAppointment a in appointments.AppointmentTable.Values) 780 { 781 int nApptID = a.AppointmentKey; 782 Debug.Assert(nApptID != 0); 783 try 784 { 785 Document.DeleteAvailability(nApptID); 786 } 787 catch (Exception ex) 788 { 789 MessageBox.Show("Unable to delete access block" + ex.Message, "Clinical Scheduling"); 790 } 791 792 } 793 794 this.m_DocManager.UpdateViews((string)this.m_Document.Resources[0], ""); 795 RaiseRPMSEvent("BSDX SCHEDULE", m_Document.DocName); 796 this.calendarGrid1.Invalidate(); 797 } 798 751 799 private void AppointmentDelete() 752 800 { … … 756 804 sMsg = " these access blocks?"; 757 805 758 if (MessageBox.Show("Are you sure you want to delete" + sMsg, "Clinical Scheduling", MessageBoxButtons.YesNo) != DialogResult.Yes)759 {760 calendarGrid1.CGToolTip.Active = true;761 return;762 }763 806 calendarGrid1.CGToolTip.Active = true; 764 807 … … 907 950 { 908 951 // this.DocManager.EnableAutoRefresh(false); 909 910 if (MessageBox.Show("Are you sure you want to move this access block?", "Clinical Scheduling", MessageBoxButtons.YesNo) != DialogResult.Yes)911 return;912 952 913 953 m_Document.ChangeAppointmentTime(e.Appointment, e.StartTime, e.EndTime, e.Resource); … … 1010 1050 try 1011 1051 { 1012 OpenFileDialog openFileDialog1 = dlg.FileDialog; 1013 Stream streamFile; 1014 if((streamFile = openFileDialog1.OpenFile())== null) 1015 { 1016 MessageBox.Show("Unable to open template file."); 1017 return; 1018 } 1019 1020 BinaryFormatter formatter = new BinaryFormatter(); 1021 CGAppointments cgaTemp = (CGAppointments) formatter.Deserialize(streamFile); 1022 streamFile.Close(); 1023 1024 DateTime dtStart = dlg.StartDate; 1025 DateTime newStartDate, newEndDate; 1026 this.Document.WeekNeedsRefresh(1,dtStart, out newStartDate, out newEndDate); 1027 dtStart = newStartDate; 1028 int nWeeksToApply = dlg.WeeksToApply; 1029 DateTime dtEnd = dtStart.AddDays(6); // or 7? 1030 1031 string sResourceID = this.m_Document.ResourceID.ToString(); 1032 DataTable dt; 1033 1034 for (int j=1; j < nWeeksToApply + 1; j++) 1035 { 1036 //Convert start and end to string 1037 //string sStart = dtStart.ToString("M/d/yyyy"); 1038 //string sEnd = dtEnd.ToString("M/d/yyyy"); 1039 //i18n 1040 string sStart = FMDateTime.Create(dtStart).DateOnly.FMDateString; 1041 string sEnd = FMDateTime.Create(dtEnd).DateOnly.FMDateString; 1042 //Cancel all existing access blocks in the date range 1043 string sSql = "BSDX CANCEL AV BY DATE^" + sResourceID + "^" + sStart + "^" + sEnd; 1044 dt = this.m_DocManager.RPMSDataTable(sSql, "Cancelled"); 1045 1046 //for each CGAppointment in AVBlocks, call AddNew 1047 string sResource = ""; 1048 sResource = (string) this.Document.Resources[0]; 1049 foreach (CGAppointment a in cgaTemp.AppointmentTable.Values) 1050 { 1051 //Change the resource to the current one 1052 a.Resource = sResource; 1053 1054 //Change the date to correspond to the GridColumn member 1055 int col = a.GridColumn; 1056 col--; 1057 DateTime dBuildDate = dtStart.Date; 1058 dBuildDate = dBuildDate.AddDays(col); 1059 dBuildDate = dBuildDate.AddHours(a.StartTime.Hour); 1060 dBuildDate = dBuildDate.AddMinutes(a.StartTime.Minute); 1061 a.StartTime = dBuildDate; 1062 dBuildDate = dtStart.Date; 1063 dBuildDate = dBuildDate.AddDays(col); 1064 dBuildDate = dBuildDate.AddHours(a.EndTime.Hour); 1065 dBuildDate = dBuildDate.AddMinutes(a.EndTime.Minute); 1066 a.EndTime = dBuildDate; 1067 1068 //Call Document to add a new appointment 1069 this.Document.CreateAppointmentAuto(a); 1070 } 1071 1072 //Increment start and end 1073 dtStart = dtStart.AddDays(7); 1074 dtEnd = dtStart.AddDays(6); 1075 1076 }//end for 1052 this.saveAccessBlocksWorker.RunWorkerAsync(dlg); 1053 //OpenFileDialog openFileDialog1 = dlg.FileDialog; 1054 //openFileDialog1.RestoreDirectory = false; // go back to our dir 1055 //Stream streamFile; 1056 //if((streamFile = openFileDialog1.OpenFile())== null) 1057 //{ 1058 // MessageBox.Show("Unable to open template file."); 1059 // return; 1060 //} 1061 1062 //BinaryFormatter formatter = new BinaryFormatter(); 1063 //CGAppointments cgaTemp = (CGAppointments) formatter.Deserialize(streamFile); 1064 //streamFile.Close(); 1065 1066 //DateTime dtStart = dlg.StartDate; 1067 //DateTime newStartDate, newEndDate; 1068 //this.Document.WeekNeedsRefresh(1,dtStart, out newStartDate, out newEndDate); 1069 //dtStart = newStartDate; 1070 //int nWeeksToApply = dlg.WeeksToApply; 1071 //DateTime dtEnd = dtStart.AddDays(6); // or 7? 1072 1073 //string sResourceID = this.m_Document.ResourceID.ToString(); 1074 //DataTable dt; 1075 1076 //for (int j=1; j < nWeeksToApply + 1; j++) 1077 //{ 1078 // //Convert start and end to string 1079 // //string sStart = dtStart.ToString("M/d/yyyy"); 1080 // //string sEnd = dtEnd.ToString("M/d/yyyy"); 1081 // //i18n 1082 // string sStart = FMDateTime.Create(dtStart).DateOnly.FMDateString; 1083 // string sEnd = FMDateTime.Create(dtEnd).DateOnly.FMDateString; 1084 // //Cancel all existing access blocks in the date range 1085 // string sSql = "BSDX CANCEL AV BY DATE^" + sResourceID + "^" + sStart + "^" + sEnd; 1086 // dt = this.m_DocManager.RPMSDataTable(sSql, "Cancelled"); 1087 1088 // //for each CGAppointment in AVBlocks, call AddNew 1089 // string sResource = ""; 1090 // sResource = (string) this.Document.Resources[0]; 1091 // foreach (CGAppointment a in cgaTemp.AppointmentTable.Values) 1092 // { 1093 // //Change the resource to the current one 1094 // a.Resource = sResource; 1095 1096 // //Change the date to correspond to the GridColumn member 1097 // int col = a.GridColumn; 1098 // col--; 1099 // DateTime dBuildDate = dtStart.Date; 1100 // dBuildDate = dBuildDate.AddDays(col); 1101 // dBuildDate = dBuildDate.AddHours(a.StartTime.Hour); 1102 // dBuildDate = dBuildDate.AddMinutes(a.StartTime.Minute); 1103 // a.StartTime = dBuildDate; 1104 // dBuildDate = dtStart.Date; 1105 // dBuildDate = dBuildDate.AddDays(col); 1106 // dBuildDate = dBuildDate.AddHours(a.EndTime.Hour); 1107 // dBuildDate = dBuildDate.AddMinutes(a.EndTime.Minute); 1108 // a.EndTime = dBuildDate; 1109 1110 // //Call Document to add a new appointment 1111 // this.Document.CreateAppointmentAuto(a); 1112 // } 1113 1114 // //Increment start and end 1115 // dtStart = dtStart.AddDays(7); 1116 // dtEnd = dtStart.AddDays(6); 1117 1118 // }//end for 1077 1119 try 1078 1120 { … … 1424 1466 cg.Invalidate(); 1425 1467 } 1468 1469 1470 1471 private void saveAccessBlocksWorker_DoWork(object sender, DoWorkEventArgs e) 1472 { 1473 BackgroundWorker worker = (BackgroundWorker)sender; 1474 DAccessTemplate dlg = (DAccessTemplate)e.Argument; 1475 1476 OpenFileDialog openFileDialog1 = dlg.FileDialog; 1477 openFileDialog1.RestoreDirectory = false; // go back to our dir 1478 Stream streamFile; 1479 if ((streamFile = openFileDialog1.OpenFile()) == null) 1480 { 1481 MessageBox.Show("Unable to open template file."); 1482 return; 1483 } 1484 1485 BinaryFormatter formatter = new BinaryFormatter(); 1486 CGAppointments cgaTemp = (CGAppointments)formatter.Deserialize(streamFile); 1487 streamFile.Close(); 1488 1489 DateTime dtStart = dlg.StartDate; 1490 DateTime newStartDate, newEndDate; 1491 this.Document.WeekNeedsRefresh(1, dtStart, out newStartDate, out newEndDate); 1492 dtStart = newStartDate; 1493 int nWeeksToApply = dlg.WeeksToApply; 1494 DateTime dtEnd = dtStart.AddDays(6); // or 7? 1495 1496 string sResourceID = this.m_Document.ResourceID.ToString(); 1497 DataTable dt; 1498 1499 for (int j = 1; j < nWeeksToApply + 1; j++) 1500 { 1501 float fProgressPercentage = ((float)j / (float)nWeeksToApply) * 100; 1502 int iProgressPercentage = (int)fProgressPercentage; 1503 worker.ReportProgress(iProgressPercentage); 1504 //Convert start and end to string 1505 //string sStart = dtStart.ToString("M/d/yyyy"); 1506 //string sEnd = dtEnd.ToString("M/d/yyyy"); 1507 //i18n 1508 string sStart = FMDateTime.Create(dtStart).DateOnly.FMDateString; 1509 string sEnd = FMDateTime.Create(dtEnd).DateOnly.FMDateString; 1510 //Cancel all existing access blocks in the date range 1511 string sSql = "BSDX CANCEL AV BY DATE^" + sResourceID + "^" + sStart + "^" + sEnd; 1512 CGDocumentManager.RPMSDataTableDelegate d = new CGDocumentManager.RPMSDataTableDelegate(m_DocManager.RPMSDataTable); 1513 //dt = this.m_DocManager.RPMSDataTable(sSql, "Cancelled"); 1514 dt = d(sSql, "Cancelled"); 1515 //for each CGAppointment in AVBlocks, call AddNew 1516 string sResource = ""; 1517 sResource = (string)this.Document.Resources[0]; 1518 foreach (CGAppointment a in cgaTemp.AppointmentTable.Values) 1519 { 1520 //Change the resource to the current one 1521 a.Resource = sResource; 1522 1523 //Change the date to correspond to the GridColumn member 1524 int col = a.GridColumn; 1525 col--; 1526 DateTime dBuildDate = dtStart.Date; 1527 dBuildDate = dBuildDate.AddDays(col); 1528 dBuildDate = dBuildDate.AddHours(a.StartTime.Hour); 1529 dBuildDate = dBuildDate.AddMinutes(a.StartTime.Minute); 1530 a.StartTime = dBuildDate; 1531 dBuildDate = dtStart.Date; 1532 dBuildDate = dBuildDate.AddDays(col); 1533 dBuildDate = dBuildDate.AddHours(a.EndTime.Hour); 1534 dBuildDate = dBuildDate.AddMinutes(a.EndTime.Minute); 1535 a.EndTime = dBuildDate; 1536 1537 //Call Document to add a new appointment 1538 this.Document.CreateAppointmentAuto(a); 1539 } 1540 1541 //Increment start and end 1542 dtStart = dtStart.AddDays(7); 1543 dtEnd = dtStart.AddDays(6); 1544 1545 } 1546 1547 } 1548 1549 private void saveAccessBlocksWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) 1550 { 1551 this.statusBar1.Text = "Done saving access blocks."; 1552 } 1553 1554 private void saveAccessBlocksWorker_ProgressChanged(object sender, ProgressChangedEventArgs e) 1555 { 1556 this.statusBar1.Text = "Saving Data to VISTA. Progress: " + e.ProgressPercentage + " %"; 1557 } 1558 1559 private void mnuDeleteAllAppointments_Click(object sender, EventArgs e) 1560 { 1561 MassAppointmentDelete(); 1562 } 1426 1563 } 1427 1564 } -
Scheduling/trunk/cs/bsdx0200GUISourceCode/CGAVView.resx
r614 r1011 133 133 <value>281, 17</value> 134 134 </metadata> 135 <metadata name="saveAccessBlocksWorker.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 136 <value>398, 17</value> 137 </metadata> 135 138 <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> 136 139 <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> -
Scheduling/trunk/cs/bsdx0200GUISourceCode/CGDocumentManager.cs
r966 r1011 1035 1035 } 1036 1036 1037 delegate DataTable RPMSDataTableDelegate(string CommandString, string TableName);1037 public delegate DataTable RPMSDataTableDelegate(string CommandString, string TableName); 1038 1038 1039 1039 public DataTable RPMSDataTable(string sSQL, string sTableName) … … 1048 1048 try 1049 1049 { 1050 System.IntPtr pHandle = this.Handle;1050 //System.IntPtr pHandle = this.Handle; 1051 1051 RPMSDataTableDelegate rdtd = new RPMSDataTableDelegate(ConnectInfo.RPMSDataTable); 1052 1052 dtOut = (DataTable) this.Invoke(rdtd, new object[] {sSQL, sTableName}); -
Scheduling/trunk/cs/bsdx0200GUISourceCode/CGSchedLib.cs
r853 r1011 95 95 96 96 string sResName; 97 // for each resource 97 98 for (int i = 0; i < nSize; i++) 98 99 { 99 100 sResName = saryResourceNames[i].ToString(); 100 101 //Gets all the slots (or Availabities, if you like) 101 102 rsSlotSchedule = CGSchedLib.CreateAssignedSlotSchedule(docManager, sResName, StartTime, EndTime, saryApptTypes,/**/ stType, sSearchInfo); 102 103 OutputArray(rsSlotSchedule, "rsSlotSchedule"); 103 104 //if we have slots 104 105 if (rsSlotSchedule.Rows.Count > 0 ) 105 106 { 107 // Get appointment count to substract from the slots 106 108 rsApptSchedule = CGSchedLib.CreateAppointmentSlotSchedule(docManager, sResName, StartTime, EndTime, stType); 107 109 OutputArray(rsApptSchedule, "rsApptSchedule"); 110 // Perform the substraction 108 111 rsTemp1 = CGSchedLib.SubtractSlotsRS2(rsSlotSchedule, rsApptSchedule, sResName); 109 112 OutputArray(rsTemp1, "rsTemp1"); … … 114 117 OutputArray(rsTemp1, "rsTemp1"); 115 118 } 119 // if only one resource was passed in, its availablility is what we want 116 120 if (i == 0) 117 121 { … … 586 590 } 587 591 592 /// <summary> 593 /// My guess is that this calculates remaining slots 594 /// </summary> 595 /// <param name="rsBlocks1"></param> 596 /// <param name="rsBlocks2"></param> 597 /// <param name="sResource"></param> 598 /// <returns></returns> 588 599 public static DataTable SubtractSlotsRS2(DataTable rsBlocks1, DataTable rsBlocks2, string sResource) 589 600 { … … 770 781 }//end IntersectBlocks 771 782 772 783 /// <summary> 784 /// Number of minutes since Jan 1 1980 785 /// </summary> 786 /// <param name="d">Date to compare</param> 787 /// <returns>Minutes as integer</returns> 773 788 public static int MinSince80(DateTime d) 774 789 { … … 878 893 rect1.Height = CGSchedLib.MinSince80(dEnd1) - rect1.Y; 879 894 895 //for each row in the availability schedule 880 896 foreach (DataRow r in rsBlock.Rows) 881 897 { -
Scheduling/trunk/cs/bsdx0200GUISourceCode/CalendarGrid.cs
r900 r1011 677 677 else 678 678 { 679 //columnToPutAppt = (startTime - this.m_dtStart).Days + 1; 680 //test sam 679 681 columnToPutAppt = (startTime - this.m_dtStart).Days + 1; 680 682 } -
Scheduling/trunk/cs/bsdx0200GUISourceCode/ClinicalScheduling.csproj.user
r971 r1011 37 37 </RemoteDebugMachine> 38 38 <StartAction>Project</StartAction> 39 <StartArguments>/s=1 72.16.17.51 /p=9260 /a=shabiel12 /v=abc,123!</StartArguments>39 <StartArguments>/s=192.168.56.101 /p=9260 /a=shabiel12 /v=catdog.66</StartArguments> 40 40 <StartPage> 41 41 </StartPage> -
Scheduling/trunk/cs/bsdx0200GUISourceCode/DAccessTemplate.cs
r915 r1011 36 36 37 37 UpdateDialogData(true); 38 38 //this.cmdSelectTemplate.Focus(); // Focus on first button on form 39 39 } 40 40 … … 113 113 m_bSelectedFile = false; 114 114 OpenFileDialog openFileDialog1 = new OpenFileDialog(); 115 string sPath = "";116 sPath = Environment.GetFolderPath(Environment.SpecialFolder.Personal);117 118 openFileDialog1.InitialDirectory = @"c:\" ;119 openFileDialog1.InitialDirectory = sPath ;120 115 openFileDialog1.Filter = "Schedule Template Files (*.bsdxa)|*.bsdxa|All files (*.*)|*.*" ; 121 116 openFileDialog1.FilterIndex = 0 ; … … 185 180 this.cmdCancel.Name = "cmdCancel"; 186 181 this.cmdCancel.Size = new System.Drawing.Size(56, 24); 187 this.cmdCancel.TabIndex = 2;182 this.cmdCancel.TabIndex = 5; 188 183 this.cmdCancel.Text = "Cancel"; 189 184 // … … 194 189 this.cmdOK.Name = "cmdOK"; 195 190 this.cmdOK.Size = new System.Drawing.Size(64, 24); 196 this.cmdOK.TabIndex = 1;191 this.cmdOK.TabIndex = 4; 197 192 this.cmdOK.Text = "OK"; 198 193 this.cmdOK.Click += new System.EventHandler(this.cmdOK_Click); … … 234 229 this.cmdSelectTemplate.Name = "cmdSelectTemplate"; 235 230 this.cmdSelectTemplate.Size = new System.Drawing.Size(136, 32); 236 this.cmdSelectTemplate.TabIndex = 9;231 this.cmdSelectTemplate.TabIndex = 1; 237 232 this.cmdSelectTemplate.Text = "Select Access Template"; 238 233 this.cmdSelectTemplate.Click += new System.EventHandler(this.cmdSelectTemplate_Click); … … 254 249 this.dtpStartDate.Name = "dtpStartDate"; 255 250 this.dtpStartDate.Size = new System.Drawing.Size(184, 20); 256 this.dtpStartDate.TabIndex = 11;251 this.dtpStartDate.TabIndex = 2; 257 252 // 258 253 // udWeeksToApply … … 271 266 this.udWeeksToApply.Name = "udWeeksToApply"; 272 267 this.udWeeksToApply.Size = new System.Drawing.Size(96, 20); 273 this.udWeeksToApply.TabIndex = 12;268 this.udWeeksToApply.TabIndex = 3; 274 269 this.udWeeksToApply.Value = new decimal(new int[] { 275 270 1, -
Scheduling/trunk/cs/bsdx0200GUISourceCode/UCPatientAppts.cs
r824 r1011 119 119 private void btnPrint_Click(object sender, EventArgs e) 120 120 { 121 //Fixes bug reported by EHS. Don't print if there are no appointments as this causes null ref 122 if (dtAppt.Rows.Count == 0) 123 { 124 MessageBox.Show("No Appointments to Print", "Nothing to Print"); 125 return; 126 } 127 121 128 rowToPrint = 0; //reset row to print 122 129 DialogResult res = printDialog1.ShowDialog(); … … 124 131 } 125 132 133 /// <summary> 134 /// Sets default page orientation to landscape. 135 /// </summary> 126 136 private void PrintPtAppts_QueryPageSettings(object sender, System.Drawing.Printing.QueryPageSettingsEventArgs e) 127 137 {
Note:
See TracChangeset
for help on using the changeset viewer.