public OperationalDatasetCollection(IWorkspace osdbWorkspace) { if (osdbWorkspace == null) throw new System.ArgumentNullException("osdbWorkspace"); // Find the table and determine if this user can edit it ITable theTable = null; string theTableName = ""; try { util.SystemDefaults theDefaults = new util.SystemDefaults(); theTableName = OperationalDatasetCollection.TABLE_NAME; theTable = ((IFeatureWorkspace)osdbWorkspace).OpenTable(theTableName); } catch (Exception) {} if (theTable == null) throw new Exception("Could not open the QA parameters table '" + theTableName + "'"); IDataset theDataset = theTable as IDataset; this._canRead = false; this._canWrite = false; int privs = util.PermissionsAnalyzer.Analyze(theDataset); this._canWrite = (privs == util.PermissionsAnalyzer.READWRITE_PERMISSION); this._canRead = (privs == util.PermissionsAnalyzer.READONLY_PERMISSION) || this._canWrite; if (this._canRead) { this.LoadNames(theTable); OperationalDatasetCollection._lightWeight = (ITableName)theDataset.FullName; } }
public RunTestsForm(ref dao.QATestCollection tests, IMap map, TransactionManager tm, QAManager qa) { // // Required for Windows Form Designer support // InitializeComponent(); if (tests == null) throw new ArgumentNullException("tests", "Must pass collection of QA tests to RunTestsForm"); if (tests.Count == 0) throw new ArgumentException("No QA tests passed to RunTestsForm", "tests"); if (map == null) throw new ArgumentNullException("map", "Must pass the focus map to RunTestsForm"); this._tests = tests; this._tm = tm; this._qa = qa; this._map = map; this._defaults = new util.SystemDefaults(); // Throw TM stuff at the QA tests and see if it sticks if (tm.Current() != null) { object[] theArgs = new object[2] { new ISDUTLib.tm.dao.EditsDAO((IFeatureWorkspace)tm.Current().PGDBConnection, tm.transactionConfig()), tm.transactionConfig() }; for (int i = 0; i < this._tests.Count; i++) { this._tests.get_Test(i).Test.UserData = theArgs; } } }
public QATestCollection(IWorkspace osdbWorkspace, string operationalAreaName) { if (osdbWorkspace == null) throw new System.ArgumentNullException("osdbWorkspace"); // Find the QA tests table and QA params table and determine if this user can edit them ITable theTestTable = null; ITable theParamTable = null; string theTTName = ""; string thePTName = ""; try { util.SystemDefaults theDefaults = new util.SystemDefaults(); theTTName = QATestCollection.TABLE_NAME; theTestTable = ((IFeatureWorkspace)osdbWorkspace).OpenTable(theTTName); thePTName = QAParameterCollection.TABLE_NAME; theParamTable = ((IFeatureWorkspace)osdbWorkspace).OpenTable(thePTName); } catch (Exception) {} if (theTestTable == null) throw new Exception("Could not open the QA parameters table '" + theTTName + "'"); if (theParamTable == null) throw new Exception("Could not open the QA parameters table '" + thePTName + "'"); IDataset theQaTestDS = theTestTable as IDataset; IDataset theQaParamDS = theParamTable as IDataset; bool bCanReadTests = true; bool bCanReadParams = true; bool bCanWriteTests = true; bool bCanWriteParams = true; // no longer concerned about permissions. These are on an open PGDB format /*int privs = util.PermissionsAnalyzer.Analyze(theQaTestDS); bCanWriteTests = (privs == util.PermissionsAnalyzer.READWRITE_PERMISSION); bCanReadTests = (privs == util.PermissionsAnalyzer.READONLY_PERMISSION) || bCanWriteTests; privs = util.PermissionsAnalyzer.Analyze(theQaParamDS); bCanWriteParams = (privs == util.PermissionsAnalyzer.READWRITE_PERMISSION); bCanReadParams = (privs == util.PermissionsAnalyzer.READONLY_PERMISSION) || bCanWriteParams; */ if (bCanReadTests && bCanReadParams) { this._canRead = true; this._canWrite = bCanWriteTests && bCanWriteParams; QAParameterCollection._lightWeight = (ITableName)theQaParamDS.FullName; QAParameterCollection._canRead = bCanReadParams; QAParameterCollection._canWrite = bCanWriteParams; this.LoadTests(theTestTable, theParamTable); QATestCollection._lightWeight = (ITableName)theQaTestDS.FullName; } }
public OsdbMapper(tm.TransactionManager tm) { this._tm = tm; this._config = this._tm.transactionConfig(); this._defaults = new util.SystemDefaults(); }