/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPdsprbrecnoresults(ref DataRow row, Pdsprbrecnoresults entity) { row.SetField("lMaintmode", entity.lMaintmode); row.SetField("cType", entity.cType); row.SetField("iPDRecno", entity.iPDRecno); row.SetField("rowid-pdsr", entity.rowidPdsr.ToByteArray()); row.SetField("userfield", entity.userfield); }
public static Pdsprbrecnoresults BuildPdsprbrecnoresultsFromRow(DataRow row) { Pdsprbrecnoresults entity = new Pdsprbrecnoresults(); entity.lMaintmode = row.Field <bool>("lMaintmode"); entity.cType = row.IsNull("cType") ? string.Empty : row.Field <string>("cType"); entity.iPDRecno = row.IsNull("iPDRecno") ? 0 : row.Field <int>("iPDRecno"); entity.rowidPdsr = row.Field <byte[]>("rowid-pdsr").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }