/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromAologisticswlloc(ref DataRow row, Aologisticswlloc entity) { row.SetField("wlloc", entity.wlloc); row.SetField("descrip", entity.descrip); row.SetField("esbwlfl", entity.esbwlfl); row.SetField("wlstarttm", entity.wlstarttm); row.SetField("wlstoptm", entity.wlstoptm); row.SetField("wlpause", entity.wlpause); row.SetField("wllogdir", entity.wllogdir); row.SetField("wlal-rowid", entity.wlalRowid.ToByteArray()); row.SetField("userfield", entity.userfield); }
public static Aologisticswlloc BuildAologisticswllocFromRow(DataRow row) { Aologisticswlloc entity = new Aologisticswlloc(); entity.wlloc = row.IsNull("wlloc") ? string.Empty : row.Field <string>("wlloc"); entity.descrip = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip"); entity.esbwlfl = row.Field <bool>("esbwlfl"); entity.wlstarttm = row.IsNull("wlstarttm") ? 0 : row.Field <int>("wlstarttm"); entity.wlstoptm = row.IsNull("wlstoptm") ? 0 : row.Field <int>("wlstoptm"); entity.wlpause = row.IsNull("wlpause") ? decimal.Zero : row.Field <decimal>("wlpause"); entity.wllogdir = row.IsNull("wllogdir") ? string.Empty : row.Field <string>("wllogdir"); entity.wlalRowid = row.Field <byte[]>("wlal-rowid").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }