Example #1
0
        private void cmbConnections_SelectedValueChanged(object sender, EventArgs e)
        {
            try
            {
                if (cmbConnections.SelectedValue != null)
                {
                    int selUser = int.Parse(cmbConnections.SelectedValue.ToString());

                    if (selUser != this.connectionId)
                    {
                        this.connectionId = selUser;

                        this.Enabled = false;

                        cataloguesPerUser = _catalogues.GetCataloguesForConnection(this.connectionId);

                        // load the catalogues from the new selected user
                        // and populate the controls accordingly
                        PopulateControls();

                        this.Enabled = true;
                    }
                }
            }
            catch (Exception ex)
            {
                MyLogger.Write(ex, "cmbConnections_SelectedValueChanged", LoggingCategory.Exception);

                MessageBox.Show(this, ex.Message, Messages.Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Example #2
0
        private void EditBug_Load(object sender, EventArgs e)
        {
            try
            {
                if (!this.DesignMode)
                {
                    _appSettings = MyZillaSettingsDataSet.GetInstance();

                    _asyncOpManager = AsyncOperationManagerList.GetInstance();

                    // disable the control until de bug details are loaded and
                    // all the controls are populated accordingly.

                    ShowConnectionInfo();

                    this.Enabled = false;

                    _catalogues = CatalogueManager.Instance();

                    //if (_catalogues.DependentCataloguesLoadedCompleted!=null)
                    _catalogues.DependentCataloguesLoadedCompleted += new EventHandler(this._catalogues_DependentCataloguesLoadedCompleted);

                    cataloguesPerUser = _catalogues.GetCataloguesForConnection(this.connectionId);

                    if (cataloguesPerUser.catalogueComponent == null || cataloguesPerUser.catalogueVersion == null || cataloguesPerUser.catalogueTargetMilestone == null)
                    {
                        cmbComponent.Enabled = false;

                        cmbVersion.Enabled = false;

                        cmbMilestone.Enabled = false;

                        _catalogues.CompAndVersionCataloguesLoadedCompleted += new EventHandler(_catalogues_CompAndVersionCataloguesLoadedCompleted);

                        _catalogues.LoadCompAndVersionCatalogues(cataloguesPerUser);
                    }
                    else
                    {
                        PopulateControls();

                        // asyn op
                        GetBugDetailsAndSetControls(this.bugId, true);
                    }

                    if (_appSettings.GetConnectionById(connectionId).Version.StartsWith("2.18"))
                    {
                        GetLastUpdated();
                    }
                }
            }
            catch (Exception ex)
            {
                MyLogger.Write(ex, "EditBug_Load", LoggingCategory.Exception);

                MessageBox.Show(this, ex.Message, Messages.Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Example #3
0
        private void InsertBug_Load(object sender, EventArgs e)
        {
            try
            {
                if (!this.DesignMode)
                {
                    MyZillaSettingsDataSet _appSettings = MyZillaSettingsDataSet.GetInstance();

                    _catalogues = CatalogueManager.Instance();

                    this.txtReporter.Text = _appSettings.GetConnectionById(this.connectionId).UserName;

                    asyncOpManager = AsyncOperationManagerList.GetInstance();

                    cmbConnections.SelectedValueChanged -= new EventHandler(cmbConnections_SelectedValueChanged);

                    LoadConnectionInfo();

                    cmbConnections.Text = _appSettings.GetConnectionInfo(this.connectionId);

                    cmbConnections.SelectedValueChanged += new EventHandler(cmbConnections_SelectedValueChanged);


                    // verify if all catalogues have been added and populate the controls properly

                    cataloguesPerUser = _catalogues.GetCataloguesForConnection(this.connectionId);

                    if (cataloguesPerUser.catalogueComponent == null || cataloguesPerUser.catalogueVersion == null || cataloguesPerUser.catalogueTargetMilestone == null)
                    {
                        cmbComponent.Enabled = false;

                        cmbVersion.Enabled = false;

                        cmbMilestone.Enabled = false;

                        btnInsertBug.Enabled = false;

                        _catalogues.CompAndVersionCataloguesLoadedCompleted += new EventHandler(_catalogues_CompAndVersionCataloguesLoadedCompleted);

                        _catalogues.LoadCompAndVersionCatalogues(cataloguesPerUser);
                    }
                    else
                    {
                        _catalogues.DependentCataloguesLoadedCompleted += new EventHandler(this._catalogues_DependentCataloguesLoadedCompletedInsertBug);

                        PopulateControls();
                    }
                }
            }
            catch (Exception ex)
            {
                MyLogger.Write(ex, "InsertBug_Load", LoggingCategory.Exception);

                MessageBox.Show(this, ex.Message, Messages.Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Example #4
0
        private bool CheckConditionsForLoading()
        {
            bool isValid = true;

            CatalogueManager _catalogues = CatalogueManager.Instance();

            Catalogues cataloguesPerUser = _catalogues.GetCataloguesForConnection(_connectionId);

            if (cataloguesPerUser == null)
            {
                return(false);
            }

            return(isValid);
        }
Example #5
0
        private void EditBug_Load(object sender, EventArgs e)
        {
            try
            {
                if (!this.DesignMode)
                {

                    _appSettings = MyZillaSettingsDataSet.GetInstance();

                    _asyncOpManager = AsyncOperationManagerList.GetInstance();

                    // disable the control until de bug details are loaded and
                    // all the controls are populated accordingly.

                    ShowConnectionInfo();

                    this.Enabled = false;

                    _catalogues = CatalogueManager.Instance();

                    //if (_catalogues.DependentCataloguesLoadedCompleted!=null)
                        _catalogues.DependentCataloguesLoadedCompleted += new EventHandler(this._catalogues_DependentCataloguesLoadedCompleted);

                    cataloguesPerUser = _catalogues.GetCataloguesForConnection(this.connectionId);

                    if (cataloguesPerUser.catalogueComponent == null || cataloguesPerUser.catalogueVersion == null || cataloguesPerUser.catalogueTargetMilestone == null )
                    {
                        cmbComponent.Enabled = false;

                        cmbVersion.Enabled = false;

                        cmbMilestone.Enabled = false;

                        _catalogues.CompAndVersionCataloguesLoadedCompleted += new EventHandler(_catalogues_CompAndVersionCataloguesLoadedCompleted);

                        _catalogues.LoadCompAndVersionCatalogues(cataloguesPerUser);
                    }
                    else
                    {

                        PopulateControls();

                        // asyn op
                        GetBugDetailsAndSetControls(this.bugId, true);
                    }

                    if (_appSettings.GetConnectionById(connectionId).Version.StartsWith("2.18"))
                        GetLastUpdated();
                }
            }
            catch (Exception ex)
            {
                MyLogger.Write(ex, "EditBug_Load", LoggingCategory.Exception);

                MessageBox.Show(this, ex.Message, Messages.Error , MessageBoxButtons.OK, MessageBoxIcon.Error     );
            }
        }
Example #6
0
        private void ucAdvancedSearch_Load(object sender, EventArgs e)
        {
            Utils.PopulateListBox(listboxProduct, _catalogues.GetCataloguesForConnection(_userId).catalogueProduct);
            listboxProduct.ClearSelected();

            // get all the catalogues dependent of the product catalogue

            Utils.PopulateListBox(listboxStatus, _catalogues.GetCataloguesForConnection(_userId).catalogueStatus);
            listboxStatus.ClearSelected();
            //listboxStatus.SelectedIndex = 1;
            //listboxStatus.SelectedIndex = 2;
            //listboxStatus.SelectedIndex = 3;
            //listboxStatus.SelectedIndex = 4;

            Utils.PopulateListBox(listboxResolution, _catalogues.GetCataloguesForConnection(_userId).catalogueResolution);
            listboxResolution.ClearSelected();

            Utils.PopulateListBox(listboxSeverity, _catalogues.GetCataloguesForConnection(_userId).catalogueSeverity);
            listboxSeverity.ClearSelected();

            Utils.PopulateListBox(listboxPriority, _catalogues.GetCataloguesForConnection(_userId).cataloguePriority);
            listboxPriority.ClearSelected();

            Utils.PopulateListBox(listboxHardware, _catalogues.GetCataloguesForConnection(_userId).catalogueHardware);
            listboxHardware.ClearSelected();

            Utils.PopulateListBox(listboxOS, _catalogues.GetCataloguesForConnection(_userId).catalogueOS);
            listboxOS.ClearSelected();

            Utils.PopulateComboBox(cmbSummary, _catalogues.GetCataloguesForConnection(_userId).catalogueStringOperators);

            Utils.PopulateComboBox(cmbComment, _catalogues.GetCataloguesForConnection(_userId).catalogueStringOperators);
            //cmbComment.SelectedIndex = 2;

            Utils.PopulateComboBox(cmbURL, _catalogues.GetCataloguesForConnection(_userId).catalogueStringOperators);

            Utils.PopulateComboBox(cmbWhiteboard, _catalogues.GetCataloguesForConnection(_userId).catalogueStringOperators);

            Utils.PopulateComboBox(cmbGeneralField, _catalogues.GetCataloguesForConnection(_userId).catalogueFields);

            Utils.PopulateComboBox(cmbGeneralOperator, _catalogues.GetCataloguesForConnection(_userId).catalogueOperators);


            SetUISearchCriteriaFromUI();
        }
Example #7
0
        private void InsertBug_Load(object sender, EventArgs e)
        {
            try
            {
                if (!this.DesignMode)
                {

                    MyZillaSettingsDataSet _appSettings = MyZillaSettingsDataSet.GetInstance();

                    _catalogues = CatalogueManager.Instance();

                    this.txtReporter.Text = _appSettings.GetConnectionById(this.connectionId).UserName;

                    asyncOpManager = AsyncOperationManagerList.GetInstance();

                    cmbConnections.SelectedValueChanged -=new EventHandler(cmbConnections_SelectedValueChanged);

                    LoadConnectionInfo();

                    cmbConnections.Text = _appSettings.GetConnectionInfo(this.connectionId);

                    cmbConnections.SelectedValueChanged += new EventHandler(cmbConnections_SelectedValueChanged);

                    // verify if all catalogues have been added and populate the controls properly

                    cataloguesPerUser = _catalogues.GetCataloguesForConnection(this.connectionId);

                    if (cataloguesPerUser.catalogueComponent == null || cataloguesPerUser.catalogueVersion == null || cataloguesPerUser.catalogueTargetMilestone == null )
                    {
                        cmbComponent.Enabled = false;

                        cmbVersion.Enabled = false;

                        cmbMilestone.Enabled = false;

                        btnInsertBug.Enabled = false;

                        _catalogues.CompAndVersionCataloguesLoadedCompleted += new EventHandler(_catalogues_CompAndVersionCataloguesLoadedCompleted);

                        _catalogues.LoadCompAndVersionCatalogues(cataloguesPerUser);
                    }
                    else
                    {

                        _catalogues.DependentCataloguesLoadedCompleted += new EventHandler(this._catalogues_DependentCataloguesLoadedCompletedInsertBug);

                        PopulateControls();

                    }
                }
            }
            catch (Exception ex)
            {
                MyLogger.Write(ex, "InsertBug_Load", LoggingCategory.Exception);

                MessageBox.Show(this, ex.Message, Messages.Error , MessageBoxButtons.OK, MessageBoxIcon.Error     );
            }
        }