Ignore:
Timestamp:
Jun 19, 2010, 12:41:06 PM (14 years ago)
Author:
Sam Habiel
Message:

Support for Routing Slip printing.
Version change from 1.1 to 1.2 in preparation for release.
Printing.cs: Addition of PrintRoutingSlip method.
CGView.cs: Handling of printing of routing slip if chosen in DCheckIn.cs
CGView.cs: New context option to re-print routing slip
DCheckIn.cs: toolTip1 to explain that routing slip will print on the default printer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Scheduling/trunk/cs/bsdx0200GUISourceCode/CGView.cs

    r802 r804  
    101101                private System.Windows.Forms.MenuItem mnuDisplayWalkIns;
    102102        private System.Windows.Forms.MenuItem mnuRPMSDivision;
     103        private System.Drawing.Printing.PrintDocument printRoutingSlip;
     104        private MenuItem menuItem10;
     105        private MenuItem ctxCalGridReprintRoutingSlip;
    103106        private IContainer components;
    104107
     
    266269            this.lblResource = new System.Windows.Forms.Label();
    267270            this.panelCenter = new System.Windows.Forms.Panel();
    268             this.calendarGrid1 = new IndianHealthService.ClinicalScheduling.CalendarGrid();
    269271            this.ctxCalendarGrid = new System.Windows.Forms.ContextMenu();
    270272            this.ctxCalGridAdd = new System.Windows.Forms.MenuItem();
     
    277279            this.menuItem9 = new System.Windows.Forms.MenuItem();
    278280            this.ctxCalGridWalkin = new System.Windows.Forms.MenuItem();
     281            this.menuItem10 = new System.Windows.Forms.MenuItem();
    279282            this.panelBottom = new System.Windows.Forms.Panel();
    280283            this.statusBar1 = new System.Windows.Forms.StatusBar();
    281284            this.splitter1 = new System.Windows.Forms.Splitter();
    282285            this.splitter2 = new System.Windows.Forms.Splitter();
     286            this.printRoutingSlip = new System.Drawing.Printing.PrintDocument();
     287            this.calendarGrid1 = new IndianHealthService.ClinicalScheduling.CalendarGrid();
     288            this.ctxCalGridReprintRoutingSlip = new System.Windows.Forms.MenuItem();
    283289            this.panelRight.SuspendLayout();
    284290            this.panelClip.SuspendLayout();
     
    643649            this.tvSchedules.Location = new System.Drawing.Point(0, 0);
    644650            this.tvSchedules.Name = "tvSchedules";
    645             this.tvSchedules.Size = new System.Drawing.Size(128, 422);
     651            this.tvSchedules.Size = new System.Drawing.Size(128, 369);
    646652            this.tvSchedules.Sorted = true;
    647653            this.tvSchedules.TabIndex = 1;
     
    691697            this.panelRight.Location = new System.Drawing.Point(807, 0);
    692698            this.panelRight.Name = "panelRight";
    693             this.panelRight.Size = new System.Drawing.Size(128, 422);
     699            this.panelRight.Size = new System.Drawing.Size(128, 369);
    694700            this.panelRight.TabIndex = 3;
    695701            this.panelRight.Visible = false;
     
    787793            this.panelCenter.Location = new System.Drawing.Point(136, 24);
    788794            this.panelCenter.Name = "panelCenter";
    789             this.panelCenter.Size = new System.Drawing.Size(668, 374);
     795            this.panelCenter.Size = new System.Drawing.Size(668, 321);
    790796            this.panelCenter.TabIndex = 7;
     797            //
     798            // ctxCalendarGrid
     799            //
     800            this.ctxCalendarGrid.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
     801            this.ctxCalGridAdd,
     802            this.ctxCalGridEdit,
     803            this.ctxCalGridDelete,
     804            this.ctxCalGridCheckIn,
     805            this.menuItem2,
     806            this.ctxCalGridNoShow,
     807            this.ctxCalGridNoShowUndo,
     808            this.menuItem9,
     809            this.ctxCalGridWalkin,
     810            this.menuItem10,
     811            this.ctxCalGridReprintRoutingSlip});
     812            this.ctxCalendarGrid.Popup += new System.EventHandler(this.ctxCalendarGrid_Popup);
     813            //
     814            // ctxCalGridAdd
     815            //
     816            this.ctxCalGridAdd.Index = 0;
     817            this.ctxCalGridAdd.Text = "Add Appointment";
     818            this.ctxCalGridAdd.Click += new System.EventHandler(this.ctxCalGridAdd_Click);
     819            //
     820            // ctxCalGridEdit
     821            //
     822            this.ctxCalGridEdit.Index = 1;
     823            this.ctxCalGridEdit.Text = "Edit Appointment";
     824            this.ctxCalGridEdit.Click += new System.EventHandler(this.ctxCalGridEdit_Click);
     825            //
     826            // ctxCalGridDelete
     827            //
     828            this.ctxCalGridDelete.Index = 2;
     829            this.ctxCalGridDelete.Text = "Cancel Appointment";
     830            this.ctxCalGridDelete.Click += new System.EventHandler(this.ctxCalGridDelete_Click);
     831            //
     832            // ctxCalGridCheckIn
     833            //
     834            this.ctxCalGridCheckIn.Index = 3;
     835            this.ctxCalGridCheckIn.Text = "Check In Patient";
     836            this.ctxCalGridCheckIn.Click += new System.EventHandler(this.ctxCalGridCheckIn_Click);
     837            //
     838            // menuItem2
     839            //
     840            this.menuItem2.Index = 4;
     841            this.menuItem2.Text = "-";
     842            //
     843            // ctxCalGridNoShow
     844            //
     845            this.ctxCalGridNoShow.Index = 5;
     846            this.ctxCalGridNoShow.Text = "Mark as No Show";
     847            this.ctxCalGridNoShow.Click += new System.EventHandler(this.ctxCalGridNoShow_Click);
     848            //
     849            // ctxCalGridNoShowUndo
     850            //
     851            this.ctxCalGridNoShowUndo.Index = 6;
     852            this.ctxCalGridNoShowUndo.Text = "Undo NoShow";
     853            this.ctxCalGridNoShowUndo.Click += new System.EventHandler(this.ctxCalGridNoShowUndo_Click);
     854            //
     855            // menuItem9
     856            //
     857            this.menuItem9.Index = 7;
     858            this.menuItem9.Text = "-";
     859            //
     860            // ctxCalGridWalkin
     861            //
     862            this.ctxCalGridWalkin.Index = 8;
     863            this.ctxCalGridWalkin.Text = "Create Wal&k-In Appointment";
     864            this.ctxCalGridWalkin.Click += new System.EventHandler(this.ctxCalGridWalkin_Click);
     865            //
     866            // menuItem10
     867            //
     868            this.menuItem10.Index = 9;
     869            this.menuItem10.Text = "-";
     870            //
     871            // panelBottom
     872            //
     873            this.panelBottom.Controls.Add(this.statusBar1);
     874            this.panelBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
     875            this.panelBottom.Location = new System.Drawing.Point(136, 345);
     876            this.panelBottom.Name = "panelBottom";
     877            this.panelBottom.Size = new System.Drawing.Size(668, 24);
     878            this.panelBottom.TabIndex = 8;
     879            //
     880            // statusBar1
     881            //
     882            this.statusBar1.Dock = System.Windows.Forms.DockStyle.Fill;
     883            this.statusBar1.Location = new System.Drawing.Point(0, 0);
     884            this.statusBar1.Name = "statusBar1";
     885            this.statusBar1.Size = new System.Drawing.Size(668, 24);
     886            this.statusBar1.SizingGrip = false;
     887            this.statusBar1.TabIndex = 0;
     888            //
     889            // splitter1
     890            //
     891            this.splitter1.Location = new System.Drawing.Point(128, 24);
     892            this.splitter1.Name = "splitter1";
     893            this.splitter1.Size = new System.Drawing.Size(8, 345);
     894            this.splitter1.TabIndex = 9;
     895            this.splitter1.TabStop = false;
     896            //
     897            // splitter2
     898            //
     899            this.splitter2.Dock = System.Windows.Forms.DockStyle.Right;
     900            this.splitter2.Location = new System.Drawing.Point(804, 24);
     901            this.splitter2.Name = "splitter2";
     902            this.splitter2.Size = new System.Drawing.Size(3, 345);
     903            this.splitter2.TabIndex = 10;
     904            this.splitter2.TabStop = false;
     905            //
     906            // printRoutingSlip
     907            //
     908            this.printRoutingSlip.DocumentName = "Routing Slip";
     909            this.printRoutingSlip.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printRoutingSlip_PrintPage);
    791910            //
    792911            // calendarGrid1
     
    809928            this.calendarGrid1.Resources = ((System.Collections.ArrayList)(resources.GetObject("calendarGrid1.Resources")));
    810929            this.calendarGrid1.SelectedAppointment = 0;
    811             this.calendarGrid1.Size = new System.Drawing.Size(668, 374);
     930            this.calendarGrid1.Size = new System.Drawing.Size(668, 321);
    812931            this.calendarGrid1.StartDate = new System.DateTime(2003, 1, 27, 0, 0, 0, 0);
    813932            this.calendarGrid1.TabIndex = 0;
     
    818937            this.calendarGrid1.CGAppointmentAdded += new IndianHealthService.ClinicalScheduling.CGAppointmentChangedHandler(this.calendarGrid1_CGAppointmentAdded);
    819938            //
    820             // ctxCalendarGrid
    821             //
    822             this.ctxCalendarGrid.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
    823             this.ctxCalGridAdd,
    824             this.ctxCalGridEdit,
    825             this.ctxCalGridDelete,
    826             this.ctxCalGridCheckIn,
    827             this.menuItem2,
    828             this.ctxCalGridNoShow,
    829             this.ctxCalGridNoShowUndo,
    830             this.menuItem9,
    831             this.ctxCalGridWalkin});
    832             this.ctxCalendarGrid.Popup += new System.EventHandler(this.ctxCalendarGrid_Popup);
    833             //
    834             // ctxCalGridAdd
    835             //
    836             this.ctxCalGridAdd.Index = 0;
    837             this.ctxCalGridAdd.Text = "Add Appointment";
    838             this.ctxCalGridAdd.Click += new System.EventHandler(this.ctxCalGridAdd_Click);
    839             //
    840             // ctxCalGridEdit
    841             //
    842             this.ctxCalGridEdit.Index = 1;
    843             this.ctxCalGridEdit.Text = "Edit Appointment";
    844             this.ctxCalGridEdit.Click += new System.EventHandler(this.ctxCalGridEdit_Click);
    845             //
    846             // ctxCalGridDelete
    847             //
    848             this.ctxCalGridDelete.Index = 2;
    849             this.ctxCalGridDelete.Text = "Cancel Appointment";
    850             this.ctxCalGridDelete.Click += new System.EventHandler(this.ctxCalGridDelete_Click);
    851             //
    852             // ctxCalGridCheckIn
    853             //
    854             this.ctxCalGridCheckIn.Index = 3;
    855             this.ctxCalGridCheckIn.Text = "Check In Patient";
    856             this.ctxCalGridCheckIn.Click += new System.EventHandler(this.ctxCalGridCheckIn_Click);
    857             //
    858             // menuItem2
    859             //
    860             this.menuItem2.Index = 4;
    861             this.menuItem2.Text = "-";
    862             //
    863             // ctxCalGridNoShow
    864             //
    865             this.ctxCalGridNoShow.Index = 5;
    866             this.ctxCalGridNoShow.Text = "Mark as No Show";
    867             this.ctxCalGridNoShow.Click += new System.EventHandler(this.ctxCalGridNoShow_Click);
    868             //
    869             // ctxCalGridNoShowUndo
    870             //
    871             this.ctxCalGridNoShowUndo.Index = 6;
    872             this.ctxCalGridNoShowUndo.Text = "Undo NoShow";
    873             this.ctxCalGridNoShowUndo.Click += new System.EventHandler(this.ctxCalGridNoShowUndo_Click);
    874             //
    875             // menuItem9
    876             //
    877             this.menuItem9.Index = 7;
    878             this.menuItem9.Text = "-";
    879             //
    880             // ctxCalGridWalkin
    881             //
    882             this.ctxCalGridWalkin.Index = 8;
    883             this.ctxCalGridWalkin.Text = "Create Wal&k-In Appointment";
    884             this.ctxCalGridWalkin.Click += new System.EventHandler(this.ctxCalGridWalkin_Click);
    885             //
    886             // panelBottom
    887             //
    888             this.panelBottom.Controls.Add(this.statusBar1);
    889             this.panelBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
    890             this.panelBottom.Location = new System.Drawing.Point(136, 398);
    891             this.panelBottom.Name = "panelBottom";
    892             this.panelBottom.Size = new System.Drawing.Size(668, 24);
    893             this.panelBottom.TabIndex = 8;
    894             //
    895             // statusBar1
    896             //
    897             this.statusBar1.Dock = System.Windows.Forms.DockStyle.Fill;
    898             this.statusBar1.Location = new System.Drawing.Point(0, 0);
    899             this.statusBar1.Name = "statusBar1";
    900             this.statusBar1.Size = new System.Drawing.Size(668, 24);
    901             this.statusBar1.SizingGrip = false;
    902             this.statusBar1.TabIndex = 0;
    903             //
    904             // splitter1
    905             //
    906             this.splitter1.Location = new System.Drawing.Point(128, 24);
    907             this.splitter1.Name = "splitter1";
    908             this.splitter1.Size = new System.Drawing.Size(8, 398);
    909             this.splitter1.TabIndex = 9;
    910             this.splitter1.TabStop = false;
    911             //
    912             // splitter2
    913             //
    914             this.splitter2.Dock = System.Windows.Forms.DockStyle.Right;
    915             this.splitter2.Location = new System.Drawing.Point(804, 24);
    916             this.splitter2.Name = "splitter2";
    917             this.splitter2.Size = new System.Drawing.Size(3, 398);
    918             this.splitter2.TabIndex = 10;
    919             this.splitter2.TabStop = false;
     939            // ctxCalGridReprintRoutingSlip
     940            //
     941            this.ctxCalGridReprintRoutingSlip.Index = 10;
     942            this.ctxCalGridReprintRoutingSlip.Text = "&Reprint Routing Slip";
     943            this.ctxCalGridReprintRoutingSlip.Click += new System.EventHandler(this.ctxCalGridReprintRoutingSlip_Click);
    920944            //
    921945            // CGView
    922946            //
    923947            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
    924             this.ClientSize = new System.Drawing.Size(935, 422);
     948            this.ClientSize = new System.Drawing.Size(935, 369);
    925949            this.Controls.Add(this.panelCenter);
    926950            this.Controls.Add(this.panelBottom);
     
    12301254                        ctxCalGridNoShowUndo.Enabled = bEditAppointments;
    12311255                        ctxCalGridWalkin.Enabled = ctxCalGridAdd.Enabled;
    1232                 }
     1256            //smh new code
     1257            ctxCalGridReprintRoutingSlip.Enabled = ctxCalGridEdit.Enabled;
     1258                    //end new code
     1259        }
    12331260
    12341261                private void ctxCalGridAdd_Click(object sender, System.EventArgs e)
     
    12671294                        AppointmentNoShow(false);
    12681295                }
     1296
     1297        //new code smh
     1298        private void ctxCalGridReprintRoutingSlip_Click(object sender, EventArgs e)
     1299        {
     1300            printRoutingSlip.Print();
     1301        }
     1302        //end new code
    12691303
    12701304                #endregion ctxCalGridMenu Handlers
     
    20032037                         dlgCheckin.PCCOutGuide
    20042038                                        );
     2039                //smh new code
     2040                if (dlgCheckin.PrintRouteSlip == "true") //TODO: strange that we use a string for a boolean value??
     2041                    this.printRoutingSlip.Print();
     2042                // end new code
     2043
    20052044                                this.calendarGrid1.Invalidate();
    20062045                        }
     
    30573096        }
    30583097
     3098        private void printRoutingSlip_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
     3099        {
     3100            int nApptID = this.calendarGrid1.SelectedAppointment;
     3101            CGAppointment a = (CGAppointment)this.Appointments.AppointmentTable[nApptID];
     3102            ClinicalScheduling.Printing.PrintRoutingSlip(a, "Routing Slip", e);
     3103        }
     3104
     3105
    30593106        #endregion events
     3107
     3108
    30603109
    30613110
Note: See TracChangeset for help on using the changeset viewer.