/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromArsplookupresults(ref DataRow row, Arsplookupresults entity) { row.SetField("custno", entity.custno); row.SetField("notesfl", entity.notesfl); row.SetField("name", entity.name); row.SetField("rowid-arsp", entity.rowidArsp.ToByteArray()); row.SetField("userfield", entity.userfield); }
public static Arsplookupresults BuildArsplookupresultsFromRow(DataRow row) { Arsplookupresults entity = new Arsplookupresults(); entity.custno = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno"); entity.notesfl = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl"); entity.name = row.IsNull("name") ? string.Empty : row.Field <string>("name"); entity.rowidArsp = row.Field <byte[]>("rowid-arsp").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }