Files
xuyueandClaude Opus 5.5 670abe5921
CI/CD / test (push) Canceled after 0s
CI/CD / deploy (push) Canceled after 0s
项目 6 数据存储:仿冒 SqlClient(T-SQL 转写成 SQLite)、数据库页面、DataGridView、DateTimePicker
- 每个学生一套数据库,长期保存(data/databases/<用户编号>/库名.db);学生程序运行时挂进沙箱可读写
- Sim.Data:SqlConnection / SqlCommand / SqlDataReader / SqlDataAdapter / SqlCommandBuilder / SqlParameter;
  连接字符串只按库名打开学生自己的库;ScriptDom 解析 T-SQL 后按白名单转写成 SQLite 语句,
  STRICT 表 + 元数据表还原 SQL Server 的列类型,报错编号和中文信息与 SQL Server 一致;
  INSERT 不写列名时跳过自增列,日期统一格式(书上 DateTime.ToString() 拼接的日期能正确比较)
- 常驻 SQL 服务(Sim.Runner sql-server):数据库页面的查询、对象资源管理器,评分前按实验 database.sql 建库
- 数据库页面(代替 SSMS):对象资源管理器、查询窗口、编辑前 200 行、表设计器、恢复实验初始数据
- DataGridView(绑定 DataView/DataTable/DataSet,单元格修改写回 DataTable)、DateTimePicker;设计器工具箱加入
- 评分:每个检查项一份新建的实验库;新增点 / 修改表格单元格、选日期、表格里有 / 没有某行的检查
- 示例:项目 6 任务 2、3;时间格式改成和中文 Windows 一致(9:05:03);异常堆栈不暴露服务器路径
- 测试:数据库端到端、接口(每人只看到自己的库、恢复实验数据)、评分出错情况、T-SQL 生成

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 09:18:56 +08:00

139 lines
5.7 KiB
C#

namespace 校园数据存储
{
partial class Form1
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.btnCx = new System.Windows.Forms.Button();
this.LblStartTime = new System.Windows.Forms.Label();
this.LblEndTime = new System.Windows.Forms.Label();
this.StartTime = new System.Windows.Forms.DateTimePicker();
this.EndTime = new System.Windows.Forms.DateTimePicker();
this.groupBox4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.SuspendLayout();
//
// groupBox4
//
this.groupBox4.Controls.Add(this.dataGridView1);
this.groupBox4.Location = new System.Drawing.Point(1, 52);
this.groupBox4.Margin = new System.Windows.Forms.Padding(2);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Padding = new System.Windows.Forms.Padding(2);
this.groupBox4.Size = new System.Drawing.Size(642, 283);
this.groupBox4.TabIndex = 3;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "历史记录";
//
// dataGridView1
//
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Location = new System.Drawing.Point(4, 17);
this.dataGridView1.Margin = new System.Windows.Forms.Padding(2);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.RowTemplate.Height = 27;
this.dataGridView1.Size = new System.Drawing.Size(634, 261);
this.dataGridView1.TabIndex = 0;
//
// btnCx
//
this.btnCx.Location = new System.Drawing.Point(541, 19);
this.btnCx.Name = "btnCx";
this.btnCx.Size = new System.Drawing.Size(79, 23);
this.btnCx.TabIndex = 4;
this.btnCx.Text = "查询";
this.btnCx.UseVisualStyleBackColor = true;
this.btnCx.Click += new System.EventHandler(this.btnCx_Click);
//
// LblStartTime
//
this.LblStartTime.AutoSize = true;
this.LblStartTime.Location = new System.Drawing.Point(25, 23);
this.LblStartTime.Name = "LblStartTime";
this.LblStartTime.Size = new System.Drawing.Size(53, 12);
this.LblStartTime.TabIndex = 5;
this.LblStartTime.Text = "开始日期";
//
// LblEndTime
//
this.LblEndTime.AutoSize = true;
this.LblEndTime.Location = new System.Drawing.Point(272, 25);
this.LblEndTime.Name = "LblEndTime";
this.LblEndTime.Size = new System.Drawing.Size(53, 12);
this.LblEndTime.TabIndex = 6;
this.LblEndTime.Text = "结束日期";
//
// StartTime
//
this.StartTime.Location = new System.Drawing.Point(84, 19);
this.StartTime.Name = "StartTime";
this.StartTime.Size = new System.Drawing.Size(136, 21);
this.StartTime.TabIndex = 7;
//
// EndTime
//
this.EndTime.Location = new System.Drawing.Point(358, 19);
this.EndTime.Name = "EndTime";
this.EndTime.Size = new System.Drawing.Size(148, 21);
this.EndTime.TabIndex = 8;
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(654, 346);
this.Controls.Add(this.EndTime);
this.Controls.Add(this.StartTime);
this.Controls.Add(this.LblEndTime);
this.Controls.Add(this.LblStartTime);
this.Controls.Add(this.btnCx);
this.Controls.Add(this.groupBox4);
this.Margin = new System.Windows.Forms.Padding(2);
this.Name = "Form1";
this.Text = "查询校园灾情数据";
this.groupBox4.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.Button btnCx;
private System.Windows.Forms.Label LblStartTime;
private System.Windows.Forms.Label LblEndTime;
private System.Windows.Forms.DateTimePicker StartTime;
private System.Windows.Forms.DateTimePicker EndTime;
}
}