public bool Execute(object InputValue) { Boolean selection = false; string currentJobStatus = null; string instanceJobStatus = null; try { if (m_gtFeature.FNO == 191) { m_gtApplication = GTClassFactory.Create <IGTApplication>(); if (CheckJobStatus(ref currentJobStatus, ref instanceJobStatus)) { m_gtOutputValue = GTClassFactory.Create <IGTFieldValue>(); QueryVoucherFERCAccount(); selection = true; } else { MessageBox.Show(String.Format("Selected Voucher cannot be queried as the specific voucher was created when the job was in '{0}' Status and the job is now in '{1}' Status", instanceJobStatus, currentJobStatus), "G/Technology"); selection = false; } } } catch (Exception ex) { MessageBox.Show("There is an error in \"Voucher FERC Account\" Foreign Key Query Interface \n" + ex.Message, "G/Technology"); } return(selection); }
public bool Execute(object InputValue) { Boolean selection = false; DataTable associatedFeaturesRs = null; try { m_gtApplication = GTClassFactory.Create <IGTApplication>(); m_gtOutputValue = GTClassFactory.Create <IGTFieldValue>(); if (ProcessVirtualPointAssociation(ref associatedFeaturesRs)) { DisplayFormWithAssociatedFeatures(associatedFeaturesRs, m_gtApplication); } selection = true; } catch (Exception ex) { MessageBox.Show("There is an error in \"Virtual Point Association\" Foreign Key Query Interface \n" + ex.Message, "G/Technology"); } finally { } return(selection); }
public bool Execute(object InputValue) { bool selection = false; ESIAccountSelection esiAcctSelection = null; try { //Check selected Street Light has valid geomertry and attribtues values if (ValidateStreetLight()) { _gtOutputValue = GTClassFactory.Create <IGTFieldValue>(); esiAcctSelection = new ESIAccountSelection(); // Get Geograpchic Street Light Account for selected Street Light Feature Instance esiAcctSelection.GeoStreetLightAccounts = GetGeographicStreetLightAct(_gtFeature.FID); //Get All Street Light Accoutns matching with selected Street Light Feature Instance esiAcctSelection.StreetLightAccounts = GetStreetLightAccts(); //Check Street Light Account exists otherwise throw validation message if (esiAcctSelection.GeoStreetLightAccounts.Count > 0 || esiAcctSelection.StreetLightAccounts.Count > 0) { esiAcctSelection.LoadData(); if (esiAcctSelection.ShowDialog() == DialogResult.OK) { _gtOutputValue.FieldValue = esiAcctSelection.SelectedSTLTAccount.ESI_Location; selection = true; } } else { MessageBox.Show(stltAcctValidationMsg, formCaption, MessageBoxButtons.OK, MessageBoxIcon.Warning); } } else { MessageBox.Show(stltValidationMsg, formCaption, MessageBoxButtons.OK, MessageBoxIcon.Warning); } } catch (Exception ex) { MessageBox.Show("Error in Street Light ESI Account Selection\n" + ex.Message, formCaption, MessageBoxButtons.OK, MessageBoxIcon.Error); } finally { if (esiAcctSelection != null) { esiAcctSelection.Dispose(); esiAcctSelection.StreetLightAccounts = null; esiAcctSelection.GeoStreetLightAccounts = null; esiAcctSelection = null; } } return(selection); }