/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromSastonewoeaddon(ref DataRow row, Sastonewoeaddon entity) { row.SetField("codeval", entity.codeval); row.SetField("descrip", entity.descrip); row.SetField("rowID", entity.rowID.ToByteArray()); row.SetField("userfield", entity.userfield); }
public static Sastonewoeaddon BuildSastonewoeaddonFromRow(DataRow row) { Sastonewoeaddon entity = new Sastonewoeaddon(); entity.codeval = row.IsNull("codeval") ? 0 : row.Field <int>("codeval"); entity.descrip = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip"); entity.rowID = row.Field <byte[]>("rowID").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }