首页 > 其他 > 详细

页面中查询条件可输入多个的处理办法

时间:2021-04-05 12:28:45      阅读:15      评论:0      收藏:0      [点我收藏+]

当文本框可以输入多个值时,后台需要根据多个值进行查询可以使用in语句,前台进行拼接格式

  #region 按周交货标志

                string delivy_week_code = this.delivy_week.EditValue.ToString().Trim();
                if (delivy_week_code.Length > 0)
                {
                    string[] str = delivy_week_code.Split(,);
                    for (int i = 0; i < str.Length; i++)
                    {
                        if (i < str.Length - 1)
                        {
                            str_value += "" + str[i].Trim() + "‘,";
                        }
                        else
                        {
                            str_value += "" + str[i].Trim() + "";
                        }
                    }
                }

                #endregion
//按周交货标志
        if (delivy_week.GetLength() > 0)
        {
            sqlwhere += " AND A.DELIVY_WEEK_FLAG IN(" + delivy_week + " )";
        }

 

页面中查询条件可输入多个的处理办法

原文:https://www.cnblogs.com/yjy1412/p/14617783.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!