public static IList <Sp_itemContent> TransDataTableToEntityList(DataTable dt) { IList <Sp_itemContent> list = new List <Sp_itemContent>(); Sp_itemContent sp_itemContent = null; for (int i = 0; i < dt.Rows.Count; i++) { sp_itemContent = new Sp_itemContent(); foreach (DataColumn dataColumn in dt.Columns) { sp_itemContent.EntityCustom.SetValue(dataColumn.ColumnName, dt.Rows[i][dataColumn]); } list.Add(sp_itemContent); } return(list); }
public static string ConnectValuesWithChar(IList <Sp_itemContent> list, string fieldName, WrapCharType wrapCharType, bool trim) { return(Sp_itemContent.ConnectValuesWithChar(list, fieldName, ',', wrapCharType, trim)); }