/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPdspcprecnoresults(ref DataRow row, Pdspcprecnoresults entity) { row.SetField("lMaintmode", entity.lMaintmode); row.SetField("cType", entity.cType); row.SetField("iRecno", entity.iRecno); row.SetField("rowid-pdsc", entity.rowidPdsc.ToByteArray()); row.SetField("userfield", entity.userfield); }
public static Pdspcprecnoresults BuildPdspcprecnoresultsFromRow(DataRow row) { Pdspcprecnoresults entity = new Pdspcprecnoresults(); entity.lMaintmode = row.Field <bool>("lMaintmode"); entity.cType = row.IsNull("cType") ? string.Empty : row.Field <string>("cType"); entity.iRecno = row.IsNull("iRecno") ? 0 : row.Field <int>("iRecno"); entity.rowidPdsc = row.Field <byte[]>("rowid-pdsc").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }