public double GetPrice() { double lockerPrice = 0; foreach (Locker locker in lockerList) { lockerPrice += locker.GetPrice(); } double extrusionPrice = extrusion.GetPrice(); return(lockerPrice + extrusionPrice); }
public double GetPrice(MySqlConnection connection) { double lockerPrice = 0; foreach (Locker locker in lockerList) { lockerPrice += locker.GetPrice(connection); } double extrusionPrice = extrusion.GetPrice(connection); return(lockerPrice + extrusionPrice); }