批量获取内码

来源:互联网 发布:apache phoenix 编辑:程序博客网 时间:2024/06/17 12:58


            StringBuilder ids = new StringBuilder();
            string bxgxNM = string.Empty;
            if (dsBXGX != null && dsBXGX.Tables.Count > 0 && dsBXGX.Tables[0].Rows.Count > 0)
            {
                ids.Capacity = 39 * dsBXGX.Tables[0].Rows.Count;
                for (int i = 0; i < dsBXGX.Tables[0].Rows.Count; i++)
                {
                    ids.AppendFormat("'{0}',", dsBXGX.Tables[0].Rows[i]["GX_YGNM"].ToString());
                }
                ids.Replace(',', ' ', ids.Length - 1, 1);
                bxgxNM = ids.ToString();
            }

0 0
原创粉丝点击