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