Example #1
0
        private bool DeleteRowManual(AAnalysisAttributeRow ARowToDelete, ref string ACompletionMessage)
        {
            bool success = false;

            try
            {
                ARowToDelete.Delete();
                success = true;
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error trying to delete current row:" + Environment.NewLine + Environment.NewLine + ex.Message);
            }

            return(success);
        }
Example #2
0
        void RemoveUnassignedRecords()
        {
            for (Int32 i = FMainDS.AAnalysisAttribute.Rows.Count; i > 0; i--)
            {
                AAnalysisAttributeRow Row = FMainDS.AAnalysisAttribute[i - 1];

                if (Row.RowState != DataRowState.Deleted)
                {
                    if (Row.AnalysisTypeCode.StartsWith("Unassigned"))
                    {
                        Row.Delete();
                    }
                }
            }

            if ((FPreviouslySelectedDetailRow != null) && (FPreviouslySelectedDetailRow.RowState == DataRowState.Detached))
            {
                FPreviouslySelectedDetailRow = null;
            }
        }
Example #3
0
        private TSubmitChangesResult StoreManualCode(ref GLSetupTDS ASubmitDS, out TVerificationResultCollection AVerificationResult)
        {
            //
            // I need to remove any AnalysisAttribute records that are still set to "Unassigned"
            //
            if ((ASubmitDS.AAnalysisAttribute != null) && (ASubmitDS.AAnalysisAttribute.Rows.Count > 0))
            {
                for (int Idx = ASubmitDS.AAnalysisAttribute.Rows.Count - 1; Idx >= 0; Idx--)
                {
                    AAnalysisAttributeRow Row = ASubmitDS.AAnalysisAttribute[Idx];

                    if ((Row.RowState != DataRowState.Deleted) && (Row.AnalysisTypeCode.IndexOf("Unassigned") == 0))
                    {
                        Row.Delete();
                    }
                }
            }

            //
            // I'll take this opportunity to remove any similar records in my own TDS
            //
            for (int Idx = FMainDS.AAnalysisAttribute.Rows.Count - 1; Idx >= 0; Idx--)
            {
                AAnalysisAttributeRow Row = FMainDS.AAnalysisAttribute[Idx];

                if ((Row.RowState != DataRowState.Deleted) && (Row.AnalysisTypeCode.IndexOf("Unassigned") == 0))
                {
                    Row.Delete();
                }
            }

            ucoAccountsTree.MarkAllNodesCommitted();
            TSubmitChangesResult ServerResult =
                TRemote.MFinance.Setup.WebConnectors.SaveGLSetupTDS(FLedgerNumber, ref ASubmitDS, out AVerificationResult);

            TDataCache.TMFinance.RefreshCacheableFinanceTable(Shared.TCacheableFinanceTablesEnum.AccountList, FLedgerNumber);
            return(ServerResult);
        }
        private bool DeleteRowManual(AAnalysisAttributeRow ARowToDelete, ref string ACompletionMessage)
        {
            bool success = false;

            try
            {
                ARowToDelete.Delete();
                success = true;
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error trying to delete current row:" + Environment.NewLine + Environment.NewLine + ex.Message);
            }

            return success;
        }