Ejemplo n.º 1
0
        private void btnVouchersAccnt_Click(object sender, EventArgs e)
        {
            try
            {
                VoucherFERCAccountForm voucherFERCAccountForm = new VoucherFERCAccountForm(m_oWorkPointVoucherRS);
                voucherFERCAccountForm.ShowDialog(this);

                if (voucherFERCAccountForm.AccountValue != null)
                {
                    txtVoucherAccnt.Text = voucherFERCAccountForm.AccountValue;
                }

                m_oGTApp.SetStatusBarText(GTStatusPanelConstants.gtaspcMessage, "Enter information for inclusion in the Vegetation Management WR Activity Sheet.Also Specify whether to also generate a plot to accompany the activity sheet");
            }
            catch
            {
                m_oCommandExit = true;
                throw;
            }
        }
Ejemplo n.º 2
0
        /// <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;
                }
            }
        }