/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromSaprinterlookupresults(ref DataRow row, Saprinterlookupresults entity) { row.SetField("printernm", entity.printernm); row.SetField("descrip", entity.descrip); row.SetField("wide", entity.wide); row.SetField("pgroup", entity.pgroup); row.SetField("labelsize", entity.labelsize); row.SetField("rowid-sasp", entity.rowidSasp.ToByteArray()); }
public static Saprinterlookupresults BuildSaprinterlookupresultsFromRow(DataRow row) { Saprinterlookupresults entity = new Saprinterlookupresults(); entity.printernm = row.IsNull("printernm") ? string.Empty : row.Field <string>("printernm"); entity.descrip = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip"); entity.wide = row.Field <bool>("wide"); entity.pgroup = row.IsNull("pgroup") ? string.Empty : row.Field <string>("pgroup"); entity.labelsize = row.IsNull("labelsize") ? string.Empty : row.Field <string>("labelsize"); entity.rowidSasp = row.Field <byte[]>("rowid-sasp").ToStringEncoded(); return(entity); }