zoukankan      html  css  js  c++  java
  • DropDownList下拉控件

     <asp:DropDownList    ID="DropDownList1" runat="server" Width="177px">      --拖动控件进入
                <asp:ListItem   Value="0">ALL</asp:ListItem>                                         --编辑项,Text , Value
                <asp:ListItem   Value="1">未處理</asp:ListItem>
                <asp:ListItem   Value="2">主管退件</asp:ListItem>
     </asp:DropDownList>

    protected   void   gvMasterBind()

    {

      try

           {

        string v_dept = ddlDept.SelectedValue;

          string where = " " ;

              if(v_dept !="ALL")

        {

          where += " and  a.OrgID= ' " +v_dept+" ' " ;

         }

                    DataTable dt = new DataTable();

         if (rblSKStatus.SelectedValue == "0")                  --rblSKStatus為RadioButtonList控件的名稱

        {

          dt=Coeno.RSN.RSNFormSK.GetSK_ThisYear(where, v_Status);   --命名空间名,类名,方法名

        }

            }

    }

     public static DataTable GetSK_ThisYear(string where, string Status)

    {

      string sql = " "

           SqlConnectio con = new SqlConnection(_connectionString);

           SqlDataAdapter dad = new SqlDataAdapter(sql,con);

         DataSet dst = new DataSet();

          try        

         {  con.Open();          

            dad.Fill(dst, "GetSK_ThisYear");  

          }            

          catch (SqlException e)     

          {               

                // Handle exception.                

               throw new Exception(e.Message);       

          }        

         finally          

       {         

             con.Close();        

        }

         return dst.Tables[0];

    }

  • 相关阅读:
    [BJOI2012]最多的方案(记忆化搜索)
    our happy ending(状压dp)
    [NOI2005]聪聪与可可(期望dp)
    CF983A Finite or not?(数学)
    [POI2012]STU-Well(二分答案+神仙操作)
    作诗2(玄学)
    IncDec Sequence(差分)
    [Vani有约会]雨天的尾巴(树上差分+线段树合并)
    合法括号序列(dp+组合数学)
    [SHOI2014]概率充电器(概率+换根dp)
  • 原文地址:https://www.cnblogs.com/ximi07/p/10372877.html
Copyright © 2011-2022 走看看