/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromIonioboxcriteria(ref DataRow row, Ionioboxcriteria entity) { row.SetField("direction", entity.direction); row.SetField("nounname", entity.nounname); row.SetField("pastdays", entity.pastdays); row.SetField("statustype", entity.statustype); row.SetField("bodid", entity.bodid); row.SetField("id", entity.id); row.SetField("recordcountlimit", entity.recordcountlimit); row.SetField("userfield", entity.userfield); }
public static Ionioboxcriteria BuildIonioboxcriteriaFromRow(DataRow row) { Ionioboxcriteria entity = new Ionioboxcriteria(); entity.direction = row.IsNull("direction") ? string.Empty : row.Field <string>("direction"); entity.nounname = row.IsNull("nounname") ? string.Empty : row.Field <string>("nounname"); entity.pastdays = row.IsNull("pastdays") ? 0 : row.Field <int>("pastdays"); entity.statustype = row.IsNull("statustype") ? string.Empty : row.Field <string>("statustype"); entity.bodid = row.IsNull("bodid") ? string.Empty : row.Field <string>("bodid"); entity.id = row.IsNull("id") ? 0 : row.Field <long>("id"); entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }