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.
25 lines
701 B
C#
25 lines
701 B
C#
using Rs.DataAccess;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Rs.MotionPlat.Commom
|
|
{
|
|
public class AlarmManager
|
|
{
|
|
static SqliteHelper db = new SqliteHelper();
|
|
/// <summary>
|
|
/// 添加报警信息到数据库
|
|
/// </summary>
|
|
/// <param name="content"></param>
|
|
/// <returns></returns>
|
|
public static bool Add(string content)
|
|
{
|
|
string insertSql = $"insert into alarm(content,createtime) values('{content}','{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss fff")}')";
|
|
return db.ExecuteNonQuery(insertSql) > 0;
|
|
}
|
|
}
|
|
}
|