优化中英韩提示

master
lhiven 1 year ago
parent 45313a31d9
commit 17bb819887

@ -36,23 +36,39 @@ namespace Rs.MotionPlat.Entitys
{
for(int i=1;i<rowNum; i++)
{
AlarmEntity entity = new AlarmEntity();
IRow row = sheet.GetRow(i);
ICell cell = row.GetCell(0);
entity.AlartID = int.Parse(cell.NumericCellValue.ToString().Trim());
cell = row.GetCell(2);
if (cell != null)
entity.CN = cell.StringCellValue;
cell = row.GetCell(3);
if (cell != null)
entity.EN = cell.StringCellValue;
cell = row.GetCell(4);
if (cell != null)
entity.KO = cell.StringCellValue;
if(!alarmDic.ContainsKey(entity.AlartID))
try
{
alarmDic.Add(entity.AlartID, entity);
AlarmEntity entity = new AlarmEntity();
IRow row = sheet.GetRow(i);
ICell cell = row.GetCell(0);
if(cell.CellType== CellType.Numeric)
{
entity.AlartID = int.Parse(cell.NumericCellValue.ToString().Trim());
}
else if(cell.CellType== CellType.String)
{
entity.AlartID = int.Parse(cell.StringCellValue.ToString().Trim());
}
cell = row.GetCell(2);
if (cell != null)
entity.CN = cell.StringCellValue;
cell = row.GetCell(3);
if (cell != null)
entity.EN = cell.StringCellValue;
cell = row.GetCell(4);
if (cell != null)
entity.KO = cell.StringCellValue;
if (!alarmDic.ContainsKey(entity.AlartID))
{
alarmDic.Add(entity.AlartID, entity);
}
}
catch (Exception ex)
{
}
}
}
}

@ -2,6 +2,7 @@
using Rs.Framework;
using Rs.MotionPlat.AuxiliaryEquipment;
using Rs.MotionPlat.Commom;
using Rs.MotionPlat.Entitys;
using Rs.MotionPlat.Flow;
using System;
using System.Collections.Generic;

Loading…
Cancel
Save