/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromValueaddlookupcriteria(ref DataRow row, Valueaddlookupcriteria entity) { row.SetField("activeonly", entity.activeonly); row.SetField("vano", entity.vano); row.SetField("vasuf", entity.vasuf); row.SetField("stagecd", entity.stagecd); row.SetField("whse", entity.whse); row.SetField("recordcountlimit", entity.recordcountlimit); }
public static Valueaddlookupcriteria BuildValueaddlookupcriteriaFromRow(DataRow row) { Valueaddlookupcriteria entity = new Valueaddlookupcriteria(); entity.activeonly = row.Field <bool>("activeonly"); entity.vano = row.IsNull("vano") ? 0 : row.Field <int>("vano"); entity.vasuf = row.IsNull("vasuf") ? 0 : row.Field <int>("vasuf"); entity.stagecd = row.IsNull("stagecd") ? string.Empty : row.Field <string>("stagecd"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit"); return(entity); }