zoukankan      html  css  js  c++  java
  • C# split用法

     1string[] sss=txtQueryVal.Text.ToString().Split(new char[] {'-'});
     2
     3                    string year=sss[0].ToString();
     4                    string month=sss[1].ToString();
     5                    string day=sss[2].ToString();
     6
     7                    string selsql4="select * from OA_Worklog where Datepart(year,OA_Worklog_Day)='"+year+"'and Datepart(month,OA_W orklog_Day)='"+month+"'and Datepart(day,OA_Worklog_Day)='"+day+"'";
     8                    SqlDataAdapter sqlCom4=new SqlDataAdapter(selsql4,sqlCon);
     9                    DataSet ds=new DataSet();
    10                    sqlCom4.Fill(ds,"OA_Worklog");
    11                    DGrid_QueryResult.DataSource=ds.Tables["OA_Worklog"].DefaultView;
    12                    DGrid_QueryResult.DataKeyField="OA_Worklog_Id";
    13                    DGrid_QueryResult.DataBind();
  • 相关阅读:
    Luogu 3119 [USACO15JAN]草鉴定Grass Cownoisseur
    Luogu 4514 上帝造题的七分钟
    Luogu 1484 种树
    Luogu【P2904】跨河(DP)
    Luogu【P2065】贪心的果农(DP)
    Luogu【P1725】琪露诺(单调队列,DP)
    二分图匹配
    单调队列
    Tarjan的强联通分量
    手写堆
  • 原文地址:https://www.cnblogs.com/shf/p/343338.html
Copyright © 2011-2022 走看看