Пример #1
0
        public void SetFilterParams(ref SearchParams filter)
        {
            if(statusArray.Enabled)
            {
                filter.status = statusArray.GetSelected();
            }

            if(resolutionArray.Enabled)
            {
                filter.resolution = resolutionArray.GetSelected();
            }
        }
Пример #2
0
        public void SetFilterParams(ref SearchParams filter)
        {
            if(this.reportedCalendar.Date != DateTime.Today)
            {
                filter.creation_time = reportedCalendar.Date;
            }

            if(this.modifiedCalendar.Date != DateTime.Today)
            {
                filter.last_change_time = modifiedCalendar.Date;
            }
        }
Пример #3
0
        public void SetFilterParams(ref SearchParams filter)
        {
            if(severityArray.Enabled)
            {
                filter.severity = severityArray.GetSelected();
            }

            if(priorityArray.Enabled)
            {
                filter.priority = priorityArray.GetSelected();
            }
        }
Пример #4
0
 public void SetFilterParams(ref SearchParams filter)
 {
     if(productTextBox.Enabled)
     {
         filter.product = productTextBox.Text;
     }
     if(componentTextBox.Enabled)
     {
         filter.component = componentTextBox.Text;
     }
     if(versionTextBox.Enabled)
     {
         filter.version = versionTextBox.Text;
     }
 }
Пример #5
0
        public void SetFilterParams(ref SearchParams filter)
        {
            if(assignedTextBox.Enabled)
            {
                filter.assigned_to = assignedTextBox.Text;
            }

            if(reportedTextBox.Enabled)
            {
                filter.reporter = reportedTextBox.Text;
            }

            if(qaTextBox.Enabled)
            {
                filter.qa_contact = reportedTextBox.Text;
            }
        }
Пример #6
0
        protected virtual void TestQueryButtonClicked(object sender, System.EventArgs e)
        {
            // we're assuming that the source is a valid one.
            buttonOk.Sensitive = false;
            Candidate = null; // Erase any previous successful query candidate
            Query target = new Query();

            // Set the global source ID of the target's source
            target.SourceID = sourceSelector.Active - 1;

            // Start setting the parameters that will be set via the filters
            SearchParams queryParams = new SearchParams();

            // iterate over all the filters and get the filters
            foreach(Widget filterWidget in filterWidgets)
            {
                IFilterWidget filter = (IFilterWidget)filterWidget;
                if(filter != null)
                {
                    // modify the query parameters
                    filter.SetFilterParams(ref queryParams);
                }
            }

            target.Generator.queryParameters = queryParams;
            target.Generator.Title = bugTitleEntry.Text;

            // now try to run the query
            testQueryButton.Sensitive = false;
            int output = target.Execute();
            if(output == -1)
            {
                // the connection failed or something
                testQueryOutputLabel.Text = "The request to the server failed. Please try later";
                testQueryButton.Sensitive = true;
            }
            else
            {
                testQueryOutputLabel.Text = String.Format("The query returned {0} results", output);

                // Allow user to press OK button
                buttonOk.Sensitive = true;

                // Set the new candidate
                Candidate = target;

                testQueryButton.Sensitive = true;

            }
        }
Пример #7
0
 public BaseQuery()
 {
     queryParameters = new SearchParams ();
 }