Ignore:
Timestamp:
Jul 11, 2010, 10:09:11 AM (14 years ago)
Author:
Sam Habiel
Message:

Updated Source Code for i18n.
Changes in DPatientLetter.cs
Changes in CGSchedLib.cs

File:
1 edited

Legend:

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

    r848 r850  
    88{
    99        /// <summary>
    10         /// Summary description for DPatientLetter.
     10        /// Handles Printing of letters (Reminder, Rebook, Cancellation) and a Report. Contains a Print Preview dialog.
    1111        /// </summary>
    1212        public class DPatientLetter : System.Windows.Forms.PrintPreviewDialog
     
    1818        private System.Drawing.Printing.PrintDocument printAppts;
    1919        private System.Drawing.Printing.PrintDocument printReminderLetters;
     20        private System.Drawing.Printing.PrintDocument printCancelLetters;
     21        private System.Drawing.Printing.PrintDocument printRebookLetters;
    2022
    2123                #region Fields
     
    2830        int _pageNumber = 0;
    2931       
    30         //dataset to load the results of queries into and set to print routines
     32        //typed datasets to load the results of queries into and set to print routines
    3133        dsPatientApptDisplay2 _dsApptDisplay;
    32         private PrintDocument printCancelLetters;
    33         private PrintDocument printRebookLetters;
    3434        dsRebookAppts _dsRebookAppts;
     35
    3536                #endregion Fields
     37
     38        #region Windows Form Designer generated code
     39        /// <summary>
     40        /// Required method for Designer support - do not modify
     41        /// the contents of this method with the code editor.
     42        /// </summary>
     43        private void InitializeComponent()
     44        {
     45            this.printAppts = new System.Drawing.Printing.PrintDocument();
     46            this.printReminderLetters = new System.Drawing.Printing.PrintDocument();
     47            this.printCancelLetters = new System.Drawing.Printing.PrintDocument();
     48            this.printRebookLetters = new System.Drawing.Printing.PrintDocument();
     49            this.SuspendLayout();
     50            //
     51            // printAppts
     52            //
     53            this.printAppts.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printAppts_PrintPage);
     54            //
     55            // printReminderLetters
     56            //
     57            this.printReminderLetters.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printReminderLetters_PrintPage);
     58            //
     59            // printCancelLetters
     60            //
     61            this.printCancelLetters.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printCancelLetters_PrintPage);
     62            //
     63            // printRebookLetters
     64            //
     65            this.printRebookLetters.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printRebookLetters_PrintPage);
     66            //
     67            // DPatientLetter
     68            //
     69            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     70            this.ClientSize = new System.Drawing.Size(648, 398);
     71            this.Name = "DPatientLetter";
     72            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
     73            this.Text = "Patient Letter";
     74            this.ResumeLayout(false);
     75
     76        }
     77        #endregion
     78
    3679
    3780                /// <summary>
     
    83126        /// <param name="dtBegin">Beginning Date</param>
    84127        /// <param name="dtEnd">End Date</param>
    85         /// working on moving this over...
    86128        public void InitializeFormRebookLetters(CGDocumentManager docManager,
    87129                        string sClinicList,
     
    96138                                }
    97139
    98                 string sBegin = dtBegin.ToString("M/d/yyyy@HH:mm");
    99                 string sEnd = dtEnd.ToString("M/d/yyyy@HH:mm");
    100 
    101140                //Call RPC to get list of appt ids that have been rebooked for these clinics on these dates
    102                 string sSql1 = "BSDX REBOOK CLINIC LIST^" + sClinicList + "^" + sBegin + "^" + sEnd;                           
    103                                 string sSql2 = "BSDX RESOURCE LETTERS^" + sClinicList;
     141                DataTable PatientAppts = docManager.DAL.GetRebookedAppointments(sClinicList, dtBegin, dtEnd);
     142                DataTable Resources = docManager.DAL.GetResourceLetters(sClinicList);
    104143
    105144                _dsRebookAppts = new dsRebookAppts();
    106                 _dsRebookAppts.PatientAppts.Merge(docManager.RPMSDataTable(sSql1, "PatientAppts"));
    107                 _dsRebookAppts.BSDXResource.Merge(docManager.RPMSDataTable(sSql2, "Resources"));
     145                _dsRebookAppts.PatientAppts.Merge(PatientAppts);
     146                _dsRebookAppts.BSDXResource.Merge(Resources);
    108147
    109148            }
     
    134173                }
    135174
    136                 string sSql1 = "BSDX REBOOK LIST^" + sApptIDList;
    137                 string sSql2 = "BSDX RESOURCE LETTERS^" + sClinicList;
     175                DataTable PatientAppts = docManager.DAL.GetRebookedAppointments(sApptIDList);
     176                DataTable Resources = docManager.DAL.GetResourceLetters(sClinicList);
    138177
    139178                _dsRebookAppts = new dsRebookAppts();
    140                 _dsRebookAppts.PatientAppts.Merge(docManager.RPMSDataTable(sSql1, "PatientAppts"));
    141                 _dsRebookAppts.BSDXResource.Merge(docManager.RPMSDataTable(sSql2, "Resources"));
    142 
    143 
     179                _dsRebookAppts.PatientAppts.Merge(PatientAppts);
     180                _dsRebookAppts.BSDXResource.Merge(Resources);
    144181            }
    145182            catch (Exception ex)
     
    169206                                        throw new Exception("At least one clinic must be selected.");
    170207                                }
    171 
    172                 string sBegin = dtBegin.ToString("M/d/yyyy@HH:mm");
    173                 string sEnd = dtEnd.ToString("M/d/yyyy@HH:mm");
    174 
    175                 //Call RPC to get list of appt ids that have been cancelled for these clinics on these dates
    176                 string sSql1 = "BSDX CANCEL CLINIC LIST^" + sClinicList + "^" + sBegin + "^" + sEnd;
    177                                 string sSql2 = "BSDX RESOURCE LETTERS^" + sClinicList;
    178 
     208               
     209                DataTable PatientAppts = docManager.DAL.GetCancelledAppointments(sClinicList, dtBegin, dtEnd);
     210                DataTable Resources = docManager.DAL.GetResourceLetters(sClinicList);
     211               
    179212                _dsRebookAppts = new dsRebookAppts();
    180                 _dsRebookAppts.PatientAppts.Merge(docManager.RPMSDataTable(sSql1, "PatientAppts"));
    181                 _dsRebookAppts.BSDXResource.Merge(docManager.RPMSDataTable(sSql2, "Resources"));
    182 
     213                _dsRebookAppts.PatientAppts.Merge(PatientAppts);
     214                _dsRebookAppts.BSDXResource.Merge(Resources);
     215               
    183216                PrintPreviewControl.Document = printCancelLetters;
    184217
     
    208241                                }
    209242
     243                // Global variables to use in printing routine down below
    210244                _dtBegin = dtBegin;
    211245                _dtEnd = dtEnd;
    212                 string sBegin = dtBegin.ToShortDateString();
    213                 string sEnd = dtEnd.ToShortDateString();
    214                 this.Text = "Clinic Schedules";
    215 
    216                 string sSql = "BSDX CLINIC LETTERS^" + sClinicList + "^" + sBegin + "^" + sEnd;
    217                 string sSql2 = "BSDX RESOURCE LETTERS^" + sClinicList;
    218 
     246
     247                this.Text = "Reminder Letters";
     248
     249                // Get Data
     250                DataTable PatientAppts = docManager.DAL.GetClinicSchedules(sClinicList, dtBegin, dtEnd);
     251                DataTable Resources = docManager.DAL.GetResourceLetters(sClinicList);
     252
     253                // Merge tables into typed dataset
    219254                _dsApptDisplay = new dsPatientApptDisplay2();
    220                 _dsApptDisplay.BSDXResource.Merge(docManager.RPMSDataTable(sSql2, "Resources"));
    221                 _dsApptDisplay.PatientAppts.Merge(docManager.RPMSDataTable(sSql, "PatientAppts"));
     255                _dsApptDisplay.PatientAppts.Merge(PatientAppts);
     256                _dsApptDisplay.BSDXResource.Merge(Resources);
    222257
    223258                this.PrintPreviewControl.Document = printReminderLetters;
     
    260295                }
    261296
    262                 #region Windows Form Designer generated code
    263                 /// <summary>
    264                 /// Required method for Designer support - do not modify
    265                 /// the contents of this method with the code editor.
    266                 /// </summary>
    267                 private void InitializeComponent()
    268                 {
    269             this.printAppts = new System.Drawing.Printing.PrintDocument();
    270             this.printReminderLetters = new System.Drawing.Printing.PrintDocument();
    271             this.printCancelLetters = new System.Drawing.Printing.PrintDocument();
    272             this.printRebookLetters = new System.Drawing.Printing.PrintDocument();
    273             this.SuspendLayout();
    274             //
    275             // printAppts
    276             //
    277             this.printAppts.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printAppts_PrintPage);
    278             //
    279             // printReminderLetters
    280             //
    281             this.printReminderLetters.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printReminderLetters_PrintPage);
    282             //
    283             // printCancelLetters
    284             //
    285             this.printCancelLetters.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printCancelLetters_PrintPage);
    286             //
    287             // printRebookLetters
    288             //
    289             this.printRebookLetters.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printRebookLetters_PrintPage);
    290             //
    291             // DPatientLetter
    292             //
    293             this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
    294             this.ClientSize = new System.Drawing.Size(648, 398);
    295             this.Name = "DPatientLetter";
    296             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
    297             this.Text = "Patient Letter";
    298             this.ResumeLayout(false);
    299 
    300                 }
    301                 #endregion
    302297
    303298        private void printAppts_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
Note: See TracChangeset for help on using the changeset viewer.