Changeset 788 for Scheduling/trunk/cs/bsdx0200GUISourceCode
- Timestamp:
- Jun 4, 2010, 10:19:48 PM (15 years ago)
- Location:
- Scheduling/trunk/cs/bsdx0200GUISourceCode
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
Scheduling/trunk/cs/bsdx0200GUISourceCode/AssemblyInfo.cs
r620 r788 10 10 [assembly: AssemblyDescription("Windows Scheduling Application")] 11 11 [assembly: AssemblyConfiguration("")] 12 [assembly: AssemblyCompany(" Indian Health Service")]12 [assembly: AssemblyCompany("WorldVistA")] 13 13 [assembly: AssemblyProduct("")] 14 14 [assembly: AssemblyCopyright("")] … … 27 27 // by using the '*' as shown below: 28 28 29 [assembly: AssemblyVersion("2. 1.*")]29 [assembly: AssemblyVersion("2.2.*")] 30 30 31 31 // … … 57 57 [assembly: AssemblyKeyFile("")] 58 58 [assembly: AssemblyKeyName("")] 59 [assembly: AssemblyFileVersionAttribute("2. 1.0.0")]59 [assembly: AssemblyFileVersionAttribute("2.2.0.0")] -
Scheduling/trunk/cs/bsdx0200GUISourceCode/CGDocumentManager.cs
r772 r788 3 3 using System.Collections; 4 4 using System.Data; 5 using System.Text;6 5 using System.Diagnostics; 7 using System.Net;8 using System.Net.Sockets;9 using System.Threading;10 using System.IO;11 6 using IndianHealthService.BMXNet; 12 using System.Configuration;13 7 using Mono.Options; 8 using System.Runtime.InteropServices; 14 9 15 10 namespace IndianHealthService.ClinicalScheduling … … 259 254 && m_VerifyCode != String.Empty) 260 255 m_ConnectInfo.LoadConnectInfo(m_Server, m_Port, m_AccessCode, m_VerifyCode); 261 262 256 else if (m_Server != String.Empty && m_Port != 0) 263 m_ConnectInfo.LoadConnectInfo(m_Server, m_Port); 264 257 m_ConnectInfo.LoadConnectInfo(m_Server, m_Port, "", ""); 265 258 else 266 259 m_ConnectInfo.LoadConnectInfo(); 267 260 } 268 261 bRetry = false; … … 347 340 } 348 341 349 [STAThread()] static void Main(string[] args) 350 { 342 //To write to the console 343 [DllImport("kernel32.dll")] 344 static extern bool AttachConsole(int dwProcessId); 345 private const int ATTACH_PARENT_PROCESS = -1; 346 347 [STAThread()] 348 static void Main(string[] args) 349 { 350 #if DEBUG 351 // Print console messages to console if launched from console 352 AttachConsole(ATTACH_PARENT_PROCESS); 353 #endif 351 354 try 352 { 355 { 353 356 //Store the current manager 354 357 _current = new CGDocumentManager(); 355 358 359 //Get command line options; store in private variables 356 360 var opset = new OptionSet () { 357 361 { "s=", s => _current.m_Server = s }, -
Scheduling/trunk/cs/bsdx0200GUISourceCode/CGView.cs
r772 r788 83 83 private System.Windows.Forms.MenuItem menuItem6; 84 84 private System.Windows.Forms.MenuItem menuItem7; 85 private System.Windows.Forms.MenuItem mnuPrint ClinicLetters;85 private System.Windows.Forms.MenuItem mnuPrintReminderLetters; 86 86 private System.Windows.Forms.MenuItem mnuPrintPatientLetter; 87 87 private System.Windows.Forms.MenuItem mnuPrintClinicSchedules; … … 213 213 this.menuItem6 = new System.Windows.Forms.MenuItem(); 214 214 this.mnuPrintClinicSchedules = new System.Windows.Forms.MenuItem(); 215 this.mnuPrint ClinicLetters = new System.Windows.Forms.MenuItem();215 this.mnuPrintReminderLetters = new System.Windows.Forms.MenuItem(); 216 216 this.mnuPrintRebookLetters = new System.Windows.Forms.MenuItem(); 217 217 this.mnuPrintCancellationLetters = new System.Windows.Forms.MenuItem(); … … 311 311 this.menuItem6, 312 312 this.mnuPrintClinicSchedules, 313 this.mnuPrint ClinicLetters,313 this.mnuPrintReminderLetters, 314 314 this.mnuPrintRebookLetters, 315 315 this.mnuPrintCancellationLetters, … … 365 365 // 366 366 this.mnuSchedulingManagment.Index = 7; 367 this.mnuSchedulingManagment.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftM; 367 368 this.mnuSchedulingManagment.Text = "Scheduling &Management"; 368 369 this.mnuSchedulingManagment.Click += new System.EventHandler(this.mnuSchedulingManagment_Click); … … 380 381 this.mnuPrintClinicSchedules.Click += new System.EventHandler(this.mnuPrintClinicSchedules_Click); 381 382 // 382 // mnuPrintClinicLetters 383 // 384 this.mnuPrintClinicLetters.Index = 10; 385 this.mnuPrintClinicLetters.Text = "Print Rem&inder Letters"; 386 this.mnuPrintClinicLetters.Click += new System.EventHandler(this.mnuPrintClinicLetters_Click); 383 // mnuPrintReminderLetters 384 // 385 this.mnuPrintReminderLetters.Index = 10; 386 this.mnuPrintReminderLetters.Shortcut = System.Windows.Forms.Shortcut.CtrlR; 387 this.mnuPrintReminderLetters.Text = "Print Rem&inder Letters"; 388 this.mnuPrintReminderLetters.Click += new System.EventHandler(this.mnuPrintReminderLetters_Click); 387 389 // 388 390 // mnuPrintRebookLetters … … 395 397 // 396 398 this.mnuPrintCancellationLetters.Index = 12; 399 this.mnuPrintCancellationLetters.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftC; 397 400 this.mnuPrintCancellationLetters.Text = "Print C&ancellation Letters"; 398 401 this.mnuPrintCancellationLetters.Click += new System.EventHandler(this.mnuPrintCancellationLetters_Click); … … 1787 1790 sClinicList = sClinicList + sRes + "|"; 1788 1791 } 1789 string sSql = "BSDX REBOOK LIST^" + sApptIDList; 1790 DataTable dtLetters = m_DocManager.RPMSDataTable(sSql, "PatientAppts"); 1791 DPatientLetter dpl = new DPatientLetter(); 1792 1793 dpl.InitializeFormRebookLetters(this.DocManager, sClinicList, dtLetters); 1792 DPatientLetter dpl = new DPatientLetter(); 1793 dpl.InitializeFormRebookLetters(this.DocManager, sClinicList, sApptIDList); 1794 1794 dpl.ShowDialog(this); 1795 1795 } … … 2915 2915 } 2916 2916 2917 private void mnuPrint ClinicLetters_Click(object sender, System.EventArgs e)2917 private void mnuPrintReminderLetters_Click(object sender, System.EventArgs e) 2918 2918 { 2919 2919 try … … 2931 2931 2932 2932 DPatientLetter dpl = new DPatientLetter(); 2933 dpl.InitializeForm ClinicLetters(this.DocManager, sClinics, dtBegin, dtEnd);2933 dpl.InitializeFormPatientReminderLetters(this.DocManager, sClinics, dtBegin, dtEnd); 2934 2934 dpl.ShowDialog(this); 2935 2935 … … 2951 2951 return; 2952 2952 2953 //get the resource names and call the letter printer 2954 2955 string sClinics = ds.SelectedClinics; 2956 DateTime dtBegin = ds.BeginDate; 2957 DateTime dtEnd = ds.EndDate; 2958 string sBegin = dtBegin.ToString("M/d/yyyy@HH:mm"); 2959 string sEnd = dtEnd.ToString("M/d/yyyy@HH:mm"); 2960 2953 //Call the letter printer 2961 2954 DPatientLetter dpl = new DPatientLetter(); 2962 2963 //Call RPC to get list of appt ids that have been rebooked for these clinics on these dates 2964 string sSql = "BSDX REBOOK CLINIC LIST^" + sClinics + "^" + sBegin + "^" + sEnd; 2965 DataTable dtLetters = DocManager.RPMSDataTable(sSql, "PatientAppts"); 2966 2967 dpl.InitializeFormRebookLetters(this.DocManager, sClinics, dtLetters); 2955 dpl.InitializeFormRebookLetters(this.DocManager, ds.SelectedClinics, ds.BeginDate, ds.EndDate); 2968 2956 dpl.ShowDialog(this); 2969 2957 … … 3060 3048 DateTime dtBegin = ds.BeginDate; 3061 3049 DateTime dtEnd = ds.EndDate; 3062 string sBegin = dtBegin.ToString("M/d/yyyy@HH:mm");3063 string sEnd = dtEnd.ToString("M/d/yyyy@HH:mm");3064 3050 3065 3051 DPatientLetter dpl = new DPatientLetter(); 3066 3052 3067 //Call RPC to get list of appt ids that have been cancelled for these clinics on these dates 3068 string sSql = "BSDX CANCEL CLINIC LIST^" + sClinics + "^" + sBegin + "^" + sEnd; 3069 DataTable dtLetters = DocManager.RPMSDataTable(sSql, "PatientAppts"); 3070 3071 dpl.InitializeFormCancellationLetters(this.DocManager, sClinics, dtLetters); 3053 dpl.InitializeFormCancellationLetters(this.DocManager, sClinics, dtBegin, dtEnd); 3072 3054 dpl.ShowDialog(this); 3073 3074 3055 } 3075 3056 catch(Exception ex) -
Scheduling/trunk/cs/bsdx0200GUISourceCode/ClinicalScheduling.csproj
r772 r788 43 43 <SignManifests>false</SignManifests> 44 44 <TargetZone>LocalIntranet</TargetZone> 45 <ApplicationManifest>Properties\app.manifest</ApplicationManifest>46 45 <PublishUrl>publish\</PublishUrl> 47 46 <Install>true</Install> … … 59 58 <PublishWizardCompleted>true</PublishWizardCompleted> 60 59 <BootstrapperEnabled>true</BootstrapperEnabled> 60 <NoWin32Manifest>true</NoWin32Manifest> 61 61 </PropertyGroup> 62 62 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> … … 81 81 <DebugType>full</DebugType> 82 82 <ErrorReport>prompt</ErrorReport> 83 <UseVSHostingProcess>false</UseVSHostingProcess> 83 84 </PropertyGroup> 84 85 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> … … 104 105 <DebugType>none</DebugType> 105 106 <ErrorReport>prompt</ErrorReport> 107 <UseVSHostingProcess>false</UseVSHostingProcess> 106 108 </PropertyGroup> 107 109 <ItemGroup> -
Scheduling/trunk/cs/bsdx0200GUISourceCode/ClinicalScheduling.csproj.user
r772 r788 36 36 </RemoteDebugMachine> 37 37 <StartAction>Project</StartAction> 38 <StartArguments> 39 </StartArguments> 38 <StartArguments>/s=192.168.254.129 /p=9260 /a=shabiel12 /v=catdog.44</StartArguments> 40 39 <StartPage> 41 40 </StartPage> … … 56 55 </RemoteDebugMachine> 57 56 <StartAction>Project</StartAction> 58 <StartArguments> 59 </StartArguments> 57 <StartArguments>/s=192.168.254.129 /p=9260 /a=shabiel12 /v=catdog.44</StartArguments> 60 58 <StartPage> 61 59 </StartPage> -
Scheduling/trunk/cs/bsdx0200GUISourceCode/DPatientLetter.cs
r772 r788 16 16 /// </summary> 17 17 private System.ComponentModel.Container components = null; 18 private System.Drawing.Printing.PrintDocument printDocument1; 18 private System.Drawing.Printing.PrintDocument printAppts; 19 private System.Drawing.Printing.PrintDocument printReminderLetters; 19 20 20 21 #region Fields 21 22 DateTime _dtBegin, _dtEnd; //global fields to use in passing to printing method 23 24 //stuff to track what got printed and where we are -- very ugly, I know 25 //but I don't know if there is a better way to do it. 22 26 int _currentResourcePrinting = 0; 23 27 int _currentApptPrinting = 0; 24 dsPatientApptDisplay2 _ds; 28 int _pageNumber = 0; 29 30 //dataset to load the results of queries into and set to print routines 31 dsPatientApptDisplay2 _dsApptDisplay; 32 private PrintDocument printCancelLetters; 33 dsRebookAppts _dsRebookAppts; 25 34 #endregion Fields 26 35 27 public void InitializeFormClinicSchedule(CGDocumentManager docManager, 36 /// <summary> 37 /// Print Clinic Schedules 38 /// </summary> 39 /// <param name="docManager">This docManger</param> 40 /// <param name="sClinicList">Clinics for which to print</param> 41 /// <param name="dtBegin">Beginning Date</param> 42 /// <param name="dtEnd">End Date</param> 43 public void InitializeFormClinicSchedule(CGDocumentManager docManager, 28 44 string sClinicList, 29 45 DateTime dtBegin, … … 45 61 string sSql2 = "BSDX RESOURCE LETTERS^" + sClinicList; 46 62 47 _ds = new dsPatientApptDisplay2(); 48 _ds.BSDXResource.Merge(docManager.RPMSDataTable(sSql2, "Resources")); 49 _ds.PatientAppts.Merge(docManager.RPMSDataTable(sSql, "PatientAppts")); 63 _dsApptDisplay = new dsPatientApptDisplay2(); 64 _dsApptDisplay.BSDXResource.Merge(docManager.RPMSDataTable(sSql2, "Resources")); 65 _dsApptDisplay.PatientAppts.Merge(docManager.RPMSDataTable(sSql, "PatientAppts")); 66 67 this.PrintPreviewControl.Document = printAppts; 50 68 } 51 69 catch (Exception ex) … … 57 75 public void InitializeFormRebookLetters(CGDocumentManager docManager, 58 76 string sClinicList, 59 DataTable dtLetters) 77 DateTime dtBegin, 78 DateTime dtEnd) 60 79 { 61 80 try … … 66 85 } 67 86 68 System.Data.DataSet ds = new System.Data.DataSet(); 69 ds.Tables.Add(dtLetters.Copy()); 87 string sBegin = dtBegin.ToString("M/d/yyyy@HH:mm"); 88 string sEnd = dtEnd.ToString("M/d/yyyy@HH:mm"); 89 90 //Call RPC to get list of appt ids that have been rebooked for these clinics on these dates 91 string sSql1 = "BSDX REBOOK CLINIC LIST^" + sClinicList + "^" + sBegin + "^" + sEnd; 92 DataTable dtLetters = docManager.RPMSDataTable(sSql1, "PatientAppts"); 70 93 71 string sSql = "BSDX RESOURCE LETTERS^" + sClinicList; 72 DataTable dt = docManager.RPMSDataTable(sSql, "Resources"); 73 ds.Tables.Add(dt.Copy()); 74 } 94 string sSql2 = "BSDX RESOURCE LETTERS^" + sClinicList; 95 DataTable dt = docManager.RPMSDataTable(sSql2, "Resources"); 96 } 75 97 catch (Exception ex) 76 98 { … … 78 100 } 79 101 } 80 102 public void InitializeFormRebookLetters(CGDocumentManager docManager, 103 string sClinicList, 104 string sApptIDList) 105 { 106 try 107 { 108 if (sClinicList == "") 109 { 110 throw new Exception("At least one clinic must be selected."); 111 } 112 113 string sSql = "BSDX REBOOK LIST^" + sApptIDList; 114 DataTable dtLetters = docManager.RPMSDataTable(sSql, "PatientAppts"); 115 116 string sSql2 = "BSDX RESOURCE LETTERS^" + sClinicList; 117 DataTable dt = docManager.RPMSDataTable(sSql2, "Resources"); 118 119 } 120 catch (Exception ex) 121 { 122 throw ex; 123 } 124 } 125 126 /// <summary> 127 /// Print Cancellation letters to mail to patients 128 /// </summary> 129 /// <param name="docManager">This Docmanager</param> 130 /// <param name="sClinicList">| delemited clinic list (IEN's)</param> 131 /// <param name="dtBegin">Beginning Date</param> 132 /// <param name="dtEnd">Ending Date</param> 81 133 public void InitializeFormCancellationLetters(CGDocumentManager docManager, 82 134 string sClinicList, 83 DataTable dtLetters) 84 { 135 DateTime dtBegin, 136 DateTime dtEnd) 137 { 85 138 try 86 139 { … … 90 143 } 91 144 92 System.Data.DataSet ds = new System.Data.DataSet(); 93 ds.Tables.Add(dtLetters.Copy()); 94 95 string sSql = "BSDX RESOURCE LETTERS^" + sClinicList; 96 DataTable dt = docManager.RPMSDataTable(sSql, "Resources"); 97 ds.Tables.Add(dt.Copy()); 98 145 string sBegin = dtBegin.ToString("M/d/yyyy@HH:mm"); 146 string sEnd = dtEnd.ToString("M/d/yyyy@HH:mm"); 147 148 //Call RPC to get list of appt ids that have been cancelled for these clinics on these dates 149 string sSql1 = "BSDX CANCEL CLINIC LIST^" + sClinicList + "^" + sBegin + "^" + sEnd; 150 string sSql2 = "BSDX RESOURCE LETTERS^" + sClinicList; 151 152 _dsRebookAppts = new dsRebookAppts(); 153 _dsRebookAppts.PatientAppts.Merge(docManager.RPMSDataTable(sSql1, "PatientAppts")); 154 _dsRebookAppts.BSDXResource.Merge(docManager.RPMSDataTable(sSql2, "Resources")); 155 156 PrintPreviewControl.Document = printCancelLetters; 157 99 158 } 100 159 catch (Exception ex) … … 103 162 } 104 163 } 105 106 public void InitializeFormClinicLetters(CGDocumentManager docManager, 164 /// <summary> 165 /// Print Reminder Letters to give or mail to patients 166 /// </summary> 167 /// <param name="docManager">This docManger</param> 168 /// <param name="sClinicList">Clinics for which to print</param> 169 /// <param name="dtBegin">Beginning Date</param> 170 /// <param name="dtEnd">End Date</param> 171 public void InitializeFormPatientReminderLetters(CGDocumentManager docManager, 107 172 string sClinicList, 108 173 DateTime dtBegin, … … 115 180 throw new Exception("At least one clinic must be selected."); 116 181 } 182 183 _dtBegin = dtBegin; 184 _dtEnd = dtEnd; 185 string sBegin = dtBegin.ToShortDateString(); 186 string sEnd = dtEnd.ToShortDateString(); 187 this.Text = "Clinic Schedules"; 188 189 string sSql = "BSDX CLINIC LETTERS^" + sClinicList + "^" + sBegin + "^" + sEnd; 190 string sSql2 = "BSDX RESOURCE LETTERS^" + sClinicList; 191 192 _dsApptDisplay = new dsPatientApptDisplay2(); 193 _dsApptDisplay.BSDXResource.Merge(docManager.RPMSDataTable(sSql2, "Resources")); 194 _dsApptDisplay.PatientAppts.Merge(docManager.RPMSDataTable(sSql, "PatientAppts")); 195 196 this.PrintPreviewControl.Document = printReminderLetters; 117 197 118 string sBegin = dtBegin.ToShortDateString();119 string sEnd = dtEnd.ToShortDateString();120 121 string sSql = "BSDX CLINIC LETTERS^" + sClinicList + "^" + sBegin + "^" + sEnd;122 123 System.Data.DataSet ds = new System.Data.DataSet();124 DataTable dtAppt = docManager.RPMSDataTable(sSql, "PatientAppts");125 ds.Tables.Add(dtAppt.Copy());126 127 sSql = "BSDX RESOURCE LETTERS^" + sClinicList;128 DataTable dt = docManager.RPMSDataTable(sSql, "Resources");129 ds.Tables.Add(dt.Copy());130 131 198 } 132 199 catch (Exception ex) … … 137 204 138 205 139 public DPatientLetter() 206 public DPatientLetter() : base() 140 207 { 141 208 // … … 171 238 private void InitializeComponent() 172 239 { 173 this.printDocument1 = new System.Drawing.Printing.PrintDocument(); 240 this.printAppts = new System.Drawing.Printing.PrintDocument(); 241 this.printReminderLetters = new System.Drawing.Printing.PrintDocument(); 242 this.printCancelLetters = new System.Drawing.Printing.PrintDocument(); 174 243 this.SuspendLayout(); 175 244 // 176 // printDocument1 177 // 178 this.printDocument1.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printDocument1_PrintPage); 245 // printAppts 246 // 247 this.printAppts.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printAppts_PrintPage); 248 // 249 // printReminderLetters 250 // 251 this.printReminderLetters.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printReminderLetters_PrintPage); 252 // 253 // printCancelLetters 254 // 255 this.printCancelLetters.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printCancelLetters_PrintPage); 179 256 // 180 257 // DPatientLetter … … 182 259 this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); 183 260 this.ClientSize = new System.Drawing.Size(648, 398); 184 this.Document = this.printDocument1;185 261 this.Name = "DPatientLetter"; 186 262 this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; … … 191 267 #endregion 192 268 193 private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) 194 { 269 private void printAppts_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) 270 { 271 //Each time we enter here, we start off with a new page number - we start off with zero 272 _pageNumber++; //becomes one first time through 273 195 274 // _currentResourcePrinting starts with zero. There will be at least this one. 196 ClinicalScheduling.Printing.PrintAppointments(_ds , e, _dtBegin, _dtEnd,197 _currentResourcePrinting, ref _currentApptPrinting );275 ClinicalScheduling.Printing.PrintAppointments(_dsApptDisplay, e, _dtBegin, _dtEnd, 276 _currentResourcePrinting, ref _currentApptPrinting, _pageNumber); 198 277 199 278 //If the printing routine says it needs more pages to print the appointments, … … 203 282 // if there are more resouces to print, increment. Setting HasMorePages to true 204 283 // calls this routine again, so printing will happen with the incremented _currentResourcePrinting 205 if (_currentResourcePrinting < _ds .BSDXResource.Rows.Count - 1)284 if (_currentResourcePrinting < _dsApptDisplay.BSDXResource.Rows.Count - 1) 206 285 { 207 286 _currentResourcePrinting++; 287 //reset _currentApptPrinting 288 _currentApptPrinting = 0; 208 289 e.HasMorePages = true; 290 } 291 } 292 293 private void printReminderLetters_PrintPage(object sender, PrintPageEventArgs e) 294 { 295 // no patients 296 if (_dsApptDisplay.PatientAppts.Count == 0) 297 { 298 ClinicalScheduling.Printing.PrintMessage("No Appointments found", e); 299 return; 300 } 301 // if there are patients 302 else if (_currentApptPrinting < _dsApptDisplay.PatientAppts.Count) 303 { 304 dsPatientApptDisplay2.BSDXResourceRow c = (dsPatientApptDisplay2.BSDXResourceRow) 305 _dsApptDisplay.PatientAppts[_currentApptPrinting].GetParentRow(_dsApptDisplay.Relations[0]); 306 ClinicalScheduling.Printing.PrintReminderLetter(_dsApptDisplay.PatientAppts[_currentApptPrinting], e, c.LETTER_TEXT, "Reminder Letter"); 307 _currentApptPrinting++; 308 if (_currentApptPrinting < _dsApptDisplay.PatientAppts.Count) 309 e.HasMorePages = true; 209 310 } 210 311 312 } 313 314 private void printCancelLetters_PrintPage(object sender, PrintPageEventArgs e) 315 { 316 // no patients 317 if (_dsRebookAppts.PatientAppts.Count == 0) 318 { 319 ClinicalScheduling.Printing.PrintMessage("No Appointments found", e); 320 return; 321 } 322 // if there are patients 323 else if (_currentApptPrinting < _dsRebookAppts.PatientAppts.Count) 324 { 325 dsRebookAppts.BSDXResourceRow c = (dsRebookAppts.BSDXResourceRow) 326 _dsRebookAppts.PatientAppts[_currentApptPrinting].GetParentRow(_dsRebookAppts.Relations[0]); 327 ClinicalScheduling.Printing.PrintCancelLetter(_dsRebookAppts.PatientAppts[_currentApptPrinting], e, c.CLINIC_CANCELLATION_LETTER, "Cancellation Letter"); 328 _currentApptPrinting++; 329 if (_currentApptPrinting < _dsRebookAppts.PatientAppts.Count) 330 e.HasMorePages = true; 331 } 332 211 333 } 212 334 } -
Scheduling/trunk/cs/bsdx0200GUISourceCode/DPatientLetter.resx
r772 r788 118 118 <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 119 119 </resheader> 120 <metadata name="print Document1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">120 <metadata name="printAppts.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 121 121 <value>116, 17</value> 122 122 </metadata> 123 <metadata name="printReminderLetters.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 124 <value>218, 17</value> 125 </metadata> 126 <metadata name="printCancelLetters.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 127 <value>374, 17</value> 128 </metadata> 123 129 </root> -
Scheduling/trunk/cs/bsdx0200GUISourceCode/DSelectLetterClinics.cs
r772 r788 50 50 this.AcceptButton = cmdOK; 51 51 this.CancelButton = cmdCancel; 52 this.chkSelectAll.Focus(); 52 53 } 53 54 … … 74 75 private void InitializeComponent() 75 76 { 76 this.pnlOkCancel = new System.Windows.Forms.Panel(); 77 this.cmdCancel = new System.Windows.Forms.Button(); 78 this.cmdOK = new System.Windows.Forms.Button(); 79 this.pnlDescription = new System.Windows.Forms.Panel(); 80 this.grpDescription = new System.Windows.Forms.GroupBox(); 81 this.lblDescription = new System.Windows.Forms.Label(); 82 this.lstResource = new System.Windows.Forms.CheckedListBox(); 83 this.cboResourceGroup = new System.Windows.Forms.ComboBox(); 84 this.label1 = new System.Windows.Forms.Label(); 85 this.label2 = new System.Windows.Forms.Label(); 86 this.dtBegin = new System.Windows.Forms.DateTimePicker(); 87 this.dtEnd = new System.Windows.Forms.DateTimePicker(); 88 this.lblRange = new System.Windows.Forms.Label(); 89 this.label4 = new System.Windows.Forms.Label(); 90 this.label5 = new System.Windows.Forms.Label(); 91 this.chkSelectAll = new System.Windows.Forms.CheckBox(); 92 this.pnlOkCancel.SuspendLayout(); 93 this.pnlDescription.SuspendLayout(); 94 this.grpDescription.SuspendLayout(); 95 this.SuspendLayout(); 96 // 97 // pnlOkCancel 98 // 99 this.pnlOkCancel.Controls.Add(this.cmdCancel); 100 this.pnlOkCancel.Controls.Add(this.cmdOK); 101 this.pnlOkCancel.Dock = System.Windows.Forms.DockStyle.Bottom; 102 this.pnlOkCancel.Location = new System.Drawing.Point(0, 430); 103 this.pnlOkCancel.Name = "pnlOkCancel"; 104 this.pnlOkCancel.Size = new System.Drawing.Size(512, 40); 105 this.pnlOkCancel.TabIndex = 4; 106 // 107 // cmdCancel 108 // 109 this.cmdCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; 110 this.cmdCancel.Location = new System.Drawing.Point(416, 8); 111 this.cmdCancel.Name = "cmdCancel"; 112 this.cmdCancel.Size = new System.Drawing.Size(64, 24); 113 this.cmdCancel.TabIndex = 1; 114 this.cmdCancel.Text = "Cancel"; 115 // 116 // cmdOK 117 // 118 this.cmdOK.DialogResult = System.Windows.Forms.DialogResult.OK; 119 this.cmdOK.Location = new System.Drawing.Point(336, 8); 120 this.cmdOK.Name = "cmdOK"; 121 this.cmdOK.Size = new System.Drawing.Size(64, 24); 122 this.cmdOK.TabIndex = 0; 123 this.cmdOK.Text = "OK"; 124 // 125 // pnlDescription 126 // 127 this.pnlDescription.Controls.Add(this.grpDescription); 128 this.pnlDescription.Dock = System.Windows.Forms.DockStyle.Bottom; 129 this.pnlDescription.Location = new System.Drawing.Point(0, 350); 130 this.pnlDescription.Name = "pnlDescription"; 131 this.pnlDescription.Size = new System.Drawing.Size(512, 80); 132 this.pnlDescription.TabIndex = 47; 133 // 134 // grpDescription 135 // 136 this.grpDescription.Controls.Add(this.lblDescription); 137 this.grpDescription.Dock = System.Windows.Forms.DockStyle.Fill; 138 this.grpDescription.Location = new System.Drawing.Point(0, 0); 139 this.grpDescription.Name = "grpDescription"; 140 this.grpDescription.Size = new System.Drawing.Size(512, 80); 141 this.grpDescription.TabIndex = 0; 142 this.grpDescription.TabStop = false; 143 this.grpDescription.Text = "Description"; 144 // 145 // lblDescription 146 // 147 this.lblDescription.Dock = System.Windows.Forms.DockStyle.Fill; 148 this.lblDescription.Location = new System.Drawing.Point(3, 16); 149 this.lblDescription.Name = "lblDescription"; 150 this.lblDescription.Size = new System.Drawing.Size(506, 61); 151 this.lblDescription.TabIndex = 1; 152 this.lblDescription.Text = "Use this panel to select resources and to specify the time period for patient rem" + 153 "inder letters. Check each resource (clinic) for which to print letters. Letter" + 154 "s will be printed for appointments between the beginning and ending dates, inclu" + 155 "sive."; 156 // 157 // lstResource 158 // 159 this.lstResource.HorizontalScrollbar = true; 160 this.lstResource.Location = new System.Drawing.Point(24, 96); 161 this.lstResource.MultiColumn = true; 162 this.lstResource.Name = "lstResource"; 163 this.lstResource.Size = new System.Drawing.Size(448, 124); 164 this.lstResource.TabIndex = 48; 165 // 166 // cboResourceGroup 167 // 168 this.cboResourceGroup.Location = new System.Drawing.Point(24, 40); 169 this.cboResourceGroup.Name = "cboResourceGroup"; 170 this.cboResourceGroup.Size = new System.Drawing.Size(448, 21); 171 this.cboResourceGroup.TabIndex = 49; 172 this.cboResourceGroup.SelectedIndexChanged += new System.EventHandler(this.cboResourceGroup_SelectedIndexChanged); 173 // 174 // label1 175 // 176 this.label1.Location = new System.Drawing.Point(24, 16); 177 this.label1.Name = "label1"; 178 this.label1.Size = new System.Drawing.Size(208, 16); 179 this.label1.TabIndex = 50; 180 this.label1.Text = "Resource Group:"; 181 // 182 // label2 183 // 184 this.label2.Location = new System.Drawing.Point(24, 72); 185 this.label2.Name = "label2"; 186 this.label2.Size = new System.Drawing.Size(72, 16); 187 this.label2.TabIndex = 51; 188 this.label2.Text = "Resource:"; 189 // 190 // dtBegin 191 // 192 this.dtBegin.Location = new System.Drawing.Point(24, 312); 193 this.dtBegin.Name = "dtBegin"; 194 this.dtBegin.TabIndex = 52; 195 // 196 // dtEnd 197 // 198 this.dtEnd.Location = new System.Drawing.Point(280, 312); 199 this.dtEnd.Name = "dtEnd"; 200 this.dtEnd.Size = new System.Drawing.Size(192, 20); 201 this.dtEnd.TabIndex = 52; 202 // 203 // lblRange 204 // 205 this.lblRange.Location = new System.Drawing.Point(24, 272); 206 this.lblRange.Name = "lblRange"; 207 this.lblRange.Size = new System.Drawing.Size(192, 16); 208 this.lblRange.TabIndex = 53; 209 this.lblRange.Text = "Date range for appointment letters:"; 210 // 211 // label4 212 // 213 this.label4.Location = new System.Drawing.Point(24, 296); 214 this.label4.Name = "label4"; 215 this.label4.Size = new System.Drawing.Size(152, 16); 216 this.label4.TabIndex = 54; 217 this.label4.Text = "Beginning Date:"; 218 // 219 // label5 220 // 221 this.label5.Location = new System.Drawing.Point(280, 296); 222 this.label5.Name = "label5"; 223 this.label5.Size = new System.Drawing.Size(152, 16); 224 this.label5.TabIndex = 54; 225 this.label5.Text = "Ending Date:"; 226 // 227 // chkSelectAll 228 // 229 this.chkSelectAll.Location = new System.Drawing.Point(32, 232); 230 this.chkSelectAll.Name = "chkSelectAll"; 231 this.chkSelectAll.Size = new System.Drawing.Size(168, 24); 232 this.chkSelectAll.TabIndex = 55; 233 this.chkSelectAll.Text = "Select All Resources"; 234 this.chkSelectAll.CheckedChanged += new System.EventHandler(this.chkSelectAll_CheckedChanged); 235 // 236 // DSelectLetterClinics 237 // 238 this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); 239 this.ClientSize = new System.Drawing.Size(512, 470); 240 this.Controls.Add(this.chkSelectAll); 241 this.Controls.Add(this.label4); 242 this.Controls.Add(this.lblRange); 243 this.Controls.Add(this.dtBegin); 244 this.Controls.Add(this.label2); 245 this.Controls.Add(this.label1); 246 this.Controls.Add(this.cboResourceGroup); 247 this.Controls.Add(this.lstResource); 248 this.Controls.Add(this.pnlDescription); 249 this.Controls.Add(this.pnlOkCancel); 250 this.Controls.Add(this.dtEnd); 251 this.Controls.Add(this.label5); 252 this.Name = "DSelectLetterClinics"; 253 this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; 254 this.Text = "Print Apppointment Letters"; 255 this.pnlOkCancel.ResumeLayout(false); 256 this.pnlDescription.ResumeLayout(false); 257 this.grpDescription.ResumeLayout(false); 258 this.ResumeLayout(false); 77 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DSelectLetterClinics)); 78 this.pnlOkCancel = new System.Windows.Forms.Panel(); 79 this.cmdCancel = new System.Windows.Forms.Button(); 80 this.cmdOK = new System.Windows.Forms.Button(); 81 this.pnlDescription = new System.Windows.Forms.Panel(); 82 this.grpDescription = new System.Windows.Forms.GroupBox(); 83 this.lblDescription = new System.Windows.Forms.Label(); 84 this.lstResource = new System.Windows.Forms.CheckedListBox(); 85 this.cboResourceGroup = new System.Windows.Forms.ComboBox(); 86 this.label1 = new System.Windows.Forms.Label(); 87 this.label2 = new System.Windows.Forms.Label(); 88 this.dtBegin = new System.Windows.Forms.DateTimePicker(); 89 this.dtEnd = new System.Windows.Forms.DateTimePicker(); 90 this.lblRange = new System.Windows.Forms.Label(); 91 this.label4 = new System.Windows.Forms.Label(); 92 this.label5 = new System.Windows.Forms.Label(); 93 this.chkSelectAll = new System.Windows.Forms.CheckBox(); 94 this.pnlOkCancel.SuspendLayout(); 95 this.pnlDescription.SuspendLayout(); 96 this.grpDescription.SuspendLayout(); 97 this.SuspendLayout(); 98 // 99 // pnlOkCancel 100 // 101 this.pnlOkCancel.Controls.Add(this.cmdCancel); 102 this.pnlOkCancel.Controls.Add(this.cmdOK); 103 this.pnlOkCancel.Dock = System.Windows.Forms.DockStyle.Bottom; 104 this.pnlOkCancel.Location = new System.Drawing.Point(0, 430); 105 this.pnlOkCancel.Name = "pnlOkCancel"; 106 this.pnlOkCancel.Size = new System.Drawing.Size(512, 40); 107 this.pnlOkCancel.TabIndex = 4; 108 // 109 // cmdCancel 110 // 111 this.cmdCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; 112 this.cmdCancel.Location = new System.Drawing.Point(416, 8); 113 this.cmdCancel.Name = "cmdCancel"; 114 this.cmdCancel.Size = new System.Drawing.Size(64, 24); 115 this.cmdCancel.TabIndex = 1; 116 this.cmdCancel.Text = "Cancel"; 117 // 118 // cmdOK 119 // 120 this.cmdOK.DialogResult = System.Windows.Forms.DialogResult.OK; 121 this.cmdOK.Location = new System.Drawing.Point(336, 8); 122 this.cmdOK.Name = "cmdOK"; 123 this.cmdOK.Size = new System.Drawing.Size(64, 24); 124 this.cmdOK.TabIndex = 0; 125 this.cmdOK.Text = "OK"; 126 // 127 // pnlDescription 128 // 129 this.pnlDescription.Controls.Add(this.grpDescription); 130 this.pnlDescription.Dock = System.Windows.Forms.DockStyle.Bottom; 131 this.pnlDescription.Location = new System.Drawing.Point(0, 350); 132 this.pnlDescription.Name = "pnlDescription"; 133 this.pnlDescription.Size = new System.Drawing.Size(512, 80); 134 this.pnlDescription.TabIndex = 47; 135 // 136 // grpDescription 137 // 138 this.grpDescription.Controls.Add(this.lblDescription); 139 this.grpDescription.Dock = System.Windows.Forms.DockStyle.Fill; 140 this.grpDescription.Location = new System.Drawing.Point(0, 0); 141 this.grpDescription.Name = "grpDescription"; 142 this.grpDescription.Size = new System.Drawing.Size(512, 80); 143 this.grpDescription.TabIndex = 0; 144 this.grpDescription.TabStop = false; 145 this.grpDescription.Text = "Description"; 146 // 147 // lblDescription 148 // 149 this.lblDescription.Dock = System.Windows.Forms.DockStyle.Fill; 150 this.lblDescription.Location = new System.Drawing.Point(3, 16); 151 this.lblDescription.Name = "lblDescription"; 152 this.lblDescription.Size = new System.Drawing.Size(506, 61); 153 this.lblDescription.TabIndex = 1; 154 this.lblDescription.Text = resources.GetString("lblDescription.Text"); 155 // 156 // lstResource 157 // 158 this.lstResource.HorizontalScrollbar = true; 159 this.lstResource.Location = new System.Drawing.Point(24, 96); 160 this.lstResource.MultiColumn = true; 161 this.lstResource.Name = "lstResource"; 162 this.lstResource.Size = new System.Drawing.Size(448, 124); 163 this.lstResource.TabIndex = 48; 164 // 165 // cboResourceGroup 166 // 167 this.cboResourceGroup.Location = new System.Drawing.Point(24, 40); 168 this.cboResourceGroup.Name = "cboResourceGroup"; 169 this.cboResourceGroup.Size = new System.Drawing.Size(448, 21); 170 this.cboResourceGroup.TabIndex = 49; 171 this.cboResourceGroup.SelectedIndexChanged += new System.EventHandler(this.cboResourceGroup_SelectedIndexChanged); 172 // 173 // label1 174 // 175 this.label1.Location = new System.Drawing.Point(24, 16); 176 this.label1.Name = "label1"; 177 this.label1.Size = new System.Drawing.Size(208, 16); 178 this.label1.TabIndex = 50; 179 this.label1.Text = "Resource Group:"; 180 // 181 // label2 182 // 183 this.label2.Location = new System.Drawing.Point(24, 72); 184 this.label2.Name = "label2"; 185 this.label2.Size = new System.Drawing.Size(72, 16); 186 this.label2.TabIndex = 51; 187 this.label2.Text = "Resource:"; 188 // 189 // dtBegin 190 // 191 this.dtBegin.Location = new System.Drawing.Point(24, 312); 192 this.dtBegin.Name = "dtBegin"; 193 this.dtBegin.Size = new System.Drawing.Size(200, 20); 194 this.dtBegin.TabIndex = 52; 195 // 196 // dtEnd 197 // 198 this.dtEnd.Location = new System.Drawing.Point(280, 312); 199 this.dtEnd.Name = "dtEnd"; 200 this.dtEnd.Size = new System.Drawing.Size(192, 20); 201 this.dtEnd.TabIndex = 52; 202 // 203 // lblRange 204 // 205 this.lblRange.Location = new System.Drawing.Point(24, 272); 206 this.lblRange.Name = "lblRange"; 207 this.lblRange.Size = new System.Drawing.Size(192, 16); 208 this.lblRange.TabIndex = 53; 209 this.lblRange.Text = "Date range for appointment letters:"; 210 // 211 // label4 212 // 213 this.label4.Location = new System.Drawing.Point(24, 296); 214 this.label4.Name = "label4"; 215 this.label4.Size = new System.Drawing.Size(152, 16); 216 this.label4.TabIndex = 54; 217 this.label4.Text = "Beginning Date:"; 218 // 219 // label5 220 // 221 this.label5.Location = new System.Drawing.Point(280, 296); 222 this.label5.Name = "label5"; 223 this.label5.Size = new System.Drawing.Size(152, 16); 224 this.label5.TabIndex = 54; 225 this.label5.Text = "Ending Date:"; 226 // 227 // chkSelectAll 228 // 229 this.chkSelectAll.Location = new System.Drawing.Point(32, 232); 230 this.chkSelectAll.Name = "chkSelectAll"; 231 this.chkSelectAll.Size = new System.Drawing.Size(168, 24); 232 this.chkSelectAll.TabIndex = 55; 233 this.chkSelectAll.Text = "Select &All Resources"; 234 this.chkSelectAll.CheckedChanged += new System.EventHandler(this.chkSelectAll_CheckedChanged); 235 // 236 // DSelectLetterClinics 237 // 238 this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); 239 this.ClientSize = new System.Drawing.Size(512, 470); 240 this.Controls.Add(this.chkSelectAll); 241 this.Controls.Add(this.label4); 242 this.Controls.Add(this.lblRange); 243 this.Controls.Add(this.dtBegin); 244 this.Controls.Add(this.label2); 245 this.Controls.Add(this.label1); 246 this.Controls.Add(this.cboResourceGroup); 247 this.Controls.Add(this.lstResource); 248 this.Controls.Add(this.pnlDescription); 249 this.Controls.Add(this.pnlOkCancel); 250 this.Controls.Add(this.dtEnd); 251 this.Controls.Add(this.label5); 252 this.Name = "DSelectLetterClinics"; 253 this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; 254 this.Text = "Print Apppointment Letters"; 255 this.pnlOkCancel.ResumeLayout(false); 256 this.pnlDescription.ResumeLayout(false); 257 this.grpDescription.ResumeLayout(false); 258 this.ResumeLayout(false); 259 259 260 260 } -
Scheduling/trunk/cs/bsdx0200GUISourceCode/DSelectLetterClinics.resx
r614 r788 4 4 Microsoft ResX Schema 5 5 6 Version 1.36 Version 2.0 7 7 8 8 The primary goals of this format is to allow a simple XML format … … 15 15 ... ado.net/XML headers & schema ... 16 16 <resheader name="resmimetype">text/microsoft-resx</resheader> 17 <resheader name="version"> 1.3</resheader>17 <resheader name="version">2.0</resheader> 18 18 <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> 19 19 <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> 20 <data name="Name1"> this is my long string</data>20 <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> 21 21 <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> 22 22 <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> 23 [base64 mime encoded serialized .NET Framework object]23 <value>[base64 mime encoded serialized .NET Framework object]</value> 24 24 </data> 25 25 <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> 26 [base64 mime encoded string representing a byte array form of the .NET Framework object] 26 <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> 27 <comment>This is a comment</comment> 27 28 </data> 28 29 … … 36 37 mimetype set. 37 38 38 The mimetype is used for serialized objects, and tells the39 The mimetype is used for serialized objects, and tells the 39 40 ResXResourceReader how to depersist the object. This is currently not 40 41 extensible. For a given mimetype the value must be set accordingly: … … 46 47 mimetype: application/x-microsoft.net.object.binary.base64 47 48 value : The object must be serialized with 48 : System. Serialization.Formatters.Binary.BinaryFormatter49 : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter 49 50 : and then encoded with base64 encoding. 50 51 … … 60 61 --> 61 62 <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> 63 <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> 62 64 <xsd:element name="root" msdata:IsDataSet="true"> 63 65 <xsd:complexType> 64 66 <xsd:choice maxOccurs="unbounded"> 67 <xsd:element name="metadata"> 68 <xsd:complexType> 69 <xsd:sequence> 70 <xsd:element name="value" type="xsd:string" minOccurs="0" /> 71 </xsd:sequence> 72 <xsd:attribute name="name" use="required" type="xsd:string" /> 73 <xsd:attribute name="type" type="xsd:string" /> 74 <xsd:attribute name="mimetype" type="xsd:string" /> 75 <xsd:attribute ref="xml:space" /> 76 </xsd:complexType> 77 </xsd:element> 78 <xsd:element name="assembly"> 79 <xsd:complexType> 80 <xsd:attribute name="alias" type="xsd:string" /> 81 <xsd:attribute name="name" type="xsd:string" /> 82 </xsd:complexType> 83 </xsd:element> 65 84 <xsd:element name="data"> 66 85 <xsd:complexType> … … 69 88 <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> 70 89 </xsd:sequence> 71 <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />90 <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> 72 91 <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> 73 92 <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> 93 <xsd:attribute ref="xml:space" /> 74 94 </xsd:complexType> 75 95 </xsd:element> … … 90 110 </resheader> 91 111 <resheader name="version"> 92 <value> 1.3</value>112 <value>2.0</value> 93 113 </resheader> 94 114 <resheader name="reader"> 95 <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version= 1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>115 <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 96 116 </resheader> 97 117 <resheader name="writer"> 98 <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version= 1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>118 <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 99 119 </resheader> 100 <data name="pnlOkCancel.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 101 <value>False</value> 102 </data> 103 <data name="pnlOkCancel.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 104 <value>True</value> 105 </data> 106 <data name="pnlOkCancel.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 107 <value>Private</value> 108 </data> 109 <data name="pnlOkCancel.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 110 <value>8, 8</value> 111 </data> 112 <data name="pnlOkCancel.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 113 <value>False</value> 114 </data> 115 <data name="pnlOkCancel.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 116 <value>Private</value> 117 </data> 118 <data name="cmdCancel.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 119 <value>False</value> 120 </data> 121 <data name="cmdCancel.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 122 <value>Private</value> 123 </data> 124 <data name="cmdCancel.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 125 <value>Private</value> 126 </data> 127 <data name="cmdOK.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 128 <value>False</value> 129 </data> 130 <data name="cmdOK.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 131 <value>Private</value> 132 </data> 133 <data name="cmdOK.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 134 <value>Private</value> 135 </data> 136 <data name="pnlDescription.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 137 <value>False</value> 138 </data> 139 <data name="pnlDescription.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 140 <value>True</value> 141 </data> 142 <data name="pnlDescription.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 143 <value>Private</value> 144 </data> 145 <data name="pnlDescription.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 146 <value>8, 8</value> 147 </data> 148 <data name="pnlDescription.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 149 <value>True</value> 150 </data> 151 <data name="pnlDescription.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 152 <value>Private</value> 153 </data> 154 <data name="grpDescription.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 155 <value>Private</value> 156 </data> 157 <data name="grpDescription.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 158 <value>8, 8</value> 159 </data> 160 <data name="grpDescription.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 161 <value>True</value> 162 </data> 163 <data name="grpDescription.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 164 <value>False</value> 165 </data> 166 <data name="grpDescription.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 167 <value>True</value> 168 </data> 169 <data name="grpDescription.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 170 <value>Private</value> 171 </data> 172 <data name="lblDescription.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 173 <value>False</value> 174 </data> 175 <data name="lblDescription.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 176 <value>Private</value> 177 </data> 178 <data name="lblDescription.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 179 <value>Private</value> 180 </data> 181 <data name="lstResource.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 182 <value>Private</value> 183 </data> 184 <data name="lstResource.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 185 <value>False</value> 186 </data> 187 <data name="lstResource.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 188 <value>Private</value> 189 </data> 190 <data name="cboResourceGroup.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 191 <value>Private</value> 192 </data> 193 <data name="cboResourceGroup.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 194 <value>False</value> 195 </data> 196 <data name="cboResourceGroup.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 197 <value>Private</value> 198 </data> 199 <data name="label1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 200 <value>False</value> 201 </data> 202 <data name="label1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 203 <value>Private</value> 204 </data> 205 <data name="label1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 206 <value>Private</value> 207 </data> 208 <data name="label2.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 209 <value>False</value> 210 </data> 211 <data name="label2.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 212 <value>Private</value> 213 </data> 214 <data name="label2.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 215 <value>Private</value> 216 </data> 217 <data name="dtBegin.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 218 <value>Private</value> 219 </data> 220 <data name="dtBegin.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 221 <value>Private</value> 222 </data> 223 <data name="dtBegin.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 224 <value>False</value> 225 </data> 226 <data name="dtEnd.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 227 <value>Private</value> 228 </data> 229 <data name="dtEnd.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 230 <value>Private</value> 231 </data> 232 <data name="dtEnd.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 233 <value>False</value> 234 </data> 235 <data name="lblRange.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 236 <value>False</value> 237 </data> 238 <data name="lblRange.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 239 <value>Private</value> 240 </data> 241 <data name="lblRange.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 242 <value>Private</value> 243 </data> 244 <data name="label4.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 245 <value>False</value> 246 </data> 247 <data name="label4.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 248 <value>Private</value> 249 </data> 250 <data name="label4.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 251 <value>Private</value> 252 </data> 253 <data name="label5.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 254 <value>False</value> 255 </data> 256 <data name="label5.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 257 <value>Private</value> 258 </data> 259 <data name="label5.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 260 <value>Private</value> 261 </data> 262 <data name="chkSelectAll.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 263 <value>False</value> 264 </data> 265 <data name="chkSelectAll.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 266 <value>Private</value> 267 </data> 268 <data name="chkSelectAll.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 269 <value>Private</value> 270 </data> 271 <data name="$this.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 272 <value>False</value> 273 </data> 274 <data name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 275 <value>(Default)</value> 276 </data> 277 <data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 278 <value>False</value> 279 </data> 280 <data name="$this.Localizable" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 281 <value>False</value> 282 </data> 283 <data name="$this.Name"> 284 <value>DSelectLetterClinics</value> 285 </data> 286 <data name="$this.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 287 <value>8, 8</value> 288 </data> 289 <data name="$this.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 290 <value>True</value> 291 </data> 292 <data name="$this.TrayHeight" type="System.Int32, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 293 <value>80</value> 294 </data> 295 <data name="$this.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 296 <value>True</value> 297 </data> 298 <data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 299 <value>Private</value> 120 <data name="lblDescription.Text" xml:space="preserve"> 121 <value>Use this panel to select resources and to specify the time period for patient reminder letters. Check each resource (clinic) for which to print letters. Letters will be printed for appointments between the beginning and ending dates, inclusive.</value> 300 122 </data> 301 123 </root> -
Scheduling/trunk/cs/bsdx0200GUISourceCode/Printing.cs
r772 r788 21 21 /// <param name="e">PrintPageEventArgs from PrintDocument Print handler</param> 22 22 /// <param name="beg">Begin Datetime to print appointments</param> 23 /// <param name="end">End Datetime to print appointments</param> 23 /// <param name="end">End Datetime to print appointments</param 24 /// <param name="resourceToPrint">The resouce to print</param> 25 /// <param name="apptPrinting">Current Appointment printing</param> 26 /// <param name="pageNumber">Current page number</param> 24 27 /// <remarks>beg and end have no effect on operation--they are there for documentation for user only</remarks> 25 28 public static void PrintAppointments(dsPatientApptDisplay2 ds, PrintPageEventArgs e, DateTime beg, DateTime end, 26 int resourceToPrint, ref int apptPrint ed)29 int resourceToPrint, ref int apptPrinting, int pageNumber) 27 30 { 28 31 Graphics g = e.Graphics; … … 40 43 sf.Alignment = StringAlignment.Center; 41 44 45 //Header 42 46 g.DrawString("Confidential Patient Information", f8, Brushes.Black, e.PageBounds, sf); 43 47 48 //Footer 49 sf.Alignment = StringAlignment.Center; 50 sf.LineAlignment = StringAlignment.Far; 51 g.DrawString("Page " + pageNumber, f8, Brushes.Black, e.PageBounds, sf); 52 44 53 //Typical manipulable print area 45 54 Rectangle printArea = e.MarginBounds; 46 55 56 //resource we want to print 47 57 dsPatientApptDisplay2.BSDXResourceRow r = ds.BSDXResource[resourceToPrint]; 48 58 59 //header 49 60 string toprint; 50 61 if (beg == end) toprint = "Appointments for " + r.RESOURCE_NAME + " on " + beg.ToLongDateString(); … … 53 64 g.DrawString(toprint, f14bold, Brushes.Black, printArea); 54 65 66 //Move print area down 67 printArea.Height -= (int)f14bold.GetHeight(); 55 68 printArea.Y += (int)f14bold.GetHeight(); 69 70 //Draw Line 56 71 g.DrawLine(new Pen(Brushes.Black, 0), printArea.X, printArea.Y, printArea.X + printArea.Width, printArea.Y); 57 printArea.Y += 5; 58 59 System.Data.DataRow[] appts = r.GetChildRows(ds.Relations[0]); //only one relation 60 61 toprint = ""; 62 StringFormat sf2 = new StringFormat(); 63 sf2.SetTabStops(50, new float[] { 100, 200, 200 }); 64 65 foreach (dsPatientApptDisplay2.PatientApptsRow a in appts) 72 73 //Move print area down 74 printArea.Y += 5; 75 printArea.Height -= 5; 76 77 System.Data.DataRow[] appts = r.GetChildRows(ds.Relations[0]); //ds has only one relation 78 79 StringFormat sf2 = new StringFormat(); //sf to hold tab stops 80 sf2.SetTabStops(50, new float[] { 100, 250, 25 }); 81 82 //appt printed starts at zero 83 while (apptPrinting < appts.Length) 66 84 { 67 toprint += a.ApptDate.ToString() + "\t" + a.Name +"(" + a.Sex + ")" + "\t" + "DOB: " + a.DOB.ToString("dd-MMM-yyyy") + "\t" + "ID: " + a.HRN; 68 toprint += "\n"; 69 toprint += "Home Phone: " + a.HOMEPHONE + "\t" + "Address: " + a.STREET + ", " + a.CITY + ", " + a.STATE + " " + a.ZIP; 70 toprint += "\n"; 71 toprint += "Note: " + a.NOTE; 72 toprint += "\n"; 73 toprint += "Appointment made by " + a.APPT_MADE_BY + " on " + a.DATE_APPT_MADE; 74 toprint += "\n\n"; 85 dsPatientApptDisplay2.PatientApptsRow a = (dsPatientApptDisplay2.PatientApptsRow)appts[apptPrinting]; 86 87 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); 89 apptPrintStr.AppendLine("P: " + a.HOMEPHONE + "\t" + "Address: " + a.STREET + ", " + a.CITY + ", " + a.STATE + " " + a.ZIP); 90 apptPrintStr.AppendLine("Note: " + a.NOTE); 91 apptPrintStr.AppendLine("Appointment made by " + a.APPT_MADE_BY + " on " + a.DATE_APPT_MADE); 92 93 int printedApptHeight = (int)g.MeasureString(apptPrintStr.ToString(), f10, printArea.Width).Height; 94 if (printedApptHeight > printArea.Height) // too much to print -- move to next page 95 // but don't increment the appointment to print since we haven't printed it yet. 96 // i.e. apptPrinting stays the same. 97 { 98 e.HasMorePages = true; 99 break; 100 } 101 102 //otherwise print it 103 g.DrawString(apptPrintStr.ToString(), f10, Brushes.Black, printArea, sf2); 104 105 //Move print area down 106 printArea.Y += printedApptHeight + 3; 107 printArea.Height -= printedApptHeight + 3; 108 109 //Draw a divider line 110 Point pt1 = new Point((int)(printArea.X + printArea.Width * 0.25), printArea.Y); 111 Point pt2 = new Point((int)(printArea.X + printArea.Width * 0.75), printArea.Y); 112 g.DrawLine(Pens.Gray, pt1, pt2); 113 114 //move down, again 115 printArea.Y += 3; 116 printArea.Height -= 3; 117 118 //go to the next appointment 119 apptPrinting++; 75 120 } 76 g.DrawString(toprint, f10, Brushes.Black, printArea, sf2); 77 } 121 } 122 123 /// <summary> 124 /// Print Letter to be given or mailed to the patient 125 /// </summary> 126 /// <param name="ptrow">Strongly typed PatientApptsRow to pass (just one ApptRow)</param> 127 /// <param name="e">You know what that is</param> 128 /// <param name="letter">Contains letter string</param> 129 /// <param name="title">Title of the letter</param> 130 public static void PrintReminderLetter(dsPatientApptDisplay2.PatientApptsRow ptRow, PrintPageEventArgs e, string letter, string title) 131 { 132 133 Rectangle printArea = e.MarginBounds; 134 Graphics g = e.Graphics; 135 StringFormat sf = new StringFormat(); 136 sf.Alignment = StringAlignment.Center; //for title 137 Font fTitle = new Font(FontFamily.GenericSerif, 24, FontStyle.Bold); //for title 138 Font fBody = new Font(FontFamily.GenericSerif, 12); 139 g.DrawString(title, fTitle, Brushes.Black, printArea, sf); //title 140 141 // move down 142 int titleHeight = (int)g.MeasureString(title, fTitle, printArea.Width).Height; 143 printArea.Y += titleHeight; 144 printArea.Height -= titleHeight; 145 146 // draw underline 147 g.DrawLine(Pens.Black, printArea.Location, new Point(printArea.Right, printArea.Y)); 148 printArea.Y += 15; 149 printArea.Height -= 15; 150 151 // write missive 152 g.DrawString(letter, fBody, Brushes.Black, printArea); 153 154 //print Address in lower left corner for windowed envolopes 155 printArea.Location = new Point(e.MarginBounds.X, (int)(e.PageBounds.Height * 0.66)); 156 printArea.Height = (int)(e.MarginBounds.Height * 0.20); 157 sf.Alignment = StringAlignment.Near; 158 sf.LineAlignment = StringAlignment.Center; 159 StringBuilder address = new StringBuilder(100); 160 address.AppendLine(ptRow.Name); 161 address.AppendLine(ptRow.STREET); 162 address.AppendLine(ptRow.CITY + ", " + ptRow.STATE + " " + ptRow.ZIP); 163 g.DrawString(address.ToString(), fBody, Brushes.Black, printArea, sf); 164 } 165 166 /// <summary> 167 /// Print Letter to be given or mailed to the patient 168 /// </summary> 169 /// <param name="ptrow">Strongly typed PatientApptsRow to pass (just one ApptRow)</param> 170 /// <param name="e">You know what that is</param> 171 /// <param name="letter">Contains letter string</param> 172 /// <param name="title">Title of the letter</param> 173 public static void PrintCancelLetter(dsRebookAppts.PatientApptsRow ptRow, PrintPageEventArgs e, string letter, string title) 174 { 175 Rectangle printArea = e.MarginBounds; 176 Graphics g = e.Graphics; 177 StringFormat sf = new StringFormat(); 178 sf.Alignment = StringAlignment.Center; //for title 179 Font fTitle = new Font(FontFamily.GenericSerif, 24, FontStyle.Bold); //for title 180 Font fBody = new Font(FontFamily.GenericSerif, 12); 181 g.DrawString(title, fTitle, Brushes.Black, printArea, sf); //title 182 183 // move down 184 int titleHeight = (int)g.MeasureString(title, fTitle, printArea.Width).Height; 185 printArea.Y += titleHeight; 186 printArea.Height -= titleHeight; 187 188 // draw underline 189 g.DrawLine(Pens.Black, printArea.Location, new Point(printArea.Right, printArea.Y)); 190 printArea.Y += 15; 191 printArea.Height -= 15; 192 193 // write missive 194 g.DrawString(letter, fBody, Brushes.Black, printArea); 195 196 //print Address in lower left corner for windowed envolopes 197 printArea.Location = new Point(e.MarginBounds.X, (int)(e.PageBounds.Height * 0.66)); 198 printArea.Height = (int)(e.MarginBounds.Height * 0.20); 199 sf.Alignment = StringAlignment.Near; 200 sf.LineAlignment = StringAlignment.Center; 201 StringBuilder address = new StringBuilder(100); 202 address.AppendLine(ptRow.Name); 203 address.AppendLine(ptRow.STREET); 204 address.AppendLine(ptRow.CITY + ", " + ptRow.STATE + " " + ptRow.ZIP); 205 g.DrawString(address.ToString(), fBody, Brushes.Black, printArea, sf); 206 } 207 208 public static void PrintMessage(string msg, PrintPageEventArgs e) 209 { 210 e.Graphics.DrawString(msg, new Font(FontFamily.GenericSerif, 14), 211 Brushes.Black, e.MarginBounds); 212 } 213 78 214 } 79 215 }
Note:
See TracChangeset
for help on using the changeset viewer.