zoukankan      html  css  js  c++  java
  • .net变量判断

        <div class="AccountLevel" style="margin-top: 15px;">
                    <span style="float: left;">账户安全等级:</span>
                    @{
                        int levelValue = 0;
                        string levelName = "低";
                        string progressBarName = "progress-bar-warning";默认橘黄色
                        if (Model.CustomerInfo != null)
                        {
                            if (Model.CustomerInfo.IsPassWord != null && Model.CustomerInfo.IsPassWord.Value)
                            {
                                levelValue += 25;
                            }
                            if (Model.CustomerInfo.IsMobile != null && Model.CustomerInfo.IsMobile.Value)
                            {
                                levelValue += 25;
                            }
                            if (Model.CustomerInfo.IsEmail != null && Model.CustomerInfo.IsEmail.Value)
                            {
                                levelValue += 25;
                            }
                            if (Model.CustomerInfo.IsIdentity != null && Model.CustomerInfo.IsIdentity.Value)
                            {
                                levelValue += 25;
                            }
                            if (levelValue >= 50 && levelValue < 75)
                            {
                                levelName = "中";
                            }
                            else if (levelValue >= 75)
                            {
                                levelName = "高";
                                progressBarName = "progress-bar-success";判断之后绿色
                            }
                        }
                        string level = levelValue + "%";
                        <div class="progress progressDiv" style="margin-top: 10px;">
                            <div class="progress-bar @progressBarName" role="progressbar"
                                            aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style=" @level; line-height: 12px;"
                                            id="accountLevel">
                                <span id="accountLevelValue">@level</span>
                            </div>
                        </div>
                        <span id="accountLevelName">@levelName</span>
                                               if (levelName != "高")
                                               {
                        <span class="Enhance"><a href="/AccountSetting/Index?tab=safety">提升</a></span>
                                               }
                    }
                </div>

  • 相关阅读:
    HDOJ 2871 Memory Control(线段树区间合并与查询)
    POJ 3468 A Simple Problem with Integers(线段树成段更新)
    POJ 2923 Relocation(状态压缩 + 两次DP)
    POJ 1436 Horizontally Visible Segments(线段树区间染色查询)
    POJ 2528 Mayor's posters(离散化的线段树)
    HDOJ 3308 LCIS(线段树区间合并与查询)
    异常处理的指导原则
    CSC命令
    .NET命名空间举例
    System.DateTime
  • 原文地址:https://www.cnblogs.com/zhouyx/p/5201474.html
Copyright © 2011-2022 走看看