StringBuilder tempSB = new StringBuilder();
            DataTable tempDT =  dba.GetTable("select newid() Gid,BusID,SecId,SecName,BusName,remark from tbl_BuTmp");
            string Bid = "", BCode, SId, SName, PBName, Rmark;
            for (int i = 0; i < tempDT.Rows.Count; i++)
            {
                Bid = Common.StringOperator.GetRightString(tempDT.Rows[i]["Gid"]);
                BCode = Common.StringOperator.GetRightString(tempDT.Rows[i]["BusID"]);
                SId = Common.StringOperator.GetRightString(tempDT.Rows[i]["SecId"]);
                SName = Common.StringOperator.GetRightString(tempDT.Rows[i]["SecName"]);
                PBName = Common.StringOperator.GetRightString(tempDT.Rows[i]["BusName"]);
                Rmark = Common.StringOperator.GetRightString(tempDT.Rows[i]["remark"]);
                foreach (string tempRemark in Rmark.Split(';'))
                {
                    tempSB.AppendFormat("insert into tbl_ProB(ProBusinessID,BusinessFlowCode,SectionID,SectionName,ProBusinessName,Remark) values('{0}','{1}','{2}','{3}','{4}','{5}')" + System.Environment.NewLine, System.Guid.NewGuid(), BCode, SId, SName, tempRemark, tempRemark);
                }
               
            }
            this.richTextBox1.Text = tempSB.ToString();
            this.dataGridView1.DataSource=tempDT;
posted on 2011-04-08 16:25 sanmao 阅读(337) 评论(0)  编辑  收藏

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


网站导航:
 

常用链接

留言簿(5)

随笔分类

随笔档案

搜索

  •  

最新评论

阅读排行榜

评论排行榜