You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.4 KiB
C#
43 lines
1.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Windows.Forms;
|
|
using WorkData;
|
|
using WorkData.Entity;
|
|
|
|
namespace DQ.Construction.NewLook.DataManager
|
|
{
|
|
public partial class frmCreateColumn : Form
|
|
{
|
|
string tableName = string.Empty;
|
|
public frmCreateColumn(List<TableInfo> tableInfos, string tableName)
|
|
{
|
|
InitializeComponent();
|
|
this.tableName = tableName;
|
|
this.gridControl1.DataSource = tableInfos;
|
|
}
|
|
private void button1_Click(object sender, EventArgs e)
|
|
{
|
|
int[] rows = this.gridView1.GetSelectedRows();
|
|
foreach (int row in rows)
|
|
{
|
|
var info = this.gridView1.GetRow(row) as TableInfo;
|
|
TableInfo tableInfo = new TableInfo()
|
|
{
|
|
TableName = this.tableName,
|
|
ColumnType = "文本",
|
|
ChineseName = info.ColumnName,
|
|
ColumnWidth = "100",
|
|
ColumnName = info.ColumnName,
|
|
IsMust = "否",
|
|
OrderBy = 999,
|
|
ShowDigit = string.Empty,
|
|
ShowLength = "999",
|
|
Show = "是",
|
|
};
|
|
DBHelp.NewDb.Insertable(tableInfo).ExecuteCommand();
|
|
}
|
|
this.Close();
|
|
}
|
|
}
|
|
}
|