/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromKpewloadcriteria(ref DataRow row, Kpewloadcriteria entity) { row.SetField("recordlimit", entity.recordlimit); row.SetField("wono", entity.wono); row.SetField("whse", entity.whse); row.SetField("rrarinit", entity.rrarinit); row.SetField("shipprod", entity.shipprod); row.SetField("stagecd", entity.stagecd); row.SetField("searchstatuscd", entity.searchstatuscd); row.SetField("sortorder", entity.sortorder); row.SetField("tiedonlyfl", entity.tiedonlyfl); row.SetField("returnfl", entity.returnfl); row.SetField("verno", entity.verno); row.SetField("userfield", entity.userfield); }
public static Kpewloadcriteria BuildKpewloadcriteriaFromRow(DataRow row) { Kpewloadcriteria entity = new Kpewloadcriteria(); entity.recordlimit = row.IsNull("recordlimit") ? 0 : row.Field <int>("recordlimit"); entity.wono = row.IsNull("wono") ? 0 : row.Field <int>("wono"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.rrarinit = row.IsNull("rrarinit") ? string.Empty : row.Field <string>("rrarinit"); entity.shipprod = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod"); entity.stagecd = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd"); entity.searchstatuscd = row.IsNull("searchstatuscd") ? string.Empty : row.Field <string>("searchstatuscd"); entity.sortorder = row.IsNull("sortorder") ? string.Empty : row.Field <string>("sortorder"); entity.tiedonlyfl = row.Field <bool>("tiedonlyfl"); entity.returnfl = row.Field <bool>("returnfl"); entity.verno = row.IsNull("verno") ? 0 : row.Field <int>("verno"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }