/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromWtiareptlistcriteria(ref DataRow row, Wtiareptlistcriteria entity) { row.SetField("fmWhse", entity.fmWhse); row.SetField("toWhse", entity.toWhse); row.SetField("cono", entity.cono); row.SetField("tyWT", entity.tyWT); row.SetField("tyDO", entity.tyDO); row.SetField("sort1", entity.sort1); row.SetField("sort2", entity.sort2); row.SetField("recordcountlimit", entity.recordcountlimit); row.SetField("userfield", entity.userfield); }
public static Wtiareptlistcriteria BuildWtiareptlistcriteriaFromRow(DataRow row) { Wtiareptlistcriteria entity = new Wtiareptlistcriteria(); entity.fmWhse = row.IsNull("fmWhse") ? string.Empty : row.Field <string>("fmWhse"); entity.toWhse = row.IsNull("toWhse") ? string.Empty : row.Field <string>("toWhse"); entity.cono = row.IsNull("cono") ? 0 : row.Field <int>("cono"); entity.tyWT = row.Field <bool>("tyWT"); entity.tyDO = row.Field <bool>("tyDO"); entity.sort1 = row.IsNull("sort1") ? string.Empty : row.Field <string>("sort1"); entity.sort2 = row.IsNull("sort2") ? string.Empty : row.Field <string>("sort2"); entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }