Changeset 1110 for Scheduling/trunk/cs/bsdx0200GUISourceCode/CGView.cs
- Timestamp:
- Mar 21, 2011, 8:47:45 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Scheduling/trunk/cs/bsdx0200GUISourceCode/CGView.cs
r1106 r1110 1 1 using System; 2 using System.Drawing;3 2 using System.Collections; 4 3 using System.ComponentModel; … … 9 8 using IndianHealthService.BMXNet; 10 9 using System.Runtime.InteropServices; 10 using System.Drawing.Printing; 11 11 12 12 namespace IndianHealthService.ClinicalScheduling … … 97 97 private System.Windows.Forms.MenuItem mnuDisplayWalkIns; 98 98 private System.Windows.Forms.MenuItem mnuRPMSDivision; 99 private System.Drawing.Printing.PrintDocument printRoutingSlip;100 99 private MenuItem menuItem10; 101 private MenuItem ctxCalGridReprint RoutingSlip;100 private MenuItem ctxCalGridReprintApptSlip; 102 101 private IContainer components; 103 102 … … 233 232 this.lblResource = new System.Windows.Forms.Label(); 234 233 this.panelCenter = new System.Windows.Forms.Panel(); 234 this.calendarGrid1 = new IndianHealthService.ClinicalScheduling.CalendarGrid(); 235 235 this.ctxCalendarGrid = new System.Windows.Forms.ContextMenu(); 236 236 this.ctxCalGridAdd = new System.Windows.Forms.MenuItem(); … … 244 244 this.ctxCalGridWalkin = new System.Windows.Forms.MenuItem(); 245 245 this.menuItem10 = new System.Windows.Forms.MenuItem(); 246 this.ctxCalGridReprint RoutingSlip = new System.Windows.Forms.MenuItem();246 this.ctxCalGridReprintApptSlip = new System.Windows.Forms.MenuItem(); 247 247 this.panelBottom = new System.Windows.Forms.Panel(); 248 248 this.statusBar1 = new System.Windows.Forms.StatusBar(); 249 249 this.splitter1 = new System.Windows.Forms.Splitter(); 250 250 this.splitter2 = new System.Windows.Forms.Splitter(); 251 this.printRoutingSlip = new System.Drawing.Printing.PrintDocument();252 this.calendarGrid1 = new IndianHealthService.ClinicalScheduling.CalendarGrid();253 251 this.panelRight.SuspendLayout(); 254 252 this.panelClip.SuspendLayout(); … … 763 761 this.panelCenter.Size = new System.Drawing.Size(857, 345); 764 762 this.panelCenter.TabIndex = 7; 765 //766 // ctxCalendarGrid767 //768 this.ctxCalendarGrid.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {769 this.ctxCalGridAdd,770 this.ctxCalGridEdit,771 this.ctxCalGridDelete,772 this.ctxCalGridCheckIn,773 this.menuItem2,774 this.ctxCalGridNoShow,775 this.ctxCalGridNoShowUndo,776 this.menuItem9,777 this.ctxCalGridWalkin,778 this.menuItem10,779 this.ctxCalGridReprintRoutingSlip});780 this.ctxCalendarGrid.Popup += new System.EventHandler(this.ctxCalendarGrid_Popup);781 //782 // ctxCalGridAdd783 //784 this.ctxCalGridAdd.Index = 0;785 this.ctxCalGridAdd.Text = "Add Appointment";786 this.ctxCalGridAdd.Click += new System.EventHandler(this.ctxCalGridAdd_Click);787 //788 // ctxCalGridEdit789 //790 this.ctxCalGridEdit.Index = 1;791 this.ctxCalGridEdit.Text = "Edit Appointment";792 this.ctxCalGridEdit.Click += new System.EventHandler(this.ctxCalGridEdit_Click);793 //794 // ctxCalGridDelete795 //796 this.ctxCalGridDelete.Index = 2;797 this.ctxCalGridDelete.Text = "Cancel Appointment";798 this.ctxCalGridDelete.Click += new System.EventHandler(this.ctxCalGridDelete_Click);799 //800 // ctxCalGridCheckIn801 //802 this.ctxCalGridCheckIn.Index = 3;803 this.ctxCalGridCheckIn.Text = "Check In Patient";804 this.ctxCalGridCheckIn.Click += new System.EventHandler(this.ctxCalGridCheckIn_Click);805 //806 // menuItem2807 //808 this.menuItem2.Index = 4;809 this.menuItem2.Text = "-";810 //811 // ctxCalGridNoShow812 //813 this.ctxCalGridNoShow.Index = 5;814 this.ctxCalGridNoShow.Text = "Mark as No Show";815 this.ctxCalGridNoShow.Click += new System.EventHandler(this.ctxCalGridNoShow_Click);816 //817 // ctxCalGridNoShowUndo818 //819 this.ctxCalGridNoShowUndo.Index = 6;820 this.ctxCalGridNoShowUndo.Text = "Undo NoShow";821 this.ctxCalGridNoShowUndo.Click += new System.EventHandler(this.ctxCalGridNoShowUndo_Click);822 //823 // menuItem9824 //825 this.menuItem9.Index = 7;826 this.menuItem9.Text = "-";827 //828 // ctxCalGridWalkin829 //830 this.ctxCalGridWalkin.Index = 8;831 this.ctxCalGridWalkin.Text = "Create Wal&k-In Appointment";832 this.ctxCalGridWalkin.Click += new System.EventHandler(this.ctxCalGridWalkin_Click);833 //834 // menuItem10835 //836 this.menuItem10.Index = 9;837 this.menuItem10.Text = "-";838 //839 // ctxCalGridReprintRoutingSlip840 //841 this.ctxCalGridReprintRoutingSlip.Index = 10;842 this.ctxCalGridReprintRoutingSlip.Text = "&Reprint Routing Slip";843 this.ctxCalGridReprintRoutingSlip.Click += new System.EventHandler(this.ctxCalGridReprintRoutingSlip_Click);844 //845 // panelBottom846 //847 this.panelBottom.Controls.Add(this.statusBar1);848 this.panelBottom.Dock = System.Windows.Forms.DockStyle.Bottom;849 this.panelBottom.Location = new System.Drawing.Point(136, 369);850 this.panelBottom.Name = "panelBottom";851 this.panelBottom.Size = new System.Drawing.Size(857, 24);852 this.panelBottom.TabIndex = 8;853 //854 // statusBar1855 //856 this.statusBar1.Dock = System.Windows.Forms.DockStyle.Fill;857 this.statusBar1.Location = new System.Drawing.Point(0, 0);858 this.statusBar1.Name = "statusBar1";859 this.statusBar1.Size = new System.Drawing.Size(857, 24);860 this.statusBar1.SizingGrip = false;861 this.statusBar1.TabIndex = 0;862 //863 // splitter1864 //865 this.splitter1.Location = new System.Drawing.Point(128, 24);866 this.splitter1.Name = "splitter1";867 this.splitter1.Size = new System.Drawing.Size(8, 369);868 this.splitter1.TabIndex = 9;869 this.splitter1.TabStop = false;870 //871 // splitter2872 //873 this.splitter2.Dock = System.Windows.Forms.DockStyle.Right;874 this.splitter2.Location = new System.Drawing.Point(993, 24);875 this.splitter2.Name = "splitter2";876 this.splitter2.Size = new System.Drawing.Size(3, 369);877 this.splitter2.TabIndex = 10;878 this.splitter2.TabStop = false;879 //880 // printRoutingSlip881 //882 this.printRoutingSlip.DocumentName = "Routing Slip";883 this.printRoutingSlip.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printRoutingSlip_PrintPage);884 763 // 885 764 // calendarGrid1 … … 912 791 this.calendarGrid1.MouseEnter += new System.EventHandler(this.calendarGrid1_MouseEnter); 913 792 // 793 // ctxCalendarGrid 794 // 795 this.ctxCalendarGrid.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { 796 this.ctxCalGridAdd, 797 this.ctxCalGridEdit, 798 this.ctxCalGridDelete, 799 this.ctxCalGridCheckIn, 800 this.menuItem2, 801 this.ctxCalGridNoShow, 802 this.ctxCalGridNoShowUndo, 803 this.menuItem9, 804 this.ctxCalGridWalkin, 805 this.menuItem10, 806 this.ctxCalGridReprintApptSlip}); 807 this.ctxCalendarGrid.Popup += new System.EventHandler(this.ctxCalendarGrid_Popup); 808 // 809 // ctxCalGridAdd 810 // 811 this.ctxCalGridAdd.Index = 0; 812 this.ctxCalGridAdd.Text = "Add Appointment"; 813 this.ctxCalGridAdd.Click += new System.EventHandler(this.ctxCalGridAdd_Click); 814 // 815 // ctxCalGridEdit 816 // 817 this.ctxCalGridEdit.Index = 1; 818 this.ctxCalGridEdit.Text = "Edit Appointment"; 819 this.ctxCalGridEdit.Click += new System.EventHandler(this.ctxCalGridEdit_Click); 820 // 821 // ctxCalGridDelete 822 // 823 this.ctxCalGridDelete.Index = 2; 824 this.ctxCalGridDelete.Text = "Cancel Appointment"; 825 this.ctxCalGridDelete.Click += new System.EventHandler(this.ctxCalGridDelete_Click); 826 // 827 // ctxCalGridCheckIn 828 // 829 this.ctxCalGridCheckIn.Index = 3; 830 this.ctxCalGridCheckIn.Text = "Check In Patient"; 831 this.ctxCalGridCheckIn.Click += new System.EventHandler(this.ctxCalGridCheckIn_Click); 832 // 833 // menuItem2 834 // 835 this.menuItem2.Index = 4; 836 this.menuItem2.Text = "-"; 837 // 838 // ctxCalGridNoShow 839 // 840 this.ctxCalGridNoShow.Index = 5; 841 this.ctxCalGridNoShow.Text = "Mark as No Show"; 842 this.ctxCalGridNoShow.Click += new System.EventHandler(this.ctxCalGridNoShow_Click); 843 // 844 // ctxCalGridNoShowUndo 845 // 846 this.ctxCalGridNoShowUndo.Index = 6; 847 this.ctxCalGridNoShowUndo.Text = "Undo NoShow"; 848 this.ctxCalGridNoShowUndo.Click += new System.EventHandler(this.ctxCalGridNoShowUndo_Click); 849 // 850 // menuItem9 851 // 852 this.menuItem9.Index = 7; 853 this.menuItem9.Text = "-"; 854 // 855 // ctxCalGridWalkin 856 // 857 this.ctxCalGridWalkin.Index = 8; 858 this.ctxCalGridWalkin.Text = "Create Wal&k-In Appointment"; 859 this.ctxCalGridWalkin.Click += new System.EventHandler(this.ctxCalGridWalkin_Click); 860 // 861 // menuItem10 862 // 863 this.menuItem10.Index = 9; 864 this.menuItem10.Text = "-"; 865 // 866 // ctxCalGridReprintApptSlip 867 // 868 this.ctxCalGridReprintApptSlip.Index = 10; 869 this.ctxCalGridReprintApptSlip.Text = "&Reprint Appointment Slip"; 870 this.ctxCalGridReprintApptSlip.Click += new System.EventHandler(this.ctxCalGridReprintApptSlip_Click); 871 // 872 // panelBottom 873 // 874 this.panelBottom.Controls.Add(this.statusBar1); 875 this.panelBottom.Dock = System.Windows.Forms.DockStyle.Bottom; 876 this.panelBottom.Location = new System.Drawing.Point(136, 369); 877 this.panelBottom.Name = "panelBottom"; 878 this.panelBottom.Size = new System.Drawing.Size(857, 24); 879 this.panelBottom.TabIndex = 8; 880 // 881 // statusBar1 882 // 883 this.statusBar1.Dock = System.Windows.Forms.DockStyle.Fill; 884 this.statusBar1.Location = new System.Drawing.Point(0, 0); 885 this.statusBar1.Name = "statusBar1"; 886 this.statusBar1.Size = new System.Drawing.Size(857, 24); 887 this.statusBar1.SizingGrip = false; 888 this.statusBar1.TabIndex = 0; 889 // 890 // splitter1 891 // 892 this.splitter1.Location = new System.Drawing.Point(128, 24); 893 this.splitter1.Name = "splitter1"; 894 this.splitter1.Size = new System.Drawing.Size(8, 369); 895 this.splitter1.TabIndex = 9; 896 this.splitter1.TabStop = false; 897 // 898 // splitter2 899 // 900 this.splitter2.Dock = System.Windows.Forms.DockStyle.Right; 901 this.splitter2.Location = new System.Drawing.Point(993, 24); 902 this.splitter2.Name = "splitter2"; 903 this.splitter2.Size = new System.Drawing.Size(3, 369); 904 this.splitter2.TabIndex = 10; 905 this.splitter2.TabStop = false; 906 // 914 907 // CGView 915 908 // … … 1224 1217 ctxCalGridWalkin.Enabled = ctxCalGridAdd.Enabled; 1225 1218 //smh new code 1226 ctxCalGridReprint RoutingSlip.Enabled = ctxCalGridEdit.Enabled;1219 ctxCalGridReprintApptSlip.Enabled = ctxCalGridEdit.Enabled; 1227 1220 //end new code 1228 1221 } … … 1265 1258 1266 1259 //new code smh 1267 private void ctxCalGridReprint RoutingSlip_Click(object sender, EventArgs e)1260 private void ctxCalGridReprintApptSlip_Click(object sender, EventArgs e) 1268 1261 { 1269 printRoutingSlip.Print(); 1262 int apptID = this.CGrid.SelectedAppointment; 1263 if (apptID <= 0) return; 1264 1265 CGAppointment a = (CGAppointment) this.Appointments.AppointmentTable[apptID]; 1266 1267 PrintDocument pd = new PrintDocument() { DocumentName = "Appointment Slip for Appt " + apptID }; //Autoinit for DocName 1268 pd.PrintPage += (s, pe) => //son of a lambda 1269 { 1270 CGDocumentManager.Current.PrintingObject.PrintAppointmentSlip(a, pe); 1271 }; 1272 1273 pd.Print(); 1270 1274 } 1271 1275 //end new code … … 1996 2000 //smh new code 1997 2001 if (dlgCheckin.PrintRouteSlip) 1998 this.printRoutingSlip.Print();2002 // this.printRoutingSlip.Print(); 1999 2003 // end new code 2000 2004 … … 3247 3251 int nApptID = this.calendarGrid1.SelectedAppointment; 3248 3252 CGAppointment a = (CGAppointment)this.Appointments.AppointmentTable[nApptID]; 3249 C linicalScheduling.Printing.PrintRoutingSlip(a, "Routing Slip", e);3253 CGDocumentManager.Current.PrintingObject.PrintRoutingSlip(a, "Routing Slip", e); 3250 3254 } 3251 3255
Note:
See TracChangeset
for help on using the changeset viewer.