继续贴代码
来源:互联网 发布:阿里云 修改帐号密码 编辑:程序博客网 时间:2024/05/17 06:17
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
if (textBox1.Text.Equals(""))
{
return;
}
int paramcount = 0;
StringBuilder sbparam = new StringBuilder();
for (int i = 0; i < dataGridView1.RowCount; i++)
{
if (dataGridView1.Rows[i] == null)
{
continue;
}
if (dataGridView1.Rows[i].Cells[0] == null)
{
continue;
}
if (dataGridView1.Rows[i].Cells[0].Value == null)
{
continue;
}
if (dataGridView1.Rows[i].Cells[0].Value.Equals(""))
{
continue;
}
paramcount++;
sbparam.Append("<PARAMENT ID=/"");
sbparam.Append(dataGridView1.Rows[i].Cells[0].Value);
sbparam.Append("/" TYPE=/"");
sbparam.Append(dataGridView1.Rows[i].Cells[1].Value);
sbparam.Append("/" />");
}
StringBuilder sb = new StringBuilder();
sb.Append("<SQL ID=/"");
sb.Append(textBox3.Text);
sb.Append("/" PARAMCOUNT=/"");
sb.Append(paramcount);
sb.Append("/" >");
sb.Append("<STATMENT>");
sb.Append(textBox1.Text);
sb.Append("</STATMENT>");
sb.Append(sbparam);
sb.Append("</SQL>");
textBox2.Text = sb.ToString();
}
private void Form1_Load(object sender, EventArgs e)
{
DataGridViewComboBoxColumn column = (DataGridViewComboBoxColumn)dataGridView1.Columns[1];
column.Items.AddRange(Enum.GetNames(typeof(MySql.Data.MySqlClient.MySqlDbType)));
}
}
}
- 继续贴代码
- 今天继续看代码
- 继续更新第一次代码
- 继续收集代码-lucene 加亮
- 重写代码,是否还要继续?
- java 是否继续操作?代码
- 继续——课本代码练习
- 【代码生成器】自定义表单的继续完善
- 继续学习Android,跟随第一行代码
- java 使用return终止代码继续运行
- 代码走读之rtt(继续更新)
- 辞职之后,我决定继续写代码
- 继续
- 继续
- 继续
- 继续
- 继续
- 继续~~
- 我所知道的EC====>SMBUS
- config
- s3c2410 iic总线接口编程
- Java新手上路大全
- asp big5 gb2312 转 Unicode
- 继续贴代码
- Castle IOC容器内幕故事(下)
- IE 8不支持支付宝插件问题解决方法
- 清空邮件队列
- 造成HTTP-500错误,可能存在的原因小结
- PO/VO/DAO/BO/POJO是什么(JAVA几种对象的解释)
- ibm创新产品1---紫禁城游览
- ZK官方的MVC模式建议
- 如何在 Windows Server 2003、Windows 2000 和 Windows XP 中备份恢复代理的加密文件系统 (EFS) 私钥