Example #1
0
        private void CancelRow(System.Object sender, EventArgs e)
        {
            if (FPreviouslySelectedDetailRow == null)
            {
                MessageBox.Show(Catalog.GetString("Select the row to cancel first"));
                return;
            }

            TFrmGLBatch MainForm = (TFrmGLBatch)this.ParentForm;

            int CurrentlySelectedRow = grdDetails.GetFirstHighlightedRowIndex();

            try
            {
                MainForm.FCurrentGLBatchAction = TGLBatchEnums.GLBatchAction.CANCELLINGJOURNAL;

                if (FCancelLogicObject.CancelRow(FPreviouslySelectedDetailRow))
                {
                    UpdateHeaderTotals(FBatchRow);
                    SelectRowInGrid(CurrentlySelectedRow);
                    UpdateRecordNumberDisplay();

                    SetJournalDefaultView();
                    FFilterAndFindObject.ApplyFilter();

                    UpdateChangeableStatus();
                    MainForm.DisableTransactions();
                }
            }
            finally
            {
                MainForm.FCurrentGLBatchAction = TGLBatchEnums.GLBatchAction.NONE;
            }
        }
        private void CancelRow(System.Object sender, EventArgs e)
        {
            int CurrentJournalNumber = FPreviouslySelectedDetailRow.JournalNumber;

            if (FCancelLogicObject.CancelRow(FPreviouslySelectedDetailRow, txtDetailJournalDescription, txtDetailExchangeRateToBase))
            {
                UpdateChangeableStatus();
                SetFocusToDetailsGrid();
            }
        }
        private void CancelRow(System.Object sender, EventArgs e)
        {
            int CurrentJournalNumber = FPreviouslySelectedDetailRow.JournalNumber;

            if (FCancelLogicObject.CancelRow(FPreviouslySelectedDetailRow))
            {
                UpdateHeaderTotals(FBatchRow);
                SetFocusToDetailsGrid();
            }

            SetJournalDefaultView();
            FFilterAndFindObject.ApplyFilter();

            UpdateChangeableStatus();
            ((TFrmGLBatch)ParentForm).DisableTransactions();
        }