C#技术百科
问问你的心你有没有信心 做事情要专一坚定,执着
 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  王德田  阅读(272)  评论(0编辑  收藏  举报