/// <summary> /// 获得数据列表 /// </summary> public List <Library.Model.Equipment> DataTableToList(DataTable dt) { List <Library.Model.Equipment> modelList = new List <Library.Model.Equipment>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { Library.Model.Equipment model; for (int n = 0; n < rowsCount; n++) { model = dal.DataRowToModel(dt.Rows[n]); if (model != null) { modelList.Add(model); } } } return(modelList); }