public string GetReturnString(DataTable tempDT, int tempColumn)
        {
            string tempStr = "";
            if (!object.Equals(tempDT, null))
            {
                if (tempDT.Rows.Count > 0)
                {
                    for (int i = 0; i < tempDT.Rows.Count; i++)
           {
                        if (tempColumn > tempDT.Columns.Count)
                            tempColumn = tempDT.Columns.Count;
                        for (int c = 0; c <tempColumn ;c++ )
                        {
                            tempStr += Common.StringOperator.GetRightString(tempDT.Rows[i][c]) + ",";
                        }
                        tempStr = tempStr.TrimEnd(',');
                        tempStr += "~$~";
           }
                   
                }
                else
                {
                    tempStr = "null";
                }
            }
            else
            {
                tempStr = "null";
            }
            return tempStr;
        }
posted on 2011-01-25 09:38 sanmao 阅读(208) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航:
 

常用链接

留言簿(5)

随笔分类

随笔档案

搜索

  •  

最新评论

阅读排行榜

评论排行榜