/// <summary> /// Starts the feature explorer after line placement is finished. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void placementFinished(object sender, EventArgs e) { loadServiceLineData(); featureExplorerService.ExploreFeature(serviceLine, "Placement"); if (featureExplorerVisible) { featureExplorerService.ExploreFeature(serviceLine, "Placement"); featureExplorerService.Visible = true; featureExplorerService.Slide(true); } else { saveAndContinueActions(); } }
private bool ProcessCUUpdate(bool flagCUModified, ref short nCompNO, ref string sFilterFieldName) { string sCUFieldName = ""; int changeOutCid = m_oFeature.CID; if (flagCUModified) { IGTFeatureExplorerService mFEservice = GTClassFactory.Create <IGTFeatureExplorerService>(); if (GetCompFieldNameByANO(m_sCUano, m_oFeature.FNO, ref nCompNO, ref sCUFieldName)) //As the CU field is same for Primary or Ancillary component, there is no difference whether we pass Primary CU ANO or Ancillary CU ANO { if (!(m_oFeature.Components.GetComponent(nCompNO).Recordset == null)) { // FeatureExplorerService is called to refresh all Dialog tabs of the feature string stablename; string sDiaType; stablename = GetPrimaryComponentTable(m_oFeature.FNO); if (IsPlacementMode(m_oFeature.FNO, m_oFeature.FID, stablename)) { if (m_sDialogNo == "") { mFEservice.ExploreFeature(m_oFeature, "Placement"); } else { sDiaType = GetDialogType(m_sDialogNo); mFEservice.ExploreFeature(m_oFeature, sDiaType); } } else { mFEservice.ExploreFeature(m_oFeature, "Edit"); CopyPhaseAndPositionFromChangeoutInstance(changeOutCid); mFEservice.ExploreFeature(m_oFeature, "Edit"); } } } return(true); } else { return(false); } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnEditStreetLight_Click(object sender, EventArgs e) { _gtKeyEditObj = null; if (dtGridViewNonLocated.SelectedRows.Count > 0) { try { var obj = (StreetLightNonLocated)dtGridViewNonLocated.SelectedRows[0].DataBoundItem; if (obj != null) { btnEditStreetLight.Enabled = false; btnStructure.Enabled = false; btnSave.Enabled = false; if (obj.EntityState != EntityMode.Add) { _gtTransactionManager.Begin("Edit Street Light " + obj.G3eFid); _gtKeyEditObj = _gtApp.DataContext.OpenFeature(obj.G3efno, obj.G3eFid); _gtFeatureExplorerSrvc.ExploreFeature(_gtKeyEditObj, "Edit"); _gtFeatureExplorerSrvc.Visible = true; } } } catch (Exception ex) { MessageBox.Show("Error while editing feature " + ex.Message); _gtTransactionManager.Rollback(); } } }
private void ExploreFeatures() { // Similar to the product's dialog, if multiple rows are selected, // the system does not explore or select the features. if(1 == this.dgvErrors.SelectedRows.Count) { IGTFeatureExplorerService fes = GTClassFactory.Create<IGTFeatureExplorerService>(); IGTApplication app = GTClassFactory.Create<IGTApplication>(); DataGridViewRow row = this.dgvErrors.SelectedRows[0]; short FNO = Convert.ToInt16(row.Cells[colFNO.Index].Value); int FID = Convert.ToInt32(row.Cells[colFID.Index].Value); IGTKeyObject keyObject = app.DataContext.OpenFeature(FNO, FID); fes.ExploreFeature(keyObject, "Review"); app.SelectedObjects.Clear(); IGTDDCKeyObjects ddcKeyobjects = app.DataContext.GetDDCKeyObjects(FNO, FID, GTComponentGeometryConstants.gtddcgAllGeographic); app.SelectedObjects.Add(GTSelectModeConstants.gtsosmAllComponentsInActiveLegend, ddcKeyobjects[0]); fes.Visible = true; } }
/// <summary> /// Method to Query the Voucher FERCAccount and Sub Account data required to load ForeignKeyQuery form. /// </summary> private void QueryVoucherFERCAccount() { Recordset workpointAttributeRS = null; string activeWR = null; string fkqConfiguredAttribute = null; try { fkqConfiguredAttribute = Convert.ToString(Arguments.GetArgument(0)); activeWR = m_gtApplication.DataContext.ActiveJob; workpointAttributeRS = DataContext.OpenRecordset(String.Format("SELECT DISTINCT PRIME_ACCT_ID,SUB_ACCT,ACCT_DESC,CU.G3E_FID,CU.ASSOC_FNO FROM WORKPOINT_CU_N CU,WORKPOINT_N WP,REFWMIS_FERC_ACCOUNT REF WHERE CU.G3E_FID=WP.G3E_FID AND WP.WR_NBR='{0}' AND REF.PRIME_ACCT=CU.PRIME_ACCT_ID AND REF.ACTIVITY_C=CU.ACTIVITY_C", activeWR), CursorTypeEnum.adOpenStatic, LockTypeEnum.adLockReadOnly, (int)CommandTypeEnum.adCmdText); using (VoucherFERCAccountForm voucherFERCAccountForm = new VoucherFERCAccountForm(workpointAttributeRS, m_gtFeature, fkqConfiguredAttribute, m_gtReadOnly)) { voucherFERCAccountForm.StartPosition = FormStartPosition.CenterScreen; voucherFERCAccountForm.ShowDialog(m_gtApplication.ApplicationWindow); if (voucherFERCAccountForm.AccountValue != null && !m_gtReadOnly) { IGTFeatureExplorerService mFEservice = GTClassFactory.Create <IGTFeatureExplorerService>(); mFEservice.ExploreFeature(m_gtFeature, "Edit"); } //m_gtOutputValue.FieldValue = voucherFERCAccountForm.AccountValue; } } catch { throw; } finally { if (workpointAttributeRS != null) { workpointAttributeRS = null; } } }
public void m_gtPlacementService_Finished(object sender, GTFinishedEventArgs e) { m_oGTExplorerService.ExploreFeature(m_oGTTreeTrimmingfeature, "Placement"); }