In all cases where irrigating ditches are owned by two or more persons and one or more of such persons shall fail or neglect to do his, her or their proportionate share of the work necessary for the proper maintenance and operation of such ditch or ditches or to construct suitable headgates or measuring devices at the points where water is diverted from the main ditch, such owner or owners desiring the performance of such work as is reasonably necessary to maintain the ditch, may, after having given ten days' written notice to such owner or owners who have failed to perform his, her or their proportionate share of such work, necessary for the operation and maintenance of said ditch or ditches, perform his, her or their share of such work, and recover therefor from such person or persons so failing to perform his, her or their share of such work in any court having jurisdiction of the matter the expense or value of such work or labor so performed: PROVIDED, That no improvement involving an expenditure in excess of one hundred dollars shall be made without the written approval of the department having first been obtained.