You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.4 KiB
43 lines
1.4 KiB
5 months ago
|
using DyeingComputer.ViewModel;
|
||
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Data;
|
||
|
using System.IO;
|
||
|
using System.Linq;
|
||
|
using static DyeingComputer.UserClass.SqliteHelper;
|
||
|
using static System.Windows.Forms.VisualStyles.VisualStyleElement.TaskbarClock;
|
||
|
|
||
|
namespace DyeingComputer.UserClass
|
||
|
{
|
||
|
public class ERRinf
|
||
|
{
|
||
|
public static void ERRinf_i(DataTable dataTable)
|
||
|
{
|
||
|
dataTable.Columns.Add("ID", Type.GetType("System.String"));
|
||
|
dataTable.Columns.Add("INF", Type.GetType("System.String"));
|
||
|
dataTable.Columns.Add("Time", Type.GetType("System.String"));
|
||
|
}
|
||
|
public static void ERRinf_w(DataTable dataTable,string dat,string ID)//写入
|
||
|
{
|
||
|
int i = dataTable.Select("INF='" + dat+ "'").Length;
|
||
|
if (i == 0)
|
||
|
{
|
||
|
dataTable.Rows.Add(ID,dat, DateTime.Now.ToString("yyMMddHHmmss"));
|
||
|
}
|
||
|
}
|
||
|
public static void ERRinf_d(DataTable dataTable, string dat)//删除
|
||
|
{
|
||
|
int i = dataTable.Select("ID='" + dat + "'").Length;
|
||
|
if (i != 0)
|
||
|
{
|
||
|
dataTable.Rows.Remove(dataTable.Select("ID='" + dat + "'").First());
|
||
|
}
|
||
|
}
|
||
|
public static string ERRinf_r(DataTable dataTable)//读取
|
||
|
{
|
||
|
string index = dataTable.Rows[0].Field<string>("INF");
|
||
|
return index;
|
||
|
}
|
||
|
}
|
||
|
}
|