public class MoudeType
{
public string RGuid { get; set; }
public string Name { get; set; }
public string Type { get; set; }
public string State { get; set; }
public string Sys { get; set; }
public string OPCServiceGuid { get; set; }
public string BIMItemGuid { get; set; }
}
模型值设定:
List<MoudeType> ListMoude = new List<MoudeType>();
MoudeType MoudeTypeItem = new MoudeType();
if (dtSheBeiInfo.Rows.Count > 0)
{
for (int i = 0; i < dtSheBeiInfo.Rows.Count; i++)
{
MoudeTypeItem = new MoudeType()
{
Name = Convert.ToString(dtSheBeiInfo.Rows[i]["部件名称"]),
Type = Convert.ToString(dtSheBeiInfo.Rows[i]["部件类型"]),
State = "开",
Sys = Convert.ToString(dtSheBeiInfo.Rows[i]["所属系统"]),
RGuid = Convert.ToString(dtSheBeiInfo.Rows[i]["RowGuid"]),
};
#region 根据设备RowGuid在表DICT_BIMOPC 中获取
#endregion
ListMoude.Add(MoudeTypeItem);
}
}