From 95c1f81fcd0f393dfb47d93d8da51ad4b70a50e7 Mon Sep 17 00:00:00 2001 From: "nodyang@aliyun.com" Date: Mon, 4 Nov 2024 09:21:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DB/Entity/Point.cs | 3 +++ RfidWeb/FromSQl.cs | 19 ++++--------------- RfidWeb/Program.cs | 4 ++-- 3 files changed, 9 insertions(+), 17 deletions(-) diff --git a/DB/Entity/Point.cs b/DB/Entity/Point.cs index d144040..09347a5 100644 --- a/DB/Entity/Point.cs +++ b/DB/Entity/Point.cs @@ -16,6 +16,9 @@ namespace DB.Entity /// plc 数据类型 bool float int bit /// public string DataType { get; set; } + + + public string FromType { get; set; } } diff --git a/RfidWeb/FromSQl.cs b/RfidWeb/FromSQl.cs index c1356bc..cbc0eb5 100644 --- a/RfidWeb/FromSQl.cs +++ b/RfidWeb/FromSQl.cs @@ -147,24 +147,13 @@ namespace RfidWeb // new PostgreSQLTableGenerator(dbContext).CreateTables(TableCreateMode.CreateNew); } + + private long GetId=> SnowflakeFactory.NewId; + private void ucBtnExt2_BtnClick(object sender, EventArgs e) { var dbContext = DbFactory.GetContext; - for (int i = 0; i < 100; i++) - { - PointLog log = new PointLog(); - log.ID = SnowflakeFactory.NewId; - log.PointName = "测试:" + i; - log.PointAddress = "DB:" + i; - log.Msg = "test:" + i; - log.CreateDate=DateTime.Now; - log.LastModifyDate=DateTime.Now; - log.LastModifyUserId = "123"; - log.CreateUserId = "123"; - - - dbContext.Insert(log); - } + } } } diff --git a/RfidWeb/Program.cs b/RfidWeb/Program.cs index fae68c3..b70d3e4 100644 --- a/RfidWeb/Program.cs +++ b/RfidWeb/Program.cs @@ -19,8 +19,8 @@ namespace RfidWeb Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); - //Application.Run(new FromSQl()); - Application.Run(new FormMain()); + Application.Run(new FromSQl()); + //Application.Run(new FormMain()); } } }