|
|
|
@ -35,11 +35,20 @@ namespace Rs.MotionPlat.Entitys
|
|
|
|
|
if(rowNum>2)
|
|
|
|
|
{
|
|
|
|
|
for(int i=1;i<rowNum; i++)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
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;
|
|
|
|
@ -54,6 +63,13 @@ namespace Rs.MotionPlat.Entitys
|
|
|
|
|
alarmDic.Add(entity.AlartID, entity);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|