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