/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromWarehouselookupcriteria(ref DataRow row, Warehouselookupcriteria entity) { row.SetField("whse", entity.whse); row.SetField("phoneno", entity.phoneno); row.SetField("city", entity.city); row.SetField("state", entity.state); row.SetField("recordcountlimit", entity.recordcountlimit); row.SetField("userfield", entity.userfield); }
public static Warehouselookupcriteria BuildWarehouselookupcriteriaFromRow(DataRow row) { Warehouselookupcriteria entity = new Warehouselookupcriteria(); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.phoneno = row.IsNull("phoneno") ? string.Empty : row.Field <string>("phoneno"); entity.city = row.IsNull("city") ? string.Empty : row.Field <string>("city"); entity.state = row.IsNull("state") ? string.Empty : row.Field <string>("state"); entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }