コード例 #1
0
ファイル: RunTestsForm.cs プロジェクト: EAWCS1/SUITT
        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;
                }
            }
        }
コード例 #2
0
ファイル: AccessDoc.cs プロジェクト: sillsdev/WorldPad
		public void UpdateValue(dao.Field aField, string strValue)
		{
			dao.Recordset rs = Document;
			rs.Edit();
			aField.Value = strValue;
			rs.Update((int)dao.UpdateTypeEnum.dbUpdateRegular, false);
		}
コード例 #3
0
ファイル: TestEditForm.cs プロジェクト: EAWCS1/SUITT
        public TestEditForm(dao.QATest test, string[] businessNames)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            // store arguments
            this._test = test;
            this._bizNames = businessNames;
        }
コード例 #4
0
ファイル: ParameterEditForm.cs プロジェクト: EAWCS1/SUITT
        public ParameterEditForm(dao.QAParameter param, string paramType, bool autoStoreChanges)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            if (param == null)
                throw new ArgumentNullException("param", "Cannot pass null parameter to ParameterEditForm");

            this._param = param;

            switch (paramType)
            {
                case BooleanParameterInfo.TYPE_WKT:
                    this._pinfo = new BooleanParameterInfo(param.Name, "", param.Value);
                    break;
                case IntegerParameterInfo.TYPE_WKT:
                    this._pinfo = new IntegerParameterInfo(param.Name, "", param.Value);
                    break;
                case DoubleParameterInfo.TYPE_WKT:
                    this._pinfo = new DoubleParameterInfo(param.Name, "", param.Value);
                    break;
                case StringParameterInfo.TYPE_WKT:
                    this._pinfo = new StringParameterInfo(param.Name, "", param.Value);
                    break;
                case ChooseLayerParameterInfo.TYPE_WKT:
                    this._pinfo = new ChooseLayerParameterInfo(param.Name, "", param.Value);
                    break;
                case ChooseTableParameterInfo.TYPE_WKT:
                    this._pinfo = new ChooseTableParameterInfo(param.Name, "", param.Value);
                    break;
                case UnitsParameterInfo.TYPE_WKT:
                    this._pinfo = new UnitsParameterInfo(param.Name, "", param.Value);
                    break;
                default:
                    this._pinfo = null;
                    break;
            }

            if (this._pinfo == null)
                throw new ArgumentException("Unknown type of ParameterInfo specified", "paramType");

            this._autoStore = autoStoreChanges;
        }
コード例 #5
0
ファイル: DbFieldSelect.cs プロジェクト: sillsdev/WorldPad
		public DbFieldSelect(dao.TableDefs aTableDefs)
		{
			InitializeComponent();

			for(int i = 0; i < aTableDefs.Count; i++ )
			{
				dao.TableDef aTable = aTableDefs[i];

				if (aTable.Attributes == 0)
				{
					TreeNode node = this.treeViewTablesFields.Nodes.Add(aTable.Name);
					dao.Fields aFields = aTable.Fields;
					for (int j = 0; j < aFields.Count; j++)
					{
						dao.Field aField = aFields[j];
						node.Nodes.Add(aField.Name);

						OfficeApp.ReleaseComObject(aField); // needed or Access stays running after exit
					}
					OfficeApp.ReleaseComObject(aFields);
				}
				OfficeApp.ReleaseComObject(aTable);
			}
		}
コード例 #6
0
ファイル: ParameterEditForm.cs プロジェクト: EAWCS1/SUITT
 public ParameterEditForm(dao.QAParameter param, string paramType)
     : this(param, paramType, true)
 {
 }
コード例 #7
0
ファイル: QAManager.cs プロジェクト: EAWCS1/SUITT
        /**
         * Removes exceptions in preparation for deleting a test
         */
        public bool DeleteExceptionsForTest(dao.QATest test)
        {
            // What's the OperDSName of the incoming errors?
            string dsName = "";

            // Make sure we've got a connection to ISDUT for exceptions
            string path = RestTransactionManager.Instance.BaseTransactionManager.extension().get_SystemValue(DAOUtils.ISDUT_SEE_TEMP);

            IWorkspaceFactory workspaceFactory = new ESRI.ArcGIS.DataSourcesGDB.FileGDBWorkspaceFactoryClass();
            IWorkspace theIsdutWorkspace = workspaceFactory.OpenFromFile(path, 0);

            // Initialize an exception storage object
            if (this._exceptions == null || this._exceptions.OperationalDatasetName.Equals(dsName) == false)
                this._exceptions = new QAExceptionStorage(
                    theIsdutWorkspace,
                    this.Extension.get_SystemValue("db.isdut.schema"),
                    dsName);

            return this._exceptions.RemoveAll(test.Name);
        }
コード例 #8
0
ファイル: QAManager.cs プロジェクト: EAWCS1/SUITT
        /**
         * Applies new status, saves errors and creates/deletes exceptions as necessary
         */
        public void ApplyNewStatusToErrors(dao.QAError[] errors, string newStatus)
        {
            if (errors == null || errors.Length == 0)
                return;

            // Make sure we've got a connection to ISDUT for exceptions
            string path = RestTransactionManager.Instance.BaseTransactionManager.extension().get_SystemValue(DAOUtils.ISDUT_SEE_TEMP);

            IWorkspaceFactory workspaceFactory = new ESRI.ArcGIS.DataSourcesGDB.FileGDBWorkspaceFactoryClass();
            IWorkspace theIsdutWorkspace = workspaceFactory.OpenFromFile(path, 0);

            // What's the OperDSName of the incoming errors?
            string dsName = errors[0].OperationalDatasetName;

            // Initialize an exception storage object
            if (this._exceptions == null || this._exceptions.OperationalDatasetName.Equals(dsName) == false)
                this._exceptions = new QAExceptionStorage(
                    theIsdutWorkspace,
                    this.Extension.get_SystemValue("db.isdut.schema"),
                    dsName);

            // Loop through each error
            for (int i = 0; i < errors.Length; i++)
            {
                if (errors[i].Error.Status.Equals(newStatus) == false)
                {
                    // Currently an exception? Remove it.
                    if (errors[i].Error.Status.Equals(DataQualityError.STATUS_EXCEPTION)
                        || errors[i].Error.Status.Equals(DataQualityError.STATUS_DEFERRED)
                        || newStatus.Equals(DataQualityError.STATUS_EXCEPTION)
                        || newStatus.Equals(DataQualityError.STATUS_DEFERRED))
                    {
                        QAException theException = this._exceptions.FindException(errors[i].Error);
                        this._exceptions.RemoveException(theException);
                    }

                    // Update the status
                    errors[i].Error.Status = newStatus;
                    this._errors.StoreError(errors[i]);

                    // New status is an exception? Create one.
                    if (newStatus.Equals(DataQualityError.STATUS_EXCEPTION)
                        || newStatus.Equals(DataQualityError.STATUS_DEFERRED))
                    {
                        this._exceptions.AddException(errors[i], newStatus);
                    }
                }
            }
        }
コード例 #9
0
 public ArquivamentoAdminService(ILeilaoDao dao, ICategoriaDao categDao) => _defaultService = new DefaultAdminService(dao, categDao);
コード例 #10
0
ファイル: ErrorManagerForm.cs プロジェクト: EAWCS1/SUITT
        public void SetDetailError(dao.QAError error)
        {
            if (error == null || error.Error == null)
            {
                this.grpDetail.Text = "Multiple or No Selection";
                this.lblLocation.Text = "";
                this.lblSeverity.Text = "";
                this.lblStatus.Text = "";
                this.txtDescription.Text = "";
                this.lvExtendedInfo.Items.Clear();
            }
            else
            {
                this.grpDetail.Text = error.Error.ErrorType + " #" + error.ObjectID;

                //ILatLonFormat theFormat = new LatLonFormatClass();
                //INumberFormat theNFormat = (INumberFormat)theFormat;
                //theFormat.ShowDirections = true;
                //theFormat.ShowZeroMinutes = true;
                //theFormat.ShowZeroSeconds = true;

                //theFormat.IsLatitude = true;
                //this.lblLocation.Text = theNFormat.ValueToString(error.Latitude);
                //theFormat.IsLatitude = false;
                //this.lblLocation.Text += " " + theNFormat.ValueToString(error.Longitude);

                this.lblLocation.Text = Math.Round(error.Latitude, 7) + ", " + Math.Round(error.Longitude, 7);

                switch (error.Error.Severity)
                {
                    case 1:
                        this.lblSeverity.Text = "High";
                        break;
                    case 2:
                        this.lblSeverity.Text = "Medium";
                        break;
                    case 3:
                        this.lblSeverity.Text = "Low";
                        break;
                    default:
                        this.lblSeverity.Text = "";
                        break;
                }
                this.lblStatus.Text = error.Error.Status;
                this.txtDescription.Text = error.Error.Description;

                this.lvExtendedInfo.Items.Clear();
                ExtendedInfo theInfo = new ExtendedInfo();
                theInfo.ReadXML(error.Error.ExtendedData);

                Hashtable theProperties = theInfo.Properties;
                foreach (object key in theProperties.Keys)
                {
                    string[] theTextByCol = new string[] {
                                                             key.ToString(),
                                                             theProperties[key].ToString()
                                                         };
                    ListViewItem theItem = new ListViewItem(theTextByCol);
                    this.lvExtendedInfo.Items.Add(theItem);
                }
            }
        }
コード例 #11
0
ファイル: AccessDoc.cs プロジェクト: sillsdev/WorldPad
		public AccessDocument(dao.Recordset doc, string strFieldName)
			: base(doc)
		{
			m_strFieldName = strFieldName;
		}
コード例 #12
0
ファイル: AccessDoc.cs プロジェクト: sillsdev/WorldPad
		public AccessRange(dao.Field basedOnRange, AccessDocument rsDoc)
		{
			m_doc = rsDoc;
			m_field = basedOnRange;
		}
コード例 #13
0
ファイル: ErrorManagerCmd.cs プロジェクト: EAWCS1/SUITT
        private bool EvaluateFilter(string filter, dao.QAError error)
        {
            if (filter == null || error == null || error.Error == null)
                return false;

            if (error.Error.ErrorType.ToUpper().IndexOf(filter) >= 0)
                return true;

            if (error.Error.Status.ToUpper().IndexOf(filter) >= 0)
                return true;

            if (error.Error.Description.ToUpper().IndexOf(filter) >= 0)
                return true;

            if (error.ObjectID.ToString().IndexOf(filter) >= 0)
                return true;

            switch (error.Error.Severity)
            {
                case 1:
                    if ("HIGH".IndexOf(filter) >= 0)
                        return true;
                    break;
                case 2:
                    if ("MEDIUM".IndexOf(filter) >= 0)
                        return true;
                    break;
                case 3:
                    if ("LOW".IndexOf(filter) >= 0)
                        return true;
                    break;
            }

            return false;
        }