Ignore:
Timestamp:
Aug 10, 2010, 8:00:01 AM (14 years ago)
Author:
Sam Habiel
Message:
  1. Fix bug of not showing appointments in 7 day view if arabic locale on machine.
  2. Fix printing of routing slip (add clinic and fix appointment time and HRN)
  3. Add RTL support for letters printed in Arabic Locale.
File:
1 edited

Legend:

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

    r804 r900  
    8686               
    8787                StringBuilder apptPrintStr = new StringBuilder(200);
    88                 apptPrintStr.AppendLine(a.ApptDate.ToString() + "\t" + a.Name + "(" + a.Sex + ")" + "\t" + "DOB: " + a.DOB.ToString("dd-MMM-yyyy") + "\t" + "ID: " + a.HRN);
     88                apptPrintStr.AppendLine(a.ApptDate.ToString() + "\t" + a.Name + " (" + a.Sex + ")" + "\t" + "DOB: " + a.DOB.ToShortDateString() + "\t" + "ID: " + a.HRN);
    8989                apptPrintStr.AppendLine("P: " + a.HOMEPHONE + "\t" + "Address: " + a.STREET + ", " + a.CITY + ", " + a.STATE + " " + a.ZIP);
    9090                apptPrintStr.AppendLine("Note: " + a.NOTE);
     
    158158            printArea.Height -= strHeight;
    159159
     160            //Text Direction
     161            StringFormat sf2 = new StringFormat();
     162            if (System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.IsRightToLeft)
     163                sf2.FormatFlags = StringFormatFlags.DirectionRightToLeft;
     164
    160165            // write missive
    161             g.DrawString(letter, fBody, Brushes.Black, printArea);
     166            g.DrawString(letter, fBody, Brushes.Black, printArea, sf2);
    162167
    163168            //print Address in lower left corner for windowed envolopes
     
    209214            printArea.Height -= strHeight;
    210215
     216            //Text Direction
     217            StringFormat sf2 = new StringFormat();
     218            if (System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.IsRightToLeft)
     219                sf2.FormatFlags = StringFormatFlags.DirectionRightToLeft;
     220           
    211221            // write missive
    212             g.DrawString(letter, fBody, Brushes.Black, printArea);
     222            g.DrawString(letter, fBody, Brushes.Black, printArea, sf2);
    213223
    214224            //print Address in lower left corner for windowed envolopes
     
    261271            printArea.Height -= strHeight;
    262272
     273            //Text Direction
     274            StringFormat sf2 = new StringFormat();
     275            if (System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.IsRightToLeft)
     276                sf2.FormatFlags = StringFormatFlags.DirectionRightToLeft;
     277
    263278            // write missive
    264             g.DrawString(letter, fBody, Brushes.Black, printArea);
     279            g.DrawString(letter, fBody, Brushes.Black, printArea, sf2);
    265280
    266281            //print Address in lower left corner for windowed envolopes
     
    313328            // draw underline
    314329            g.DrawLine(Pens.Black, printArea.Location, new Point(printArea.Right, printArea.Y));
     330
     331            // move down
    315332            printArea.Y += 15;
    316333            printArea.Height -= 15;
    317334
    318335            //construct what to print
    319             string toprint = "Patient: " + a.PatientName + "\t" + "ID: " + a.PatientID;
     336            string toprint = "Patient: " + a.PatientName + "\t" + "ID: " + a.HealthRecordNumber;
    320337            toprint += "\n\n";
    321             toprint += "Appointment Time: " + a.StartTime.ToLongDateString() + " " + a.StartTime.ToLongTimeString();
     338            toprint += "Clinic: " + a.Resource;
     339            toprint += "\n\n";
     340            toprint += "Appointment Time: " + a.StartTime;
    322341            toprint += "\n\n";
    323342            toprint += "Notes:\n" + a.Note;
Note: See TracChangeset for help on using the changeset viewer.