/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromStationcriteria(ref DataRow row, Stationcriteria entity) { row.SetField("co_num", entity.coNum); row.SetField("wh_num", entity.whNum); row.SetField("stn_num", entity.stnNum); row.SetField("recordcountlimit", entity.recordcountlimit); row.SetField("stationcriteriauserfield", entity.stationcriteriauserfield); row.SetField("userfield", entity.userfield); }
public static Stationcriteria BuildStationcriteriaFromRow(DataRow row) { Stationcriteria entity = new Stationcriteria(); entity.coNum = row.IsNull("co_num") ? string.Empty : row.Field <string>("co_num"); entity.whNum = row.IsNull("wh_num") ? string.Empty : row.Field <string>("wh_num"); entity.stnNum = row.IsNull("stn_num") ? string.Empty : row.Field <string>("stn_num"); entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit"); entity.stationcriteriauserfield = row.IsNull("stationcriteriauserfield") ? string.Empty : row.Field <string>("stationcriteriauserfield"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }