异常显示添加错误信息轮询显示
This commit is contained in:
commit
bf161904a9
5 files changed
+29
-23
No files matched your search
@@ -70,6 +70,16 @@ namespace DyeingComputer.UserClass
|
||||
LOGDB("IOLog", API_LOG);//行插入
|
||||
API_LOG.Clear();
|
||||
}
|
||||
public static void ERRlog(string WorkOrder, string ERRID, string MESSAGE, string Time)
|
||||
{
|
||||
Dictionary<string, object> API_LOG = new Dictionary<string, object>();//缓存函数
|
||||
API_LOG.Add("NAME", WorkOrder);
|
||||
API_LOG.Add("ERRID", ERRID);
|
||||
API_LOG.Add("MESSAGE", MESSAGE);
|
||||
API_LOG.Add("TIME", Time);
|
||||
LOGDB("ERRLog", API_LOG);//行插入
|
||||
API_LOG.Clear();
|
||||
}
|
||||
|
||||
public static void LOGDB(string NAME, Dictionary<string, object> dat)//添加信息到队列
|
||||
{
|
||||
|
||||
+5
-1
@@ -23,6 +23,7 @@ namespace DyeingComputer.UserClass
|
||||
if (i == 0)
|
||||
{
|
||||
dataTable.Rows.Add(ID,dat, DateTime.Now.ToString("yyMMddHHmmss"));
|
||||
APILog.ERRlog(MainWindowViewModel.WorkNumder.ToString(),ID,dat, DateTime.Now.ToString("yy_MM_dd_HH:mm:ss"));
|
||||
}
|
||||
}
|
||||
public static void ERRinf_d(DataTable dataTable, string dat)//删除
|
||||
@@ -33,9 +34,12 @@ namespace DyeingComputer.UserClass
|
||||
dataTable.Rows.Remove(dataTable.Select("ID='" + dat + "'").First());
|
||||
}
|
||||
}
|
||||
|
||||
public static int i=0;
|
||||
public static string ERRinf_r(DataTable dataTable)//读取
|
||||
{
|
||||
string index = dataTable.Rows[0].Field<string>("INF");
|
||||
if (i >= dataTable.Rows.Count) { i = 0; } else { i++; }
|
||||
string index = dataTable.Rows[i].Field<string>("INF");
|
||||
return index;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user