public ResourceType getById(int id) { ResourceTypeRow resourceTypeRow = GetData().FindByID(id); if (resourceTypeRow == null) { logger.Warning("Get Resource type by id returned no results. id: " + id); return(null); } return(Converter.ConvertSingle(resourceTypeRow)); }
public ResourceType updatePastDueCost(ResourceType type, decimal newPastDueCost) { type.PastDueCost = newPastDueCost; ResourceTypeRow row = GetData().FindByID(type.IdResourceType); row["Overdue Cost"] = newPastDueCost; ResourceTypeRow[] rows = new ResourceTypeRow[1]; rows[0] = row; GetData().LoadDataRow(rows, true); Update(GetData()); return(type); }