• 时间段检索时间段


    if (!string.IsNullOrEmpty(starttime) && !string.IsNullOrEmpty(endtime))
                    {
                        Where.Append(" and ((t.StartTime <= @StartTime and t.EndTime >= @StartTime) or (t.StartTime <= @EndTime and t.EndTime >= @EndTime) or (t.StartTime >= @StartTime and t.EndTime <= @EndTime))");
                        ParaList.Add(new SqlParameter("@StartTime", starttime));
                        ParaList.Add(new SqlParameter("@EndTime", endtime));
                    }
                    else if (!string.IsNullOrEmpty(starttime))
                    {
                        Where.Append(" and t.StartTime <= @StartTime and t.EndTime >= @StartTime");
                        ParaList.Add(new SqlParameter("@StartTime", starttime));
                    }
                    else if (!string.IsNullOrEmpty(endtime))
                    {
                        Where.Append(" and t.StartTime <= @EndTime and t.EndTime >= @EndTime");
                        ParaList.Add(new SqlParameter("@EndTime", endtime));
                    }
    View Code
  • 相关阅读:
    zip
    sublime 3 注册码
    css3 文本控制自动换行
    ST3 package control
    cf1139D-Steps to One
    2019-2020 ACM-ICPC, Asia Xuzhou Regional Contest
    2018-2019 ACM-ICPC, Asia Jiaozuo Regional Contest
    Tree
    B
    多源对多源最短路
  • 原文地址:https://www.cnblogs.com/zecVip/p/4708347.html
Copyright © 2020-2023  润新知