/// <summary>Hit after we successfully connected to the project. Launches all all other data retrievals.</summary> /// <param name="sender">ImportExport</param> /// <param name="e">Event Args</param> private void LoadItem_Task2(object sender, Spira_ImportExport.Connection_ConnectToProjectCompletedEventArgs e) { try { if ((e.Error == null) && (e.Result != false)) { //Fire off asyncs. this._NumRunning = 1; this._Client.Requirement_RetrieveByIdAsync(int.Parse(this._ItemTag.Split(':')[1]), this._NumCount++); } else { this.panelLoading.Visibility = Visibility.Collapsed; this.panelLoadingError.Visibility = Visibility.Visible; Exception ex = e.Error; string errMsg = ""; if (e.Error == null) { errMsg = "Could not connect to project #" + this._Project.ProjectID.ToString(); } else { errMsg = getErrorMessage(e.Error); } this.msgLoadingErrorMsg.Text = errMsg; Connect.logEventMessage("wpfDetailsRequirement::LoadItem_Task2. Error communicating!", e.Error, System.Diagnostics.EventLogEntryType.Error); } } catch (Exception ex) { Connect.logEventMessage("wpfDetailsRequirement::LoadItem_Task2", ex, System.Diagnostics.EventLogEntryType.Error); } }
/// <summary>Hit after we successfully connected to the project. Launches all all other data retrievals.</summary> /// <param name="sender">ImportExport</param> /// <param name="e">Event Args</param> private void loadItem_Incident_3(object sender, Spira_ImportExport.Connection_ConnectToProjectCompletedEventArgs e) { try { if ((e.Error == null) && (e.Result != false)) { //Fire off asyncs. this._NumRunning = 6; this._Client.Incident_RetrieveByIdAsync(int.Parse(this._itemCode.Split(':')[1]), this._NumAsync++); this._Client.Release_RetrieveAsync(true, this._NumAsync++); this._Client.Incident_RetrievePrioritiesAsync(this._NumAsync++); this._Client.Incident_RetrieveSeveritiesAsync(this._NumAsync++); this._Client.Incident_RetrieveTypesAsync(this._NumAsync++); this._Client.Incident_RetrieveStatusesAsync(this._NumAsync++); if (this.hasWorkFlow_Avail) { this._NumRunning++; this._Client.Project_RetrieveUserMembershipAsync(this._NumAsync++); } } else { this.panelLoading.Visibility = Visibility.Collapsed; this.panelLoadingError.Visibility = Visibility.Visible; Exception ex = e.Error; string errMsg = ""; if (e.Error == null) { errMsg = "Could not connect to project #" + this._Project.ProjectID.ToString(); } else { errMsg = getErrorMessage(e.Error); } this.msgLoadingErrorMsg.Text = errMsg; } } catch (Exception ex) { Connect.logEventMessage("wpfDetailsIncident::loadItem_Incident_3", ex, System.Diagnostics.EventLogEntryType.Error); } }
/// <summary>Hit after we successfully connected to the project. Launches all all other data retrievals.</summary> /// <param name="sender">ImportExport</param> /// <param name="e">Event Args</param> private void LoadItem_Task2(object sender, Spira_ImportExport.Connection_ConnectToProjectCompletedEventArgs e) { try { if ((e.Error == null) && (e.Result != false)) { //Fire off asyncs. this._NumRunning = 3; this._Client.Requirement_RetrieveAsync(new Spira_ImportExport.RemoteFilter[] { }, 1, 9999999, this._NumCount++); this._Client.Task_RetrieveByIdAsync(int.Parse(this._ItemTag.Split(':')[1]), this._NumCount++); this._Client.Release_RetrieveAsync(true, this._NumCount++); if (this._hasProjUsers) { this._NumRunning++; this._Client.Project_RetrieveUserMembershipAsync(this._NumCount++); } } else { this.panelLoading.Visibility = Visibility.Collapsed; this.panelLoadingError.Visibility = Visibility.Visible; Exception ex = e.Error; string errMsg = ""; if (e.Error == null) { errMsg = "Could not connect to project #" + this._Project.ProjectID.ToString(); } else { errMsg = getErrorMessage(e.Error); } this.msgLoadingErrorMsg.Text = errMsg; } } catch (Exception ex) { Connect.logEventMessage("wpfDetailsTYask::LoadItem_Task2", ex, System.Diagnostics.EventLogEntryType.Error); } }