Changeset 1118 for Scheduling/trunk
- Timestamp:
- Mar 29, 2011, 5:46:30 AM (14 years ago)
- Location:
- Scheduling/trunk/cs/bsdx0200GUISourceCode
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Scheduling/trunk/cs/bsdx0200GUISourceCode/CGView.cs
r1112 r1118 100 100 private MenuItem menuItem10; 101 101 private MenuItem ctxCalGridReprintApptSlip; 102 private MenuItem ctxCalGridUndoCheckin; 103 private MenuItem ctxPrintScheduleT0; 104 private MenuItem ctxPrintScheduleT1; 105 private MenuItem ctxPrintScheduleT3; 102 106 private IContainer components; 103 107 … … 222 226 this.ctxProperties = new System.Windows.Forms.MenuItem(); 223 227 this.ctxFindAppt = new System.Windows.Forms.MenuItem(); 228 this.ctxPrintScheduleT0 = new System.Windows.Forms.MenuItem(); 229 this.ctxPrintScheduleT1 = new System.Windows.Forms.MenuItem(); 224 230 this.panelRight = new System.Windows.Forms.Panel(); 225 231 this.panelClip = new System.Windows.Forms.Panel(); … … 239 245 this.ctxCalGridDelete = new System.Windows.Forms.MenuItem(); 240 246 this.ctxCalGridCheckIn = new System.Windows.Forms.MenuItem(); 247 this.ctxCalGridUndoCheckin = new System.Windows.Forms.MenuItem(); 241 248 this.menuItem2 = new System.Windows.Forms.MenuItem(); 242 249 this.ctxCalGridNoShow = new System.Windows.Forms.MenuItem(); … … 250 257 this.splitter1 = new System.Windows.Forms.Splitter(); 251 258 this.splitter2 = new System.Windows.Forms.Splitter(); 259 this.ctxPrintScheduleT3 = new System.Windows.Forms.MenuItem(); 252 260 this.panelRight.SuspendLayout(); 253 261 this.panelClip.SuspendLayout(); … … 616 624 this.tvSchedules.Location = new System.Drawing.Point(0, 0); 617 625 this.tvSchedules.Name = "tvSchedules"; 618 this.tvSchedules.Size = new System.Drawing.Size(128, 3 93);626 this.tvSchedules.Size = new System.Drawing.Size(128, 351); 619 627 this.tvSchedules.Sorted = true; 620 628 this.tvSchedules.TabIndex = 1; … … 630 638 this.ctxEditAvailability, 631 639 this.ctxProperties, 632 this.ctxFindAppt}); 640 this.ctxFindAppt, 641 this.ctxPrintScheduleT0, 642 this.ctxPrintScheduleT1, 643 this.ctxPrintScheduleT3}); 633 644 this.contextMenu1.Popup += new System.EventHandler(this.contextMenu1_Popup); 634 645 // … … 649 660 // 650 661 this.ctxProperties.Index = 2; 651 this.ctxProperties.Text = " &Properties";662 this.ctxProperties.Text = "P&roperties"; 652 663 this.ctxProperties.Click += new System.EventHandler(this.ctxProperties_Click); 653 664 // … … 655 666 // 656 667 this.ctxFindAppt.Index = 3; 657 this.ctxFindAppt.Text = " Find Available Appointment";668 this.ctxFindAppt.Text = "&Find Available Appointment"; 658 669 this.ctxFindAppt.Click += new System.EventHandler(this.ctxFindAppt_Click); 670 // 671 // ctxPrintScheduleT0 672 // 673 this.ctxPrintScheduleT0.Index = 4; 674 this.ctxPrintScheduleT0.Text = "Print Clinic Schedule(s) (T+&0)"; 675 this.ctxPrintScheduleT0.Click += new System.EventHandler(this.ctxPrintScheduleT0_Click); 676 // 677 // ctxPrintScheduleT1 678 // 679 this.ctxPrintScheduleT1.Index = 5; 680 this.ctxPrintScheduleT1.Text = "Print Clinic Schedule(s) (T+&1)"; 681 this.ctxPrintScheduleT1.Click += new System.EventHandler(this.ctxPrintScheduleT1_Click); 659 682 // 660 683 // panelRight … … 664 687 this.panelRight.Location = new System.Drawing.Point(996, 0); 665 688 this.panelRight.Name = "panelRight"; 666 this.panelRight.Size = new System.Drawing.Size(128, 3 93);689 this.panelRight.Size = new System.Drawing.Size(128, 351); 667 690 this.panelRight.TabIndex = 3; 668 691 this.panelRight.Visible = false; … … 760 783 this.panelCenter.Location = new System.Drawing.Point(136, 24); 761 784 this.panelCenter.Name = "panelCenter"; 762 this.panelCenter.Size = new System.Drawing.Size(857, 3 45);785 this.panelCenter.Size = new System.Drawing.Size(857, 303); 763 786 this.panelCenter.TabIndex = 7; 764 787 // … … 782 805 this.calendarGrid1.Resources = ((System.Collections.ArrayList)(resources.GetObject("calendarGrid1.Resources"))); 783 806 this.calendarGrid1.SelectedAppointment = 0; 784 this.calendarGrid1.Size = new System.Drawing.Size(857, 3 45);807 this.calendarGrid1.Size = new System.Drawing.Size(857, 303); 785 808 this.calendarGrid1.StartDate = new System.DateTime(2003, 1, 27, 0, 0, 0, 0); 786 809 this.calendarGrid1.TabIndex = 0; … … 799 822 this.ctxCalGridDelete, 800 823 this.ctxCalGridCheckIn, 824 this.ctxCalGridUndoCheckin, 801 825 this.menuItem2, 802 826 this.ctxCalGridNoShow, … … 832 856 this.ctxCalGridCheckIn.Click += new System.EventHandler(this.ctxCalGridCheckIn_Click); 833 857 // 858 // ctxCalGridUndoCheckin 859 // 860 this.ctxCalGridUndoCheckin.Index = 4; 861 this.ctxCalGridUndoCheckin.Text = "&Undo Check In"; 862 this.ctxCalGridUndoCheckin.Click += new System.EventHandler(this.ctxCalGridUndoCheckin_Click); 863 // 834 864 // menuItem2 835 865 // 836 this.menuItem2.Index = 4;866 this.menuItem2.Index = 5; 837 867 this.menuItem2.Text = "-"; 838 868 // 839 869 // ctxCalGridNoShow 840 870 // 841 this.ctxCalGridNoShow.Index = 5;871 this.ctxCalGridNoShow.Index = 6; 842 872 this.ctxCalGridNoShow.Text = "Mark as No Show"; 843 873 this.ctxCalGridNoShow.Click += new System.EventHandler(this.ctxCalGridNoShow_Click); … … 845 875 // ctxCalGridNoShowUndo 846 876 // 847 this.ctxCalGridNoShowUndo.Index = 6;877 this.ctxCalGridNoShowUndo.Index = 7; 848 878 this.ctxCalGridNoShowUndo.Text = "Undo NoShow"; 849 879 this.ctxCalGridNoShowUndo.Click += new System.EventHandler(this.ctxCalGridNoShowUndo_Click); … … 851 881 // menuItem9 852 882 // 853 this.menuItem9.Index = 7;883 this.menuItem9.Index = 8; 854 884 this.menuItem9.Text = "-"; 855 885 // 856 886 // ctxCalGridWalkin 857 887 // 858 this.ctxCalGridWalkin.Index = 8;888 this.ctxCalGridWalkin.Index = 9; 859 889 this.ctxCalGridWalkin.Text = "Create Wal&k-In Appointment"; 860 890 this.ctxCalGridWalkin.Click += new System.EventHandler(this.ctxCalGridWalkin_Click); … … 862 892 // menuItem10 863 893 // 864 this.menuItem10.Index = 9;894 this.menuItem10.Index = 10; 865 895 this.menuItem10.Text = "-"; 866 896 // 867 897 // ctxCalGridReprintApptSlip 868 898 // 869 this.ctxCalGridReprintApptSlip.Index = 1 0;899 this.ctxCalGridReprintApptSlip.Index = 11; 870 900 this.ctxCalGridReprintApptSlip.Text = "&Reprint Appointment Slip"; 871 901 this.ctxCalGridReprintApptSlip.Click += new System.EventHandler(this.ctxCalGridReprintApptSlip_Click); … … 875 905 this.panelBottom.Controls.Add(this.statusBar1); 876 906 this.panelBottom.Dock = System.Windows.Forms.DockStyle.Bottom; 877 this.panelBottom.Location = new System.Drawing.Point(136, 3 69);907 this.panelBottom.Location = new System.Drawing.Point(136, 327); 878 908 this.panelBottom.Name = "panelBottom"; 879 909 this.panelBottom.Size = new System.Drawing.Size(857, 24); … … 893 923 this.splitter1.Location = new System.Drawing.Point(128, 24); 894 924 this.splitter1.Name = "splitter1"; 895 this.splitter1.Size = new System.Drawing.Size(8, 3 69);925 this.splitter1.Size = new System.Drawing.Size(8, 327); 896 926 this.splitter1.TabIndex = 9; 897 927 this.splitter1.TabStop = false; … … 902 932 this.splitter2.Location = new System.Drawing.Point(993, 24); 903 933 this.splitter2.Name = "splitter2"; 904 this.splitter2.Size = new System.Drawing.Size(3, 3 69);934 this.splitter2.Size = new System.Drawing.Size(3, 327); 905 935 this.splitter2.TabIndex = 10; 906 936 this.splitter2.TabStop = false; 907 937 // 938 // ctxPrintScheduleT3 939 // 940 this.ctxPrintScheduleT3.Index = 6; 941 this.ctxPrintScheduleT3.Text = "Print Clinic Schedule(s) (T+&3)"; 942 this.ctxPrintScheduleT3.Click += new System.EventHandler(this.ctxPrintScheduleT3_Click); 943 // 908 944 // CGView 909 945 // 910 946 this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); 911 this.ClientSize = new System.Drawing.Size(1124, 3 93);947 this.ClientSize = new System.Drawing.Size(1124, 351); 912 948 this.Controls.Add(this.panelCenter); 913 949 this.Controls.Add(this.panelBottom); … … 1097 1133 } 1098 1134 1135 private void ctxCalGridUndoCheckin_Click(object sender, EventArgs e) 1136 { 1137 AppointmentUndoCheckin(); 1138 } 1139 1099 1140 #endregion AppointmentMenu Handlers 1100 1141 … … 1107 1148 this.ctxOpenSchedule.Enabled = bEnabled; 1108 1149 this.ctxFindAppt.Enabled = bEnabled; 1150 this.ctxPrintScheduleT0.Enabled = bEnabled; 1151 this.ctxPrintScheduleT1.Enabled = bEnabled; 1152 this.ctxPrintScheduleT3.Enabled = bEnabled; 1109 1153 1110 1154 //properties not supported now … … 1162 1206 } 1163 1207 1208 private void ctxPrintScheduleT0_Click(object sender, EventArgs e) 1209 { 1210 PrintClinicSchedule(DateTime.Today, DateTime.Today); 1211 } 1212 1213 private void ctxPrintScheduleT1_Click(object sender, EventArgs e) 1214 { 1215 PrintClinicSchedule(DateTime.Today.AddDays(1), DateTime.Today.AddDays(1)); 1216 } 1217 1218 private void ctxPrintScheduleT3_Click(object sender, EventArgs e) 1219 { 1220 PrintClinicSchedule(DateTime.Today.AddDays(3), DateTime.Today.AddDays(3)); 1221 } 1222 1164 1223 private void ctxProperties_Click(object sender, System.EventArgs e) 1165 1224 { … … 1214 1273 ctxCalGridEdit.Enabled = bEditAppointments; 1215 1274 ctxCalGridCheckIn.Enabled = bEditAppointments; 1216 ctxCalGridNoShow.Enabled = bEditAppointments;1217 ctxCalGridNoShowUndo.Enabled = bEditAppointments;1275 ctxCalGridNoShow.Enabled = NoShowEnabled(); 1276 ctxCalGridNoShowUndo.Enabled = !NoShowEnabled() && calendarGrid1.SelectedAppointment > 0; 1218 1277 ctxCalGridWalkin.Enabled = ctxCalGridAdd.Enabled; 1219 1278 //smh new code 1220 ctxCalGridReprintApptSlip.Enabled = ctxCalGridEdit.Enabled; 1221 //end new code 1279 ctxCalGridReprintApptSlip.Enabled = bEditAppointments; 1280 ctxCalGridUndoCheckin.Enabled = UndoCheckinEnabled(); 1281 //end new code 1222 1282 } 1223 1283 … … 1342 1402 return ((bSlotsAvailable) || (bModSchedule) || (bOverbook)); 1343 1403 } 1404 } 1405 1406 private bool NoShowEnabled() 1407 { 1408 if (calendarGrid1.SelectedAppointment < 1) 1409 return false; 1410 CGAppointment appt = (CGAppointment)this.Appointments.AppointmentTable[calendarGrid1.SelectedAppointment]; 1411 return !appt.NoShow; 1412 } 1413 1414 private bool UndoCheckinEnabled() 1415 { 1416 if (calendarGrid1.SelectedAppointment < 1) return false; 1417 CGAppointment appt = (CGAppointment)this.Appointments.AppointmentTable[calendarGrid1.SelectedAppointment]; 1418 return appt.CheckInTime.Ticks > 0; 1344 1419 } 1345 1420 … … 1686 1761 1687 1762 /// <summary> 1688 /// Marks all selected appointments as No Show 1763 /// Marks all selected appointments as No Show from this.calendarGrid1.SelectedAppointments 1689 1764 /// </summary> 1690 /// <param name="nApptID"></param> 1691 /// <returns></returns> 1765 /// <param name="bNoShow">True - Mark as noshow; False - undo noshow</param> 1692 1766 private void AppointmentNoShow(bool bNoShow) 1693 1767 { … … 1696 1770 bool bMarked = false; //Indicates at least one attempt to mark as noshow succeeded 1697 1771 bool bRebook = false; //Stores user's response to auto-rebook dialog question 1698 CGAppointments alRebookList = new CGAppointments(); 1699 DNoShow dlg = new DNoShow();; 1700 if (bNoShow == true) 1772 CGAppointments alRebookList = new CGAppointments(); // list of appointments to rebook 1773 1774 DNoShow dlg = new DNoShow(); // no show dialog 1775 1776 if (bNoShow == true) // if noshowing, show the dialog to ask the user 1701 1777 { 1702 1778 if (dlg.ShowDialog(this) == DialogResult.Cancel) … … 1714 1790 try 1715 1791 { 1716 if ((bNoShow == true) 1792 if ((bNoShow == true) // if no-showing 1717 1793 && 1718 1794 (a.StartTime.Date > DateTime.Today.Date) … … 1721 1797 { 1722 1798 } 1723 else 1799 else // otherwise, make or undo show 1724 1800 { 1725 string sError = Document.AppointmentNoShow( nApptID, bNoShow);1801 string sError = Document.AppointmentNoShow(a, bNoShow); 1726 1802 if (sError != "1") 1727 1803 throw new Exception(sError); … … 1734 1810 MessageBox.Show("Unable to mark appointment No Show: " + ex.Message, "Clinical Scheduling"); 1735 1811 } 1812 1736 1813 if (bRebook == true) 1737 1814 { … … 1773 1850 } 1774 1851 } 1775 } 1776 1777 if (bMarked == true) 1778 { 1779 //Notify other scheduling users that this schedule has changed 1780 try 1781 { 1782 this.Document.RefreshDocument(); 1783 RaiseRPMSEvent("BSDX SCHEDULE" , m_Document.DocName); 1784 } 1785 catch (Exception ex) 1786 { 1787 Debug.Write(ex.Message); 1788 } 1789 this.calendarGrid1.Invalidate(); 1790 1791 AutoRebookFromList(alRebookList); 1792 } 1852 1853 if (bMarked == true) 1854 { 1855 //Notify other scheduling users that this schedule has changed 1856 try 1857 { 1858 //this.Document.RefreshDocument(); no need for this; event raised back and prompts refresh itself. 1859 RaiseRPMSEvent("BSDX SCHEDULE", a.Resource); 1860 } 1861 catch (Exception ex) 1862 { 1863 Debug.Write(ex.Message); 1864 } 1865 this.calendarGrid1.Invalidate(); 1866 } 1867 } 1868 AutoRebookFromList(alRebookList); 1793 1869 } 1794 1870 1871 /// <summary> 1872 /// Prints Auto Rebook Letters; does nothing else to DB!!! 1873 /// </summary> 1874 /// <param name="alRebookList">List of appointments</param> 1795 1875 private void AutoRebookFromList(CGAppointments alRebookList) 1796 1876 { … … 1836 1916 /// Delete all selected appointments 1837 1917 /// </summary> 1838 private void AppointmentDelete() 1839 { 1840 calendarGrid1.CGToolTip.Active = false; 1841 CGAppointments alRebookList = new CGAppointments(); 1842 1843 DCancelAppt dCancel = new DCancelAppt(); 1844 dCancel.InitializePage(this.m_DocManager); 1845 if (dCancel.ShowDialog(this) != DialogResult.OK) 1846 { 1847 calendarGrid1.CGToolTip.Active = true; 1848 return; 1849 } 1850 1851 bool bClinic = dCancel.ClinicCancelled; 1852 int nReason = dCancel.CancelReason; 1853 string sRemarks = dCancel.CancelRemarks; 1854 bool bRebook = dCancel.AutoRebook; 1855 int nRebookStart = dCancel.RebookStartDays; 1856 int nRebookMax = dCancel.RebookMaxDays; 1857 int nRebookAccessType = dCancel.RebookAccessType; 1858 1859 calendarGrid1.CGToolTip.Active = true; 1860 1861 bool bDeleted = false; 1862 foreach (CGAppointment a in this.calendarGrid1.SelectedAppointments.AppointmentTable.Values) 1863 { 1864 int nApptID = a.AppointmentKey; 1865 Debug.Assert(nApptID != 0); 1866 try 1867 { 1868 string sError = Document.DeleteAppointment(nApptID,bClinic, nReason, sRemarks); 1869 if (sError != "") 1870 throw new Exception(sError); 1871 1872 bDeleted = true; 1873 if (bRebook == true) 1874 { 1875 try 1876 { 1877 //TODO: Parameterize or dialogize the minum and maximum rebook days 1878 CGAppointment aRebook; 1879 int nMinimumdays = nRebookStart; 1880 int nMaximumdays = nRebookMax; 1881 string sResult = Document.AutoRebook(a, nRebookAccessType, nMinimumdays, nMaximumdays, out aRebook); 1882 if (sResult == "1") 1883 { 1884 //Add appointment to list of rebooked appointments 1885 alRebookList.AddAppointment(a); 1886 } 1887 1888 } 1889 catch (Exception ex) 1890 { 1891 MessageBox.Show("Unable to rebook: " + ex.Message); 1892 } 1893 } 1894 } 1895 catch (Exception ex) 1896 { 1897 MessageBox.Show("Unable to delete appointment. " + ex.Message, "Clinical Scheduling"); 1898 } 1899 1900 } 1901 if (bDeleted == true) 1902 { 1903 try 1904 { 1905 this.UpdateArrays(); 1906 RaiseRPMSEvent("BSDX SCHEDULE" , m_Document.DocName); 1907 1908 //Get the appointments and availabilities, async, from Server. Callback updates this thread's controls. 1909 OnUpdateScheduleDelegate ousd = new OnUpdateScheduleDelegate(OnUpdateSchedule); 1910 ousd.BeginInvoke(OnUpdateScheduleCallback, null); 1911 } 1912 catch (Exception ex) 1913 { 1914 Debug.Write(ex.Message); 1915 } 1916 this.calendarGrid1.Invalidate(); 1917 if (bRebook == true) 1918 { 1919 AutoRebookFromList(alRebookList); 1920 } 1921 } 1922 1923 } 1918 private void AppointmentDelete() 1919 { 1920 calendarGrid1.CGToolTip.Active = false; 1921 CGAppointments alRebookList = new CGAppointments(); 1922 1923 // check to see if any appointment is checked in first 1924 foreach (CGAppointment a in this.calendarGrid1.SelectedAppointments.AppointmentTable.Values) 1925 { 1926 if (a.CheckInTime.Ticks > 0) 1927 { 1928 MessageBox.Show("You must Un-checkin the appointment first before removing it."); 1929 return; 1930 } 1931 } 1932 1933 DCancelAppt dCancel = new DCancelAppt(); 1934 dCancel.InitializePage(this.m_DocManager); 1935 if (dCancel.ShowDialog(this) != DialogResult.OK) 1936 { 1937 calendarGrid1.CGToolTip.Active = true; 1938 return; 1939 } 1940 1941 bool bClinic = dCancel.ClinicCancelled; 1942 int nReason = dCancel.CancelReason; 1943 string sRemarks = dCancel.CancelRemarks; 1944 bool bRebook = dCancel.AutoRebook; 1945 int nRebookStart = dCancel.RebookStartDays; 1946 int nRebookMax = dCancel.RebookMaxDays; 1947 int nRebookAccessType = dCancel.RebookAccessType; 1948 1949 calendarGrid1.CGToolTip.Active = true; 1950 1951 foreach (CGAppointment a in this.calendarGrid1.SelectedAppointments.AppointmentTable.Values) 1952 { 1953 1954 int nApptID = a.AppointmentKey; 1955 Debug.Assert(nApptID != 0); 1956 try 1957 { 1958 string sError = Document.DeleteAppointment(nApptID, bClinic, nReason, sRemarks); 1959 if (sError != "") 1960 throw new Exception(sError); 1961 1962 this.UpdateArrays(); //Redraw this calendar grid 1963 1964 if (bRebook == true) 1965 { 1966 try 1967 { 1968 //TODO: Parameterize or dialogize the minum and maximum rebook days 1969 CGAppointment aRebook; 1970 int nMinimumdays = nRebookStart; 1971 int nMaximumdays = nRebookMax; 1972 string sResult = Document.AutoRebook(a, nRebookAccessType, nMinimumdays, nMaximumdays, out aRebook); 1973 if (sResult == "1") 1974 { 1975 //Add appointment to list of rebooked appointments 1976 alRebookList.AddAppointment(a); 1977 } 1978 1979 } 1980 catch (Exception ex) 1981 { 1982 MessageBox.Show("Unable to rebook: " + ex.Message); 1983 } 1984 } 1985 1986 RaiseRPMSEvent("BSDX SCHEDULE", a.Resource); 1987 } 1988 catch (Exception ex) 1989 { 1990 MessageBox.Show("Unable to delete appointment. " + ex.Message, "Clinical Scheduling"); 1991 } 1992 1993 1994 if (alRebookList.AppointmentCount > 0) 1995 { 1996 AutoRebookFromList(alRebookList); 1997 } 1998 } 1999 } 1924 2000 1925 2001 private void AppointmentCheckIn() … … 1983 2059 1984 2060 } 2061 2062 private void AppointmentUndoCheckin() 2063 { 2064 Debug.Assert(calendarGrid1.SelectedAppointment > 0); 2065 2066 foreach (CGAppointment a in this.calendarGrid1.SelectedAppointments.AppointmentTable.Values) 2067 { 2068 string msg; //out var 2069 bool didweSucceed = Document.AppointmentUndoCheckin(a, out msg); 2070 2071 if (!didweSucceed) 2072 { 2073 MessageBox.Show("Error: " + msg); 2074 continue; 2075 } 2076 2077 RaiseRPMSEvent("BSDX SCHEDULE", a.Resource); 2078 } 2079 2080 this.UpdateArrays(); 2081 } 1985 2082 1986 2083 private void AppointmentAddWalkin() … … 2070 2167 this.UpdateArrays(); 2071 2168 2072 //Get the appointments and availabilities, async, from Server. Callback updates this thread's controls. 2073 OnUpdateScheduleDelegate ousd = new OnUpdateScheduleDelegate(OnUpdateSchedule); 2074 ousd.BeginInvoke(OnUpdateScheduleCallback, null); 2075 2076 2169 RaiseRPMSEvent("BSDX SCHEDULE", appt.Resource); 2077 2170 } 2078 2171 catch (Exception ex) … … 2087 2180 return; 2088 2181 } 2089 2090 try2091 {2092 RaiseRPMSEvent("BSDX SCHEDULE", m_Document.DocName);2093 }2094 catch (Exception ex)2095 {2096 Debug.Write(ex.Message);2097 }2098 2099 2100 2182 } 2101 2183 … … 2195 2277 //Show the new set of appointments by calling UpdateArrays. Fetches Document's CGAppointments 2196 2278 this.UpdateArrays(); 2197 2198 //Get the appointments and availabilities, async, from Server. Callback updates this thread's controls. 2199 OnUpdateScheduleDelegate ousd = new OnUpdateScheduleDelegate(OnUpdateSchedule); 2200 ousd.BeginInvoke(OnUpdateScheduleCallback, null); 2279 2280 RaiseRPMSEvent("BSDX SCHEDULE", appt.Resource); 2201 2281 } 2202 2282 catch (Exception ex) … … 2210 2290 MessageBox.Show("VISTA says: \r\n" + msg, "Unable to Make Appointment"); 2211 2291 return; 2212 }2213 2214 try2215 {2216 RaiseRPMSEvent("BSDX SCHEDULE" , m_Document.DocName);2217 this.calendarGrid1.Invalidate();2218 }2219 catch (Exception ex)2220 {2221 Debug.Write(ex.Message);2222 2292 } 2223 2293 } … … 2332 2402 { 2333 2403 //Signal RPMS to raise an event 2334 m_ConnectInfo.RaiseEvent(sEvent, sParams, true);2404 m_ConnectInfo.RaiseEvent(sEvent, sParams, false); 2335 2405 } 2336 2406 catch (Exception ex) … … 3367 3437 3368 3438 3369 3370 3371 3372 3439 private void PrintClinicSchedule(DateTime dStart, DateTime dEnd) 3440 { 3441 DPatientLetter dpl = new DPatientLetter(); 3442 3443 int[] resourceIENs = (from resource in CGDocumentManager.Current.GlobalDataSet.Tables["Resources"].AsEnumerable() 3444 join resource_name in m_alSelectedTreeResourceArray.Cast<string>() on resource.Field<string>("RESOURCE_NAME") equals resource_name 3445 select resource.Field<int>("RESOURCEID") 3446 ).ToArray<int>(); 3447 3448 // + | is an oddity in the Mumps code which I haven't investigated yet. 3449 dpl.InitializeFormClinicSchedule(this.DocManager, string.Join("|", resourceIENs) + "|", dStart, dEnd); 3450 dpl.ShowDialog(this); 3451 } 3452 3373 3453 3374 3454
Note:
See TracChangeset
for help on using the changeset viewer.