/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromSplitpayrowid(ref DataRow row, Splitpayrowid entity) { row.SetField("rowid-splitpay", entity.rowidSplitpay.ToByteArray()); row.SetField("amount", entity.amount); row.SetField("origdisc", entity.origdisc); row.SetField("DueDays-sensitive", entity.dueDaysSensitive); row.SetField("Currencyty", entity.currencyty); row.SetField("Currencyty-hidden", entity.currencytyHidden); row.SetField("userfield", entity.userfield); }
public static Splitpayrowid BuildSplitpayrowidFromRow(DataRow row) { Splitpayrowid entity = new Splitpayrowid(); entity.rowidSplitpay = row.Field <byte[]>("rowid-splitpay").ToStringEncoded(); entity.amount = row.IsNull("amount") ? decimal.Zero : row.Field <decimal>("amount"); entity.origdisc = row.IsNull("origdisc") ? decimal.Zero : row.Field <decimal>("origdisc"); entity.dueDaysSensitive = row.Field <bool>("DueDays-sensitive"); entity.currencyty = row.IsNull("Currencyty") ? string.Empty : row.Field <string>("Currencyty"); entity.currencytyHidden = row.Field <bool>("Currencyty-hidden"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }