/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromIcsevloadttresults(ref DataRow row, Icsevloadttresults entity) { row.SetField("lifocat", entity.lifocat); row.SetField("yr", entity.yr); row.SetField("layer", entity.layer); row.SetField("lifoindex", entity.lifoindex); row.SetField("currval", entity.currval); row.SetField("icsevrowid", entity.icsevrowid.ToByteArray()); row.SetField("userfield", entity.userfield); }
public static Icsevloadttresults BuildIcsevloadttresultsFromRow(DataRow row) { Icsevloadttresults entity = new Icsevloadttresults(); entity.lifocat = row.IsNull("lifocat") ? string.Empty : row.Field <string>("lifocat"); entity.yr = row.IsNull("yr") ? 0 : row.Field <int>("yr"); entity.layer = row.IsNull("layer") ? decimal.Zero : row.Field <decimal>("layer"); entity.lifoindex = row.IsNull("lifoindex") ? decimal.Zero : row.Field <decimal>("lifoindex"); entity.currval = row.IsNull("currval") ? decimal.Zero : row.Field <decimal>("currval"); entity.icsevrowid = row.Field <byte[]>("icsevrowid").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }