/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromIceanmaintinventorycriteria(ref DataRow row, Iceanmaintinventorycriteria entity) { row.SetField("icenh-rowid", entity.icenhRowid.ToByteArray()); row.SetField("qty", entity.qty); row.SetField("total", entity.total); row.SetField("userfield", entity.userfield); }
public static Iceanmaintinventorycriteria BuildIceanmaintinventorycriteriaFromRow(DataRow row) { Iceanmaintinventorycriteria entity = new Iceanmaintinventorycriteria(); entity.icenhRowid = row.Field <byte[]>("icenh-rowid").ToStringEncoded(); entity.qty = row.IsNull("qty") ? decimal.Zero : row.Field <decimal>("qty"); entity.total = row.IsNull("total") ? decimal.Zero : row.Field <decimal>("total"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }