SQLiteApplication/CreateTableForm.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using SQLiteApplication.DB;
namespace SQLiteApplication
{
public partial class CreateTableForm : Form
{
public CreateTableForm()
{
InitializeComponent();
}
DB.DatabaseHelper dbHelper = new DB.DatabaseHelper();
private string dbName;
public string DB_NAME
{
get { return dbName; }
set { dbName = value; }
}
private void CreateTableForm_Load(object sender, EventArgs e)
{
label_DBName.Text = dbName;
setListBox_TableList();
}
private void setListBox_TableList()
{
listBox_tableList.Items.Clear();
List<string> tableList = dbHelper.executeReader("select name from sqlite_master where type='table'");
foreach (string table in tableList)
{
listBox_tableList.Items.Add(table);
}
}
private void button_save_Click(object sender, EventArgs e)
{
Dictionary<string, string> col_Type = new Dictionary<string, string>();
for (int i = 0; i < dataGridView1.Rows.Count; i++)
{
var col = dataGridView1.Rows[i].Cells["字段"].Value;
var type = dataGridView1.Rows[i].Cells[1].Value;
if (col != null && col.ToString().Trim() != "" && type != null)
{
col_Type.Add(col.ToString(), type.ToString());
}
}
后面还有 41 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
