• C# 拼接字符串


                string[] s_array = Convert.ToString(hsParams[WIP_CUSTCHECK_FIELDS.FIELDS_DEVICENUM]).Split(',');
                        string devicenums = string.Empty;
                        foreach (string s in s_array)
                        {
                            devicenums += "'" + s.Trim() + "',";
                        }
                        if (!string.IsNullOrEmpty(devicenums))
                        {
                            devicenums = devicenums.TrimEnd(',');
                            sqlCommand.AppendFormat(" and t2." + WIP_CUSTCHECK_FIELDS.FIELDS_DEVICENUM + " in ({0})", devicenums);
                        }
     //终检时间
                    if (hsParams.ContainsKey(WIP_CUSTCHECK_FIELDS.FIELDS_CREATE_TIME + "1") && hsParams.ContainsKey(WIP_CUSTCHECK_FIELDS.FIELDS_CREATE_TIME + "2"))
                    {
                        sqlCommand.AppendFormat(" and t2." + WIP_CUSTCHECK_FIELDS.FIELDS_CREATE_TIME + " between CONVERT(datetime,'{0}') and CONVERT(datetime,'{1}')",
                            Convert.ToString(hsParams[WIP_CUSTCHECK_FIELDS.FIELDS_CREATE_TIME + "1"]),
                            Convert.ToString(hsParams[WIP_CUSTCHECK_FIELDS.FIELDS_CREATE_TIME + "2"]));
                        blCustCheck = true;
                    }
                    else if (hsParams.ContainsKey(WIP_CUSTCHECK_FIELDS.FIELDS_CREATE_TIME + "1"))
                    {
                        sqlCommand.AppendFormat(" and t2." + WIP_CUSTCHECK_FIELDS.FIELDS_CREATE_TIME + ">=CONVERT(datetime,'{0}')", Convert.ToString(hsParams[WIP_CUSTCHECK_FIELDS.FIELDS_CREATE_TIME + "1"]));
                        blCustCheck = true;
                    }
                    else if (hsParams.ContainsKey(WIP_CUSTCHECK_FIELDS.FIELDS_CREATE_TIME + "2"))
                    {
                        sqlCommand.AppendFormat(" and t2." + WIP_CUSTCHECK_FIELDS.FIELDS_CREATE_TIME + "<=CONVERT(datetime,'{0}')", Convert.ToString(hsParams[WIP_CUSTCHECK_FIELDS.FIELDS_CREATE_TIME + "2"]));
                        blCustCheck = true;
                    }
  • 相关阅读:
    使用transfor让图片旋转
    block与inline,inline和inline-block,块级和行内元素,行内替换和行内非替换元素
    使用classList来实现两个按钮样式的切换
    关于css透明度的问题
    级动(两级联动)思路分享
    js图片预览(一张图片预览)
    js关于密码框强弱度的提示
    javascript对象与实例
    javascript 逻辑运算符
    Raphael画圆弧
  • 原文地址:https://www.cnblogs.com/ChineseMoonGod/p/5552853.html
Copyright © 2020-2023  润新知