Changeset 1083 for Scheduling/trunk/cs/bsdx0200GUISourceCode/CGView.cs
- Timestamp:
- Jan 26, 2011, 6:01:39 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Scheduling/trunk/cs/bsdx0200GUISourceCode/CGView.cs
r1075 r1083 617 617 this.tvSchedules.Location = new System.Drawing.Point(0, 0); 618 618 this.tvSchedules.Name = "tvSchedules"; 619 this.tvSchedules.Size = new System.Drawing.Size(128, 332);619 this.tvSchedules.Size = new System.Drawing.Size(128, 290); 620 620 this.tvSchedules.Sorted = true; 621 621 this.tvSchedules.TabIndex = 1; … … 664 664 this.panelRight.Location = new System.Drawing.Point(941, 0); 665 665 this.panelRight.Name = "panelRight"; 666 this.panelRight.Size = new System.Drawing.Size(128, 332);666 this.panelRight.Size = new System.Drawing.Size(128, 290); 667 667 this.panelRight.TabIndex = 3; 668 668 this.panelRight.Visible = false; … … 762 762 this.panelCenter.Location = new System.Drawing.Point(136, 24); 763 763 this.panelCenter.Name = "panelCenter"; 764 this.panelCenter.Size = new System.Drawing.Size(802, 2 84);764 this.panelCenter.Size = new System.Drawing.Size(802, 242); 765 765 this.panelCenter.TabIndex = 7; 766 766 // … … 848 848 this.panelBottom.Controls.Add(this.statusBar1); 849 849 this.panelBottom.Dock = System.Windows.Forms.DockStyle.Bottom; 850 this.panelBottom.Location = new System.Drawing.Point(136, 308);850 this.panelBottom.Location = new System.Drawing.Point(136, 266); 851 851 this.panelBottom.Name = "panelBottom"; 852 852 this.panelBottom.Size = new System.Drawing.Size(802, 24); … … 866 866 this.splitter1.Location = new System.Drawing.Point(128, 24); 867 867 this.splitter1.Name = "splitter1"; 868 this.splitter1.Size = new System.Drawing.Size(8, 308);868 this.splitter1.Size = new System.Drawing.Size(8, 266); 869 869 this.splitter1.TabIndex = 9; 870 870 this.splitter1.TabStop = false; … … 875 875 this.splitter2.Location = new System.Drawing.Point(938, 24); 876 876 this.splitter2.Name = "splitter2"; 877 this.splitter2.Size = new System.Drawing.Size(3, 308);877 this.splitter2.Size = new System.Drawing.Size(3, 266); 878 878 this.splitter2.TabIndex = 10; 879 879 this.splitter2.TabStop = false; … … 903 903 this.calendarGrid1.Resources = ((System.Collections.ArrayList)(resources.GetObject("calendarGrid1.Resources"))); 904 904 this.calendarGrid1.SelectedAppointment = 0; 905 this.calendarGrid1.Size = new System.Drawing.Size(802, 2 84);905 this.calendarGrid1.Size = new System.Drawing.Size(802, 242); 906 906 this.calendarGrid1.StartDate = new System.DateTime(2003, 1, 27, 0, 0, 0, 0); 907 907 this.calendarGrid1.TabIndex = 0; … … 916 916 // 917 917 this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); 918 this.ClientSize = new System.Drawing.Size(1069, 332);918 this.ClientSize = new System.Drawing.Size(1069, 290); 919 919 this.Controls.Add(this.panelCenter); 920 920 this.Controls.Add(this.panelBottom); … … 1923 1923 Debug.Assert(nApptID != 0); 1924 1924 1925 CGAppointment a = (CGAppointment) this.Appointments.AppointmentTable[nApptID]; 1926 1925 //smh 1926 //CGAppointment a = (CGAppointment) this.Appointments.AppointmentTable[nApptID]; 1927 CGAppointment a = (CGAppointment)this.Document.Appointments.AppointmentTable[nApptID]; 1927 1928 try 1928 1929 { … … 1980 1981 DateTime dtCheckIn = dlgCheckin.CheckInTime; 1981 1982 1982 this.Document.CheckInAppointment(nApptID, dtCheckIn); 1983 //Save to Database 1984 this.Document.CheckInAppointment(nApptID, dtCheckIn); 1985 1986 //Tell appointment that it is checked in--smh cancel that! 1987 //a.CheckInTime = DateTime.Now; 1988 1983 1989 //smh new code 1984 1990 if (dlgCheckin.PrintRouteSlip) … … 1986 1992 // end new code 1987 1993 1994 //redraw grid (would this work???) 1988 1995 this.calendarGrid1.Invalidate(); 1989 1996 } … … 2034 2041 * 8-10-05 Added overbook prompt for walkin 2035 2042 */ 2036 this.Document.RefreshDocument(); 2043 //SMH: Takes too long to do. 2044 //this.Document.RefreshDocument(); 2037 2045 string sAccessType = ""; 2038 2046 string sAvailabilityMessage = ""; … … 2067 2075 appt.HealthRecordNumber = dPat.HealthRecordNumber; 2068 2076 2069 this.Document.RefreshDocument(); 2077 //smh: Takes too long 2078 //this.Document.RefreshDocument(); 2070 2079 2071 2080 //Call Document to add a walkin appointment … … 2074 2083 //Now check them in. 2075 2084 calendarGrid1.SelectedAppointment = nApptID; 2076 2077 2085 AppointmentCheckIn(); 2078 2086 2079 try 2080 { 2081 RaiseRPMSEvent("BSDX SCHEDULE" , m_Document.DocName); 2082 } 2083 catch (Exception ex) 2084 { 2085 Debug.Write(ex.Message); 2086 } 2087 //Show the new set of appointments by calling UpdateArrays. Fetches Document's CGAppointments 2088 this.UpdateArrays(); 2089 2090 //Get the appointments and availabilities, async, from Server. Callback updates this thread's controls. 2091 OnUpdateScheduleDelegate ousd = new OnUpdateScheduleDelegate(OnUpdateSchedule); 2092 ousd.BeginInvoke(OnUpdateScheduleCallback, null); 2093 2094 2095 } 2096 catch (Exception ex) 2097 { 2098 string msg; 2099 if (BMXNetLib.Piece(ex.Message, "~", 1) == "-10") // -10 means that BSDXAPI reported an error. 2100 msg = BMXNetLib.Piece(ex.Message, "~", 4); 2101 else 2102 msg = ex.Message; 2103 2104 MessageBox.Show("VISTA says: \r\n" + msg, "Unable to Make Walk-in Appointment"); 2105 return; 2106 } 2107 2108 try 2109 { 2110 RaiseRPMSEvent("BSDX SCHEDULE", m_Document.DocName); 2111 } 2112 catch (Exception ex) 2113 { 2114 Debug.Write(ex.Message); 2115 } 2087 2116 2088 } 2089 catch (Exception ex) 2090 { 2091 MessageBox.Show("Unable to add walk-in appointment " + ex.Message, "Clinical Scheduling"); 2092 return; 2093 2094 } 2117 2095 2118 } 2096 2119 … … 2133 2156 Debug.Assert(nDuration > 0); 2134 2157 2135 this.Document.RefreshDocument(); 2158 2159 //Sam: takes too long. Remove this call; deal with the issue of concurrent appointments another way. 2160 //this.Document.RefreshDocument(); 2136 2161 string sAccessType = ""; 2137 2162 string sAvailabilityMessage = ""; … … 2180 2205 appt.AccessTypeID = nAccessTypeID; 2181 2206 2182 //Call Document to add a new appointment 2207 //Call Document to add a new appointment. Document adds appointment to CGAppointments array. 2183 2208 this.Document.CreateAppointment(appt); 2184 this.Document.RefreshDocument(); 2185 2209 2210 //Show the new set of appointments by calling UpdateArrays. Fetches Document's CGAppointments 2211 this.UpdateArrays(); 2212 2213 //Get the appointments and availabilities, async, from Server. Callback updates this thread's controls. 2214 OnUpdateScheduleDelegate ousd = new OnUpdateScheduleDelegate(OnUpdateSchedule); 2215 ousd.BeginInvoke(OnUpdateScheduleCallback, null); 2186 2216 } 2187 2217 catch (Exception ex) 2188 { 2189 MessageBox.Show("Unable to add new appointment " + ex.Message, "Clinical Scheduling"); 2218 { 2219 string msg; 2220 if (BMXNetLib.Piece(ex.Message, "~", 1) == "-10") // -10 means that BSDXAPI reported an error. 2221 msg = BMXNetLib.Piece(ex.Message, "~", 4); 2222 else 2223 msg = ex.Message; 2224 2225 MessageBox.Show("VISTA says: \r\n" + msg, "Unable to Make Appointment"); 2190 2226 return; 2191 2192 } 2227 } 2228 2193 2229 try 2194 2230 { … … 2320 2356 Debug.Assert(this.InvokeRequired == false,"CGView.UpdateArrays InvokeRequired"); 2321 2357 // This is where you set how the grid will look 2358 2359 //Create Deep copy of Availability Array 2360 ArrayList availArrayCopy = new ArrayList(); 2361 foreach (CGAvailability av in this.m_Document.AvailabilityArray) 2362 availArrayCopy.Add(av); 2363 2322 2364 try 2323 2365 { 2324 2366 //Tell the grid about Avails, Appts, and Resources. 2325 this.calendarGrid1.AvailabilityArray = this.m_Document.AvailabilityArray;2367 this.calendarGrid1.AvailabilityArray = availArrayCopy; 2326 2368 //Appts are cloned b/c if we tie into the class directly, we shoot off errors when we manipulate it. 2327 this.calendarGrid1.Appointments = (CGAppointments)this.m_Document.Appointments.Clone(); //smh new line again2369 this.calendarGrid1.Appointments = (CGAppointments)this.m_Document.Appointments.Clone(); 2328 2370 this.calendarGrid1.Resources = this.m_Document.Resources; 2329 2371 //Redraw the calendar grid … … 3135 3177 3136 3178 3137 3179 /// <summary> 3180 /// Update Selection of date if user does not pick a date/time 3181 /// </summary> 3182 /// <param name="sender"></param> 3183 /// <param name="e"></param> 3138 3184 private void dateTimePicker1_Leave(object sender, EventArgs e) 3139 3185 { … … 3142 3188 } 3143 3189 3190 /// <summary> 3191 /// Handle Selection of Date via mouse from datetimepicker dropdown 3192 /// </summary> 3193 /// <param name="sender"></param> 3194 /// <param name="e"></param> 3144 3195 private void dateTimePicker1_CloseUp(object sender, EventArgs e) 3145 3196 { … … 3148 3199 } 3149 3200 3201 /// <summary> 3202 /// Handle Enter and Escape key on dateTimePicker 3203 /// </summary> 3204 /// <param name="sender"></param> 3205 /// <param name="e"></param> 3150 3206 private void dateTimePicker1_KeyPress(object sender, KeyPressEventArgs e) 3151 3207 {
Note:
See TracChangeset
for help on using the changeset viewer.