コード例 #1
0
 public static DicDataEntity[] DataTableToEntitys(DataTable dt)
 {
     if (dt == null)
         return null;
     var results = new DicDataEntity[dt.Rows.Count];
     for (int i = 0; i < dt.Rows.Count; i++)
     {
         results[i] = DataRowToEntity(dt.Rows[i]);
     }
     return results;
 }
コード例 #2
0
 public static DicDataEntity DataRowToEntity(DataRow row)
 {
     if (row == null)
         return null;
     var result = new DicDataEntity()
     {
         DicType = (string)row["DicType"],
         DicValue = (string)row["DicValue"]
     };
     return result;
 }