Changeset 843 for Scheduling
- Timestamp:
- Jul 8, 2010, 8:46:18 AM (14 years ago)
- Location:
- Scheduling/trunk/cs/bsdx0200GUISourceCode
- Files:
-
- 2 added
- 3 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
Scheduling/trunk/cs/bsdx0200GUISourceCode/CGDocumentManager.cs
r824 r843 34 34 private string m_Encoding=""; 35 35 36 //Data Access Layer 37 private DAL _dal = null; 38 36 39 //M Connection member variables 37 40 private DataSet m_dsGlobal = null; … … 177 180 } 178 181 182 public DAL DAL 183 { 184 get { return this._dal; } 185 } 186 179 187 180 188 #endregion … … 206 214 private void InitializeComponent() 207 215 { 208 //209 // CGDocumentManager210 //211 this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);212 this.ClientSize = new System.Drawing.Size(292, 266);213 this.Name = "CGDocumentManager";214 215 216 } 216 217 … … 231 232 { 232 233 m_ConnectInfo = new BMXNetConnectInfo(m_Encoding); // Encoding is "" unless passed in command line 234 _dal = new DAL(m_ConnectInfo); // Data access layer 233 235 //m_ConnectInfo.bmxNetLib.StartLog(); //This line turns on logging of messages 234 236 CDocMgrEventDelegate = new BMXNetConnectInfo.BMXNetEventDelegate(CDocMgrEventHandler); … … 321 323 m_ds.SetStatus("Getting Version Info..."); 322 324 m_ds.Refresh(); 323 String sCmd = "BMX VERSION INFO^BSDX^"; 324 this.m_ConnectInfo.RPMSDataTable(sCmd, "VersionInfo", m_dsGlobal); 325 326 //Keep the following commented code for future use: 325 326 DataTable ver = _dal.GetVersion("BSDX"); //sCmd, "VersionInfo", m_dsGlobal); 327 ver.TableName = "VersionInfo"; 328 m_dsGlobal.Tables.Add(ver); 329 330 //Keep the following commented code for future use: 327 331 //How to extract the version numbers: 328 332 //DataTable dtVersion = m_dsGlobal.Tables["VersionInfo"]; … … 435 439 } 436 440 437 public void LoadAccessTypesTable()438 {439 string sCommandText = "SELECT * FROM BSDX_ACCESS_TYPE";440 ConnectInfo.RPMSDataTable(sCommandText, "AccessTypes", m_dsGlobal);441 Debug.Write("LoadGlobalRecordsets -- AccessTypes loaded\n");442 }443 441 444 442 public void LoadAccessGroupsTable() … … 455 453 Debug.Write("LoadGlobalRecordsets -- AccessGroupTypes loaded\n"); 456 454 } 457 458 //TODO:REMOVE THIS459 /*public void LoadClinicSetupTable()460 {461 string sCommandText = "BSDX CLINIC SETUP";462 ConnectInfo.RPMSDataTable(sCommandText, "ClinicSetupParameters", m_dsGlobal);463 Debug.Write("LoadGlobalRecordsets -- ClinicSetupParameters loaded\n");464 }*/465 455 466 456 public void LoadBSDXResourcesTable() … … 521 511 private bool LoadGlobalRecordsets() 522 512 { 523 //Schedule User Info 524 string sCommandText = "BSDX SCHEDULING USER INFO^" + m_ConnectInfo.DUZ; 525 DataTable dtUser = ConnectInfo.RPMSDataTable(sCommandText, "SchedulingUser", m_dsGlobal); 526 513 514 string sCommandText; 515 516 //Schedule User Info 517 DataTable dtUser = _dal.GetUserInfo(m_ConnectInfo.DUZ); 518 dtUser.TableName = "SchedulingUser"; 519 m_dsGlobal.Tables.Add(dtUser); 527 520 Debug.Assert(dtUser.Rows.Count == 1); 521 522 // Only one row and one column named "MANAGER". Set local var m_bSchedManager to true if Manager. 528 523 DataRow rUser = dtUser.Rows[0]; 529 524 Object oUser = rUser["MANAGER"]; … … 531 526 m_bSchedManager = (sUser == "YES")?true:false; 532 527 533 //AccessTypes 534 LoadAccessTypesTable(); 535 536 //Build Primary Key for AccessTypes table 537 DataTable dtTypes = m_dsGlobal.Tables["AccessTypes"]; 538 DataColumn dcKey = dtTypes.Columns["BMXIEN"]; 539 DataColumn[] dcKeys = new DataColumn[1]; 540 dcKeys[0] = dcKey; 541 dtTypes.PrimaryKey = dcKeys; 528 //Get Access Types 529 DataTable dtAccessTypes = _dal.GetAccessTypes(); 530 dtAccessTypes.TableName = "AccessTypes"; 531 m_dsGlobal.Tables.Add(dtAccessTypes); 542 532 543 533 //AccessGroups … … 546 536 //Build Primary Key for AccessGroup table 547 537 DataTable dtGroups = m_dsGlobal.Tables["AccessGroup"]; 548 549 538 DataColumn dcKey = dtGroups.Columns["ACCESS_GROUP"]; 539 DataColumn[] dcKeys = new DataColumn[1]; 550 540 dcKeys[0] = dcKey; 551 541 dtGroups.PrimaryKey = dcKeys; … … 1044 1034 //Retrieves a recordset from RPMS 1045 1035 string sErrorMessage = ""; 1036 DataTable dtOut; 1037 1038 #if TRACE 1039 DateTime sendTime = DateTime.Now; 1040 #endif 1046 1041 try 1047 1042 { 1048 1043 System.IntPtr pHandle = this.Handle; 1049 DataTable dtOut;1050 1044 RPMSDataTableDelegate rdtd = new RPMSDataTableDelegate(ConnectInfo.RPMSDataTable); 1051 //dtOut = (DataTable) this.Invoke(rdtd, new object[] {sSQL, sTableName}); 1052 dtOut = ConnectInfo.RPMSDataTable(sSQL, sTableName); 1053 return dtOut; 1054 } 1045 dtOut = (DataTable) this.Invoke(rdtd, new object[] {sSQL, sTableName}); 1046 } 1047 1055 1048 catch (Exception ex) 1056 1049 { … … 1058 1051 throw ex; 1059 1052 } 1053 1054 #if TRACE 1055 DateTime receiveTime = DateTime.Now; 1056 TimeSpan executionTime = receiveTime - sendTime; 1057 Debug.Write("CGDocumentManager::RPMSDataTable Execution Time: " + executionTime.Milliseconds + " ms.\n"); 1058 #endif 1059 1060 return dtOut; 1061 1060 1062 } 1061 1063 -
Scheduling/trunk/cs/bsdx0200GUISourceCode/ClinicalScheduling.csproj
r824 r843 67 67 <ConfigurationOverrideFile> 68 68 </ConfigurationOverrideFile> 69 <DefineConstants> DEBUG</DefineConstants>69 <DefineConstants>TRACE;DEBUG</DefineConstants> 70 70 <DocumentationFile>bin\Release\ClinicalScheduling.XML</DocumentationFile> 71 71 <DebugSymbols>false</DebugSymbols> … … 90 90 <ConfigurationOverrideFile> 91 91 </ConfigurationOverrideFile> 92 <DefineConstants> 93 </DefineConstants> 92 <DefineConstants>TRACE;DEBUG</DefineConstants> 94 93 <DocumentationFile>bin\Release\ClinicalScheduling.XML</DocumentationFile> 95 94 <DebugSymbols>false</DebugSymbols> … … 108 107 </PropertyGroup> 109 108 <ItemGroup> 110 <Reference Include="BMXNet21, Version=2.0.3839.7911, Culture=neutral, processorArchitecture=MSIL">111 <SpecificVersion>False</SpecificVersion>112 <HintPath>..\..\..\BMX\bmx_0200scr\BMX2\BMXNet\bin\Release\BMXNet21.dll</HintPath>113 </Reference>114 109 <Reference Include="System"> 115 110 <Name>System</Name> … … 146 141 <None Include="ClassDiagram1.cd" /> 147 142 <None Include="ClassDiagram2.cd" /> 148 <None Include="ClinicalScheduling_TemporaryKey.pfx" />149 143 <None Include="dsPatientApptDisplay2.xsc"> 150 144 <DependentUpon>dsPatientApptDisplay2.xsd</DependentUpon> … … 227 221 <SubType>Form</SubType> 228 222 </Compile> 223 <Compile Include="DAL.cs" /> 229 224 <Compile Include="DAppointPage.cs"> 230 225 <SubType>Form</SubType> … … 294 289 <DesignTime>True</DesignTime> 295 290 <DependentUpon>dsRebookAppts.xsd</DependentUpon> 291 </Compile> 292 <Compile Include="FMDateTime.cs"> 293 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 296 294 </Compile> 297 295 <Compile Include="Options.cs" /> … … 435 433 </ItemGroup> 436 434 <ItemGroup> 435 <ProjectReference Include="..\..\..\BMX\bmx_0200scr\BMX2\BMXNet\BMXNet.csproj"> 436 <Project>{DE8E4CC9-4F3A-4E32-8DFE-EE5692E8FC45}</Project> 437 <Name>BMXNet</Name> 438 </ProjectReference> 439 </ItemGroup> 440 <ItemGroup> 437 441 <Folder Include="Properties\" /> 438 442 </ItemGroup> -
Scheduling/trunk/cs/bsdx0200GUISourceCode/DManagement.cs
r627 r843 1884 1884 } 1885 1885 1886 m_DocManager.LoadAccessTypesTable(); 1887 m_DocManager.UpdateViews(); 1886 RefreshAccessTypesTables(); 1888 1887 } 1889 1888 catch (Exception ex) … … 1892 1891 } 1893 1892 } 1893 1894 private void RefreshAccessTypesTables() 1895 { 1896 m_dsGlobal.Tables["AccessTypes"].Clear(); 1897 m_dsGlobal.Tables["AccessGroupType"].Clear(); 1898 DataTable dt1 = m_DocManager.DAL.GetAccessTypes(); 1899 m_dsGlobal.Tables["AccessTypes"].Merge(dt1); 1900 m_dsGlobal.Tables.Add(dt1); 1901 //Fix Groups 1902 //m_DocManager.LoadAccessTypesTable(); 1903 m_DocManager.LoadAccessGroupTypesTable(); 1904 m_DocManager.UpdateViews(); 1905 } 1894 1906 1895 1907 private void cmdAddAT_Click(object sender, System.EventArgs e) … … 1928 1940 } 1929 1941 1930 m_DocManager.LoadAccessTypesTable();1931 m_DocManager.UpdateViews(); 1942 RefreshAccessTypesTables(); 1943 1932 1944 } 1933 1945 catch (Exception ex) … … 2187 2199 this.cmdRemoveAccessGroup.Enabled = true; 2188 2200 2189 m_dsGlobal.Tables["AccessTypes"].Clear(); 2190 m_dsGlobal.Tables["AccessGroupType"].Clear(); 2191 m_DocManager.LoadAccessTypesTable(); 2192 m_DocManager.LoadAccessGroupTypesTable(); 2193 2194 m_DocManager.UpdateViews(); 2201 RefreshAccessTypesTables(); 2202 2195 2203 } 2196 2204 catch (Exception ex)
Note:
See TracChangeset
for help on using the changeset viewer.