/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromVaspasmblvalidate(ref DataRow row, Vaspasmblvalidate entity) { row.SetField("shipprod", entity.shipprod); row.SetField("whse", entity.whse); row.SetField("verno", entity.verno); row.SetField("segment", entity.segment); row.SetField("valdesc", entity.valdesc); row.SetField("validation", entity.validation); row.SetField("rowid-vaspsas", entity.rowidVaspsas.ToByteArray()); row.SetField("userfield", entity.userfield); }
public static Vaspasmblvalidate BuildVaspasmblvalidateFromRow(DataRow row) { Vaspasmblvalidate entity = new Vaspasmblvalidate(); entity.shipprod = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.verno = row.IsNull("verno") ? 0 : row.Field <int>("verno"); entity.segment = row.IsNull("segment") ? 0 : row.Field <int>("segment"); entity.valdesc = row.IsNull("valdesc") ? string.Empty : row.Field <string>("valdesc"); entity.validation = row.IsNull("validation") ? string.Empty : row.Field <string>("validation"); entity.rowidVaspsas = row.Field <byte[]>("rowid-vaspsas").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }