コード例 #1
0
    public String getAccountMenu()
    {
        StringBuilder sb = new StringBuilder();
        MasterAccount = Account.getMyAccount(Utility.theUser.AccountID, Utility.theUser.signature);
        try
        {
            MasterAccount.loadAllSubAccounts();
            if (MasterAccount.subAccounts != null)
            {
                foreach (Account acc in MasterAccount.subAccounts)
                {
                    accounsMenus.InnerHtml += renderAccountLink(acc);
                }
            }
            else
            {
                accounsMenus.InnerHtml += "<li>" + dic.getResource(314) + "</li>";
            }
        }
        catch {
            return "---";
        }

        return sb.ToString();
    }
コード例 #2
0
ファイル: Account.aspx.cs プロジェクト: JCanhoto/ToolsQtools
    //ACESSO CONTROLADOS
    public String getsubAccountsMenu()
    {
        StringBuilder sb = new StringBuilder();
        if (Utility.theUser.AccessMenu(Utility.SUB_ACCOUNTS, Utility.READ))
        {
            MasterAccount = Account.getMyAccount(Utility.theUser.AccountID, Utility.theUser.owner);
            sb.Append("<div class=\"micro\" id=\"subaccountsMenu\">");
            sb.AppendFormat("<h4><span>{0}</span></h4>", dic.getResource(232));
            sb.Append("<ul class=\"sub_section cf\" id=\"subAccounsMenus\" >");
            try
            {
                MasterAccount.loadAllSubAccounts();
                if (MasterAccount.subAccounts != null)
                {
                    foreach (Account acc in MasterAccount.subAccounts)
                    {
                        sb.Append(renderAccountLink(acc));
                    }
                }
                else
                {
                    sb.Append("<li>" + dic.getResource(314) + "</li>");
                }
            }
            catch
            {
                return "---";
            }

            sb.Append("</ul>");
            sb.Append("</div>");
        }
        return sb.ToString();
    }