private void button11_Click(object sender, EventArgs e) { Dictionary <string, string> dic = GetCurrentRow(); if (dic == null) { return; } StringBuilder sb = new StringBuilder(); sb.Append("UPDATE <table> SET "); foreach (KeyValuePair <string, string> p in dic) { sb.Append(p.Key).Append("='").Append(p.Value).Append("',"); } string str = sb.ToString().TrimEnd(','); str += " WHERE"; FormDBScript frm = new FormDBScript(str); if (frm.ShowDialog(this) != DialogResult.OK) { return; } if (frm.Clear) { this.textBox2.Text = frm.Script; } else { this.textBox2.Text += frm.Script; } }
private void button12_Click(object sender, EventArgs e) { //decimal d = 10; //MessageBox.Show(((int)d).ToString(this.textBox2.Text)); //return; FormDBScript frm = new FormDBScript(""); if (frm.ShowDialog(this) != DialogResult.OK) { return; } if (frm.Clear) { this.textBox2.Text = frm.Script; } else { this.textBox2.Text += frm.Script; } }