From 1bf10354c121af168e0a2be685a3392a180d9896 Mon Sep 17 00:00:00 2001 From: forget-the-bright Date: Thu, 27 Jul 2023 14:25:34 +0800 Subject: [PATCH] t --- DatabasetoEntityclass/Form1.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DatabasetoEntityclass/Form1.cs b/DatabasetoEntityclass/Form1.cs index 48fc7b3..a60fff7 100644 --- a/DatabasetoEntityclass/Form1.cs +++ b/DatabasetoEntityclass/Form1.cs @@ -226,7 +226,7 @@ namespace WindowsFormsApp1 } string uidatagridview = textBox2.Text.Trim(); textBox1.Text = $"this.{uidatagridview}.AutoGenerateColumns = false;"; - textBox1.Text += "List cols = new List();\n"; + textBox1.Text += "List cols = new List();\n\n"; for (int i = 0; i < dt.Rows.Count; i++) { var Name = dt.Rows[i]["Name"].ToString(); @@ -235,7 +235,7 @@ namespace WindowsFormsApp1 textBox1.Text += $"{Name}Cloumn.Name = \"{Name}\";" + $"{Name}Cloumn.HeaderText =\"{IsNullable}\";" + $"{Name}Cloumn.DataPropertyName = \"{Name}\";" + - $"cols.Add({Name}Cloumn);\n"; + $"cols.Add({Name}Cloumn);\n\n"; } textBox1.Text += "DataGridViewButtonColumn editBtn = new DataGridViewButtonColumn();\r\n" + "editBtn.HeaderText = \"编辑\";\r\n" +