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