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.
CaiQie/RfidWeb/FromSQl.cs

92 lines
2.7 KiB
C#

3 weeks ago

1 month ago
using DB.Entity;
using DB;
using System;
using System.Collections.Generic;
using System.Windows.Forms;
3 weeks ago
using Chloe.PostgreSQL.DDL;
using Chloe.RDBMS.DDL;
1 month ago
using Tool;
2 weeks ago
using DB.Service;
2 weeks ago
using Tool.Model;
1 month ago
namespace RfidWeb
{
public partial class FromSQl : Form
{
public FromSQl()
{
InitializeComponent();
3 weeks ago
4 weeks ago
1 month ago
}
private void ucBtnExt1_BtnClick(object sender, EventArgs e)
{
//DbInfo.Init(typeof(RoleMapper).Assembly);
DbInfo.Init(typeof(UserInfo).Assembly);
2 weeks ago
var rfidSetting = RfidSetting.Current;
1 month ago
var dbContext = DbFactory.GetContext;
2 weeks ago
1 week ago
new PostgreSQLTableGenerator(dbContext).CreateTables(TableCreateMode.CreateIfNotExists);
2 weeks ago
1 week ago
Dictionary<string, string> dic = new Dictionary<string, string>
{
["CUTTING_SET_TEMPERATURE1_1"] = "裁刀1温度设定1",
["CUTTING_SET_TEMPERATURE1_2"] = "裁刀1温度设定2",
["CUTTING_SET_TEMPERATURE1_3"] = "裁刀1温度设定3",
["CUTTING_SET_TEMPERATURE1_4"] = "裁刀1温度设定4",
["CUTTING_SET_TEMPERATURE2_1"] = "裁刀2温度设定1",
["CUTTING_SET_TEMPERATURE2_2"] = "裁刀2温度设定2",
["CUTTING_SET_TEMPERATURE2_3"] = "裁刀2温度设定3",
["CUTTING_SET_TEMPERATURE2_4"] = "裁刀2温度设定4",
["CUTTING_SET_TIME1_1"] = "裁刀1时间设定1",
["CUTTING_SET_TIME1_2"] = "裁刀1时间设定2",
["CUTTING_SET_TIME1_3"] = "裁刀1时间设定3",
["CUTTING_SET_TIME1_4"] = "裁刀1时间设定4",
["CUTTING_SET_TIME2_1"] = "裁刀2时间设定1",
["CUTTING_SET_TIME2_2"] = "裁刀2时间设定2",
["CUTTING_SET_TIME2_3"] = "裁刀2时间设定3",
["CUTTING_SET_TIME2_4"] = "裁刀2时间设定4",
};
foreach (KeyValuePair<string, string> k in dic)
{
Point point = new Point();
point.ID = SnowflakeFactory.NewId;
point.DataType = "Uint32";
point.FromType = "参数";
point.PointAddress = k.Key;
point.PointName = k.Value;
dbContext.Insert(point);
}
2 weeks ago
1 month ago
}
1 month ago
3 weeks ago
private long GetId=> SnowflakeFactory.NewId;
1 month ago
private void ucBtnExt2_BtnClick(object sender, EventArgs e)
{
2 weeks ago
DbInfo.Init(typeof(UserInfo).Assembly);
UpdateLogService service = new UpdateLogService();
service.AddOrUpdateLog(TestFactory.TestUser(), "test", 1);
3 weeks ago
1 month ago
}
1 month ago
}
}