示例#1
0
        public static IList <Sp_item> TransDataTableToEntityList(DataTable dt)
        {
            IList <Sp_item> list    = new List <Sp_item>();
            Sp_item         sp_item = null;

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                sp_item = new Sp_item();
                foreach (DataColumn dataColumn in dt.Columns)
                {
                    sp_item.EntityCustom.SetValue(dataColumn.ColumnName, dt.Rows[i][dataColumn]);
                }
                list.Add(sp_item);
            }
            return(list);
        }
示例#2
0
 public static string ConnectValuesWithChar(IList <Sp_item> list, string fieldName, WrapCharType wrapCharType, bool trim)
 {
     return(Sp_item.ConnectValuesWithChar(list, fieldName, ',', wrapCharType, trim));
 }