Example #1
0
    private void InitSuballocation(bool setData)
    {
        this.TextThisAccountBudget.Text = (_account.GetBudgetCents(_year) / 100).ToString("N0", new CultureInfo(_account.Organization.DefaultCountry.Culture));
        this.LabelThisAccountName.Text  = _account.Name;
        this.TextThisAccountBudget.Style[HtmlTextWriterStyle.TextAlign] = "right";
        this.TextThisAccountBudget.Style[HtmlTextWriterStyle.Width]     = "150px";

        FinancialAccounts accounts = _account.Children;

        AccountBudgetLines childData = new AccountBudgetLines();

        foreach (FinancialAccount account in accounts)
        {
            childData.Add(new AccountBudgetLine(account, _year));
        }

        _initializingBudgets = setData;

        this.RepeaterAccountNames.DataSource = childData;
        this.RepeaterAccountNames.DataBind();

        this.RepeaterBudgetTextBoxes.DataSource = childData;
        this.RepeaterBudgetTextBoxes.DataBind();

        this.RepeaterBudgetOwners.DataSource = childData;
        this.RepeaterBudgetOwners.DataBind();

        this.ButtonReallocate.Enabled = accounts.Count > 0 ? true : false;

        // this.TooltipManager.TargetControls.Add(this.LabelThisAccountOwner.ClientID, "1", true);
    }
Example #2
0
    void PersonDetail_PersonChanged(object sender, EventArgs e)
    {
        // Here, an owner has changed. We need to re-bind the owners column.

        FinancialAccounts  accounts  = _account.Children;
        AccountBudgetLines childData = new AccountBudgetLines();

        foreach (FinancialAccount account in accounts)
        {
            childData.Add(new AccountBudgetLine(account, _year));
        }

        this.RepeaterBudgetOwners.DataSource = childData;
        this.RepeaterBudgetOwners.DataBind();

        RebindTooltips();
    }