zoukankan      html  css  js  c++  java
  • winform批量查询单号剔除重复

      //查询分单函数
            private string GetQueryInSubbillNo()
            {
                string strSubbillNO = "";
                string strOutput = "";
                foreach (DataGridViewRow dgvRow in dgvRecieveProducts.Rows)
                {
                    strSubbillNO += "'" + dgvRow.Cells["dgvSubbillNO"].Value.ToString() + "',";
                }
                if (dgvRecieveProducts.Rows.Count > 0)
                {
                    string strinput = strAddSubbillNo + strSubbillNO.Substring(0, strSubbillNO.Length - 1);
                    Array stringArray = strinput.Split(',');
                    List<string> listString = new List<string>();
                    //遍历删除重复项
                    foreach (string eachString in stringArray)
                    {
                        if (!listString.Contains(eachString)) //确定是否存在,存在跳过
                            listString.Add(eachString);
                    }
                    foreach (string subbillNo in listString)   //筛选值
                    {
                        strOutput += subbillNo + ",";
                    }
                    return strOutput.Substring(0, strOutput.Length - 1);
                }
                else { return ""; }
            }                                                                                                          

  • 相关阅读:
    性能测试相关概念
    java -json()
    jquery ajax 前前后后,所有的函数并查询链接
    jquery ajax get /post
    jquery ajax load
    三个重要属性
    发送请求
    处理返回结果(XML)
    处理返回结果
    调用对象
  • 原文地址:https://www.cnblogs.com/quanxie/p/3177388.html
Copyright © 2011-2022 走看看