
    Greenleaf Webber versus Inhabitants of School District No. 9, in Shapleigh.
    After the plaintiff had closed his testimony, the defendants offered a paper, claiming that it was a written contract between them and the plaintiff, and called and examined a witness to prove the execution of it; but failing to prove it, it was excluded. They then offered a book, claiming that it was their book of records, and called and examined a witness to prove it; but failing in this, the book was excluded. After this, upon their motion, the presiding Judge ordered a nonsuit; and it was held that no evidence had been put into the case by the defendants, and that the nonsuit was properly ordered.
    When a person performs labor for another under a written contract, and, though not performed according to its terms, the other party has waived it, the person performing the labor can recover only upon the contract. Though not fully performed, it is the basis of the estimation of damages; and, if it appears by the plaintiff’s testimony that such labor was performed under a written contract, which is not proved, a nonsuit may properly be ordered.
    Assumpsit upon an account annexed to the writ. The writ also contained a special count upon an alleged contract between the plaintiff and the school district, by which the plaintiff agreed to build a school-house for the district of certain specified dimensions, and for a stipulated price. It was alleged, in this count, that the plaintiff built said house according to said contract, and that it was thereupon accepted and occupied by the defendants.
    The case was tried at the Sept, term, 1857, before Hathaway, J. The plaintiff called a witness by whom he proved the performance of the labor on the school-house; and, upon cross-examination, it appeared that this labor was performed under a written contract. The same witness testified that, since that time, the school-house had been used and occupied as such by the defendants. The plaintiff here rested his case.
    The counsel for the defendants then opened the defence to the jury; and offered in evidence a paper, which he alleged to be a contract between the parties, under which the labor was performed. The plaintiff objected to the admission of the paper until its execution was proved. The defendants proved the handwriting of the persons who signed the alleged contract for the district; but, there being no evidence that they were authorized to sign it, the paper was excluded.
    The defendants then offered in evidence a boob, purporting to be the boob of records of the school district; and they called Joseph Hasty as a witness, who testified that he had formerly been the clerk of the district, and that the book contained the records of the district. But, it appearing that the said Hasty was not clerk of the district, at the time of the trial, the book was excluded.
    The counsel for the defendants then presented a motion for a nonsuit, which was ordered by the Court.
    
      Tapley & Kimball argued for the plaintiff,
    contending that evidence had been introduced by both parties; and therefore, in ordering a nonsuit, the presiding Judge exceeded his authority. Lyon v. Sibley, 32 Maine, 576.
    
      Appleton & Goodenow, for defendants.
    The nonsuit was properly ordered. The plaintiff could not take the first step in his case without introducing the contract declared on in the writ. Because the plaintiff is not entitled to the actual value of the work, per se, but only to the contract price, minus such a sum as would complete the work according to the contract.
    The contract price is indispensable to determine the proper measure of damages. If the proof had been that the labor was performed, and the materials furnished, according to the contract, the plaintiff would have been entitled to the whole of the contract price.
    If, as we contend, the work and materials were not according to the contract, but of less than the stipulated value, then was the plaintiff entitled to the agreed price, deducting therefrom so much as the house was worth less on account of the variations from the contract.- Jewett v. Weston, 2 Eairf. 346; Hayden v. Madison, 7 Greenl. 76; Hayward v. Leonard, 7 Pick. 180; Thornton v. Place, 7 M. & R. 218; Phelps v. 
      Sheldon, 13 Pick. 50; Wadleigh v. Stitton, 6 N. H., 15; Ellis y. Hamlin, 3 Taunton, 53; Cutler y. Cien, 5 Car. & Paine, 337; Marshall v. Jones, 2 Pairf. 54; Chitty on Contracts, (5th Am. ed.,) 569; 1 Parsons on Contracts, 387; Norris v. School District No. 1, in Windsor, 3 Pairf. 293.
    Where, upon the trial of a cause, there is no proof except what is offered by the plaintiff, and that is insufficient to warrant a verdict for him, a nonsuit may be ordered. Sandford y. Emery, 2 Gfreenl. 5; Perley v. Little, 3 Grccril. 97; Pray v. Garcelon, 17 Maine, 145; Head v. Sleeper, 20 Maine, 314; Hoyt v. Gilman, 8 Mass. 336.
   The opinion of the Court was drawn up by

Tenney, C. J.

It is a settled rule of this Court, in practice, that after the plaintiff in the trial of a cause has introduced evidence in its support, and the other party in defence has offered to the jury evidence in his behalf, a nonsuit cannot be directed by the Court without consent of the parties.

This rule was not violated in this case. No evidence was presented to the jury by the defendants. They attempted to show that a written contract was made between the parties, but failed in that attempt. Again, for the same purpose, they introduced evidence for the purpose of proving that a certain book was the record book of the defendants, and contained the records of their transactions, but the witness offered for this object was objected to, as not having the requisite knowledge of the matter to render him competent; whereupon the plaintiff withdrew his offer of the book. At this stage of the proceedings, the only evidence adduced by the defendants was to the Court, and this pertained wholly to that which was not shown to be admissible before the jury. The Court, thereupon, directed a nonsuit. Lyon v. Libbey, 32 Maine, 576; Emerson v. Jay, 34 Maine, 347; Bragdon & ux. v. Ins. Co., 42 Maine, 259; Frye v. Gragg, 35 Maine, 29.

The action was for the recovery of certain work alleged to have been done upon the defendants’ school-house, for which he attempted to recover the value of the labor and materials expended. But it having appeared distinctly, from the evidence introduced by him, that there was a written contract between the parties, under which he was to do certain work upon the house for a gross sum, a nonsuit was directed by the Court, the contract not having been introduced, and the non-production thereof in no way accounted for.

Exceptions overruled.

Hathaway, May, Goodenow, and Davis, J. J., concurred.  