Ejemplo n.º 1
0
        /// <summary>
        /// Shows the readonly details.
        /// </summary>
        /// <param name="account">The account.</param>
        private void ShowReadonlyDetails(FinancialAccount account)
        {
            SetEditMode(false);

            hfAccountId.SetValue(account.Id);
            lActionTitle.Text        = account.Name.FormatAsHtmlTitle();
            hlInactive.Visible       = !account.IsActive;
            lAccountDescription.Text = account.Description;

            DescriptionList leftDescription = new DescriptionList();

            leftDescription.Add("Public Name", account.PublicName);
            leftDescription.Add("Campus", account.Campus != null ? account.Campus.Name : string.Empty);
            leftDescription.Add("GLCode", account.GlCode);
            leftDescription.Add("Is Tax Deductible", account.IsTaxDeductible);
            lLeftDetails.Text = leftDescription.Html;

            var followingsFromDatabase  = GetAccountParticipantStateFromDatabase().OrderBy(a => a.PersonFullName).ToList();
            var accountParticipantsHtml = followingsFromDatabase.Select(a => $"{a.PersonFullName} ({a.PurposeKeyDescription})").ToList().AsDelimited("<br>\n");

            DescriptionList rightDescription = new DescriptionList();

            rightDescription.Add("Account Participants", accountParticipantsHtml);
            lRightDetails.Text = rightDescription.Html;

            account.LoadAttributes();
            Helper.AddDisplayControls(account, Helper.GetAttributeCategories(account, true, false), phAttributesView, null, false);
        }
        /// <summary>
        /// Shows the readonly details.
        /// </summary>
        /// <param name="account">The account.</param>
        private void ShowReadonlyDetails( FinancialAccount account )
        {
            SetEditMode( false );

            hfAccountId.SetValue( account.Id );
            lActionTitle.Text = account.Name.FormatAsHtmlTitle();
            hlInactive.Visible = !account.IsActive;
            lAccountDescription.Text = account.Description;

            DescriptionList leftDescription = new DescriptionList();
            leftDescription.Add( "Public Name", account.PublicName );
            leftDescription.Add( "Campus", account.Campus != null ? account.Campus.Name : string.Empty );
            leftDescription.Add( "GLCode", account.GlCode );
            leftDescription.Add( "Is Tax Deductible", account.IsTaxDeductible );
            lLeftDetails.Text = leftDescription.Html;
            account.LoadAttributes();
            Helper.AddDisplayControls( account, Helper.GetAttributeCategories( account, true, false ), phAttributesView, null, false );
        }