zoukankan      html  css  js  c++  java
  • 时间段检索时间段

    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
  • 相关阅读:
    get ,post接口测试
    jmeter接口测试 day11
    接口笔记,day01
    python 列表、元组 达内笔记
    linux 笔记达内03
    linux 笔记达内02
    linux 笔记达内01
    Linux/Unix系统下常用的命令
    PageObjectModel页面对象模型(03)
    selenium,实现ECShop后台登录模块测试代码(2)
  • 原文地址:https://www.cnblogs.com/zecVip/p/4708347.html
Copyright © 2011-2022 走看看