/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromCcrecoversingle(ref DataRow row, Ccrecoversingle entity) { row.SetField("orderno", entity.orderno); row.SetField("ordersuf", entity.ordersuf); row.SetField("amount", entity.amount); row.SetField("userfield", entity.userfield); }
public static Ccrecoversingle BuildCcrecoversingleFromRow(DataRow row) { Ccrecoversingle entity = new Ccrecoversingle(); entity.orderno = row.IsNull("orderno") ? 0 : row.Field <int>("orderno"); entity.ordersuf = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf"); entity.amount = row.IsNull("amount") ? decimal.Zero : row.Field <decimal>("amount"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }