Changeset 1112 for Scheduling/trunk/cs/bsdx0200GUISourceCode/CGView.cs
- Timestamp:
- Mar 24, 2011, 9:26:14 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Scheduling/trunk/cs/bsdx0200GUISourceCode/CGView.cs
r1111 r1112 9 9 using System.Runtime.InteropServices; 10 10 using System.Drawing.Printing; 11 using System.Linq; 11 12 12 13 namespace IndianHealthService.ClinicalScheduling … … 1954 1955 calendarGrid1.CGToolTip.Active = true; 1955 1956 1956 if (bAlreadyCheckedIn == true) 1957 return; 1958 1959 DateTime dtCheckIn = dlgCheckin.CheckInTime; 1960 1961 //Tell appointment that it is checked in, for proper coloring; 1962 //When you refresh from the DB, it will have this property. 1963 a.CheckInTime = DateTime.Now; 1957 if (bAlreadyCheckedIn != true) 1958 { 1959 DateTime dtCheckIn = dlgCheckin.CheckInTime; 1960 1961 //Tell appointment that it is checked in, for proper coloring; 1962 //When you refresh from the DB, it will have this property. 1963 a.CheckInTime = DateTime.Now; 1964 1965 //Save to Database 1966 this.Document.CheckInAppointment(nApptID, dtCheckIn); 1967 } 1964 1968 1965 //Save to Database1966 this.Document.CheckInAppointment(nApptID, dtCheckIn);1967 1968 1969 //Get Provider (XXXXXXXX: NOT SAVED TO THE DATABASE RIGHT NOW) 1969 1970 a.Provider = dlgCheckin.Provider; … … 2103 2104 try 2104 2105 { 2105 2106 2107 2106 //Get Time and Resource from Selected Cell 2108 2107 DateTime dStart = DateTime.Today; … … 3217 3216 private void PrintRoutingSlip(CGAppointment appt) 3218 3217 { 3218 //get this appointment's order 3219 //Today's appointments 3220 var todaysAppts = (from lkappts in this.Document.Appointments.AppointmentTable.Values.Cast<CGAppointment>() 3221 where lkappts.StartTime > appt.StartTime.Date && lkappts.StartTime < appt.StartTime.AddDays(1).Date 3222 orderby lkappts.StartTime 3223 select lkappts).ToList(); 3224 3225 //Find the order of the appointment 3226 int apptOrder = todaysAppts.FindIndex(eachappt => eachappt.StartTime == appt.StartTime && eachappt.PatientID == appt.PatientID); 3227 3228 //Index is zero based, so add 1 3229 apptOrder++; 3230 3231 //Send that to the routing slip as a parameter 3219 3232 PrintDocument pd = new PrintDocument() { DocumentName = "Routing Slip for Appt " + appt.AppointmentKey }; 3220 pd.PrintPage += (object s, System.Drawing.Printing.PrintPageEventArgs e) => CGDocumentManager.Current.PrintingObject.PrintRoutingSlip(appt, "Routing Slip", e);3233 pd.PrintPage += (object s, System.Drawing.Printing.PrintPageEventArgs e) => CGDocumentManager.Current.PrintingObject.PrintRoutingSlip(appt, apptOrder, e); 3221 3234 pd.Print(); 3222 3235 }
Note:
See TracChangeset
for help on using the changeset viewer.