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

77 lines
2.1 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
2 weeks ago
// new PostgreSQLTableGenerator(dbContext).CreateTables(TableCreateMode.CreateIfNotExists);
Dictionary<string, string> dic = new Dictionary<string, string>();
dic["feeding_motor_speed"] = "供料电机速度";
dic["Laminated_motor_speed"] = "层合电机速度";
dic["Felt_belt_motor_speed"] = "毛毡带电机速度";
dic["Receiving_Electric_motor_speed"] = "收料电机1&2速度";
dic["Product_counter2"] = "层合生产数量";
dic["CQ_Chip1_counter"] = "裁切1生产数量";
dic["CQ_Chip2_counter"] = "裁切2生产数量";
dic["QDWD1SS"] = "裁刀1温度";
dic["QDWD2SS"] = "裁刀2温度";
dic["QDWD2SS"] = "裁刀2温度";
foreach (var ee in dic)
{
Point point = new Point();
point.DataType = "Uint32";
point.FromType = "参数";
point.PointAddress = ee.Key;
point.PointName=ee.Value;
point.ID = GetId;
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
}
}