private void BtnView_Click(object sender, EventArgs e)
        {
            // get the currently selected row
            DataRow CurrentlySelectedRow = GetCurrentDataRow();

            if (CurrentlySelectedRow != null)
            {
                try
                {
                    this.Cursor = Cursors.WaitCursor;

                    TFrmGLBatch GLb = new TFrmGLBatch(this);
                    GLb.LedgerNumber = FLedgerNumber;

                    GLb.ShowDetailsOfOneBatch(FLedgerNumber, (int)CurrentlySelectedRow["a_batch_number_i"],
                                              (int)CurrentlySelectedRow["a_journal_number_i"], (int)CurrentlySelectedRow["a_batch_year_i"],
                                              (int)CurrentlySelectedRow["a_batch_period_i"]);

                    GLb.SelectTab(TFrmGLBatch.eGLTabs.Journals);
                    GLb.SelectTab(TFrmGLBatch.eGLTabs.Transactions);
                    GLb.FindGLTransaction((int)CurrentlySelectedRow["a_batch_number_i"],
                                          (int)CurrentlySelectedRow["a_journal_number_i"], (int)CurrentlySelectedRow["a_transaction_number_i"]);
                }
                finally
                {
                    this.Cursor = Cursors.Default;
                }
            }
        }
        private void RunOnceOnParentActivationManual()
        {
            try
            {
                ParentForm.Cursor = Cursors.WaitCursor;

                grdDetails.DoubleClickCell        += new TDoubleClickCellEventHandler(this.ShowJournalTab);
                grdDetails.DataSource.ListChanged += new System.ComponentModel.ListChangedEventHandler(DataSource_ListChanged);

                LoadBatchesForCurrentYear();

                txtDetailBatchControlTotal.CurrencyCode = TTxtCurrencyTextBox.CURRENCY_STANDARD_2_DP;

                SetInitialFocus();

                // Select the Journal tab if the screen opener specified a Journal Number
                TFrmGLBatch myParentForm = (TFrmGLBatch)ParentForm;

                if (myParentForm.InitialBatchFound && (myParentForm.InitialJournalNumber != -1))
                {
                    myParentForm.SelectTab(TFrmGLBatch.eGLTabs.Journals);
                }

                FInactiveValuesWarningOnGLPosting = TUserDefaults.GetBooleanDefault(TUserDefaults.FINANCE_GL_WARN_OF_INACTIVE_VALUES_ON_POSTING,
                                                                                    true);
            }
            finally
            {
                ParentForm.Cursor = Cursors.Default;
            }
        }
        private void RunOnceOnParentActivationManual()
        {
            grdDetails.DoubleClickCell        += new TDoubleClickCellEventHandler(this.ShowJournalTab);
            grdDetails.DataSource.ListChanged += new System.ComponentModel.ListChangedEventHandler(DataSource_ListChanged);

            SetInitialFocus();

            // Select the Journal tab if the screen opener specified a Journal Number
            TFrmGLBatch myParentForm = (TFrmGLBatch)ParentForm;

            if (myParentForm.InitialBatchFound && (myParentForm.InitialJournalNumber != -1))
            {
                myParentForm.SelectTab(TFrmGLBatch.eGLTabs.Journals);
            }
        }
Esempio n. 4
0
        private void RunOnceOnParentActivationManual()
        {
            grdDetails.DoubleClickCell        += new TDoubleClickCellEventHandler(this.ShowJournalTab);
            grdDetails.DataSource.ListChanged += new System.ComponentModel.ListChangedEventHandler(DataSource_ListChanged);

            LoadBatchesForCurrentYear();

            txtDetailBatchControlTotal.CurrencyCode = TTxtCurrencyTextBox.CURRENCY_STANDARD_2_DP;

            SetInitialFocus();

            // Select the Journal tab if the screen opener specified a Journal Number
            TFrmGLBatch myParentForm = (TFrmGLBatch)ParentForm;

            if (myParentForm.InitialBatchFound && (myParentForm.InitialJournalNumber != -1))
            {
                myParentForm.SelectTab(TFrmGLBatch.eGLTabs.Journals);
            }
        }
        private void BtnView_Click(object sender, EventArgs e)
        {
            // get the currently selected row
            DataRow CurrentlySelectedRow = GetCurrentDataRow();

            if (CurrentlySelectedRow != null)
            {
                try
                {
                    this.Cursor = Cursors.WaitCursor;

                    TFrmGLBatch GLb = new TFrmGLBatch(this);
                    GLb.LedgerNumber = FLedgerNumber;

                    GLb.ShowDetailsOfOneBatch(FLedgerNumber, (int)CurrentlySelectedRow["a_batch_number_i"],
                        (int)CurrentlySelectedRow["a_journal_number_i"], (int)CurrentlySelectedRow["a_batch_year_i"],
                        (int)CurrentlySelectedRow["a_batch_period_i"]);

                    GLb.SelectTab(TFrmGLBatch.eGLTabs.Journals);
                    GLb.SelectTab(TFrmGLBatch.eGLTabs.Transactions);
                    GLb.FindGLTransaction((int)CurrentlySelectedRow["a_batch_number_i"],
                        (int)CurrentlySelectedRow["a_journal_number_i"], (int)CurrentlySelectedRow["a_transaction_number_i"]);
                }
                finally
                {
                    this.Cursor = Cursors.Default;
                }
            }
        }