If the district project as adopted, as provided in Part 5 (commencing at Section 42200) of this division, provides that all of the costs of the project are to be borne by certain designated lands within the district and there is on file with the board a written stipulation or agreement executed and acknowledged by the owners of all of such designated lands wherein the landowners consent to an apportionment of all costs of the project on their lands in a particular manner, then all of such costs shall be apportioned by the commissioners in accordance with such stipulation or agreement.