The disposition of a civil or criminal proceeding or a claim or charge made therein by a court order without a trial or prior to its completion which, in effect, is a denial of the relief sought by the commencement of the action. The legal effect of a dismissal varies depending upon its type.