zoukankan      html  css  js  c++  java
  • 关于switch

     /*
             *  <asp:RadioButtonList ID="rblState" RepeatDirection="horizontal" runat="server">
                <asp:ListItem Text="所有" Selected="true" Value="所有"></asp:ListItem>
                <asp:ListItem Text="已完成核销" Value="已完成核销"></asp:ListItem>
                <asp:ListItem Text="未完成核销" Value="未完成核销"></asp:ListItem>
                </asp:RadioButtonList>
             * 
             * 
             * 
             
    */


            
    switch (rblState.SelectedIndex.ToString())
            
    {
                
    case "1":
                    strSql 
    += " and dbo.INV_MAIN.AMOUNT_WHX=0 ";
                    
    break;
                
    case "2":
                    strSql 
    += " and dbo.INV_MAIN.AMOUNT_WHX!=0";
                    
    break;
                
    default:
                    
    break;
            }
    <asp:ListItem>的索引从零开始,默认<asp:ListItem Text="所有" Selected="true" Value="所有"></asp:ListItem>
    是选中的,default就不需要加进strSql任何内容。
  • 相关阅读:
    PHP PDO
    常用JavaScript字符串方法简述
    命名
    jquery远程班备忘
    html历史
    CSS3的翻转效果
    正则
    排序算法
    firebug的调试,console
    跨域
  • 原文地址:https://www.cnblogs.com/simhare/p/855726.html
Copyright © 2011-2022 走看看