
96 Pa. Commonwealth Ct. 477 (1986)
508 A.2d 371
William Fiore, t/d/b/a Municipal and Industrial Disposal Company, Petitioner
v.
Commonwealth of Pennsylvania, Department of Environmental Resources, Respondent.
No. 1565 C.D. 1984.
Commonwealth Court of Pennsylvania.
Argued October 10, 1985.
April 23, 1986.
Argued October 10, 1985, before Judges CRAIG and PALLADINO, and Senior Judge KALISH, sitting as a panel of three.
*478 Robert P. Ging, Jr., with him, Lee R. Golden, for petitioner.
Dennis W. Strain, Assistant Counsel, with him, Louis A. Naugle, for respondent.
OPINION BY SENIOR JUDGE KALISH, April 23, 1986:
Petitioner, William Fiore, t/d/b/a Municipal and Industrial Disposal Company, petitions this court for review of an adjudication of the Environmental Hearing Board (Board), which granted the Department of Environmental Resources' (DER) motion for summary judgment, denied petitioner's motion for summary judgment and dismissed petitioner's appeal from DER's suspension of petitioner's permit for disposal of industrial waste.
The pertinent facts are as follows: On August 4, 1983, DER suspended petitioner's hazardous waste permit for alleged violations of various provisions of the Solid Waste Management Act, Act of July 7, 1980, P.L. 380, as amended, 35 Pa. §§6018.101-6018.617, and the Clean Streams Law, Act of June 22, 1937, P.L. 1987, as *479 amended, 35 P.S. §§691.1-691.603. While the permit suspension was on appeal to the Board, DER brought an action in this court to enforce a Consent Order and Agreement (consent order) which petitioner and DER had entered into on January 25, 1983. In a memorandum opinion and order dated October 28, 1983, No. 2083 C.D. 1983, Judge FRANCIS A. BARRY found petitioner guilty of civil contempt for violating Paragraphs 4, 5, 7 and 9 of the January 25, 1983 consent order.[1] Specifically, Judge BARRY found that petitioner had violated *480 Paragraph 4 of the consent order which required petitioner to remove certain waste in the Phase I Pit or remove the waste material to a storage or disposal location, and that petitioner had violated Paragraph 5 of the consent order which required petitioner to file within fifteen days of the signing of the consent order a revised closure plan to reflect the removal of the waste material. Although a revised closure plan was submitted to DER by petitioner on February 1, 1983, the plan was rejected since it violated express provisions of Paragraph 7.[2]
Lastly, Judge BARRY found that petitioner had violated Paragraph 9 of the consent order, which required that, beginning in February, 1983 and by the fifth day of each month until he received a permit from DER, petitioner was required to pay a civil penalty of $500 a *481 month to DER's Clean Water Fund. Petitioner was also ordered to pay a civil penalty of $2,000 per month for past violations of the Consent Order pursuant to Paragraph 15 of that agreement.
Subsequently, the Board conducted hearings on the permit suspension appeal. At the conclusion of DER's case-in-chief on December 15, 1983, and upon agreement of the parties, the Board suspended further hearings to allow the parties to brief motions for summary judgment. On April 25, 1984, the Board issued its decision, holding that the violations found by Judge BARRY were sufficiently serious to justify the suspension of petitioner's permit. The Board adjudication specifically denied any reliance on evidence presented by DER in its case-in-chief, relying instead totally on the facts found by Judge BARRY in the consent order violation hearing.
This court's scope of review of a Board decision is limited to determining whether constitutional rights were violated, findings of fact are supported by substantial evidence, or whether any errors of law were committed. Summerhill Borough v. Department of Environmental Resources, 34 Pa. Commonwealth Ct. 574, 383 A.2d 1320 (1978).
Petitioner initially contends that the Board erred as a matter of law in granting summary judgment in favor of DER after allowing DER, but not the petitioner, to present its case-in-chief.
Only where the moving party has established that there remains no genuine issue of material fact and that it is entitled to judgment as a matter of law may summary judgment be properly granted. Adams County v. Department of Public Welfare, 68 Pa. Commonwealth Ct. 249, 448 A.2d 1202 (1982). In determining whether to grant a summary judgment, the court or adjudicating body must view the record in the light most *482 favorable to the non-moving party. Commonwealth of Pennsylvania v. Insurance Company of North America, 62 Pa. Commonwealth Ct. 379, 436 A.2d 1067 (1981). On appeal from the entry of a summary judgment, the appellate court may reverse the board or trial court where there has been an error of law, or a clear or manifest abuse of discretion. Lened Homes v. Department of Licenses and Inspections of Philadelphia, 386 Pa. 50, 123 A.2d 406 (1956).
It is true that the Board granted a summary judgment in favor of DER without hearing the petitioner's evidence; however, it is also clear from the record that at the hearing before the Board petitioner agreed with DER that the proceedings should be halted and that the case could be decided by the Board, as a matter of law on summary judgment, and not on the basis of any evidence presented by DER. The Board decision expressly disavows any reliance on evidence presented by DER in its case-in-chief. Because the Board decided the case on summary judgment, unless there is a genuine issue of material fact left to be decided, the Board committed no error of law in deciding the case after hearing DER's evidence, but not the petitioner's evidence.
The next issue raised by petitioner is whether the Board erred as a matter of law in holding that the doctrine of res judicata precluded petitioner from relitigating factual issues which were previously decided at the contempt hearing. While the Board noted in its decision that it "relied only on facts which were established as res judicata for the instant appeal" (emphasis in original), DER in its brief raises the possibility that the Board might have actually invoked the related principle of collateral estoppel in this matter. Accordingly, we will review both issue preclusion theories.
Generally, res judicata has come to encompass the effect of one judgment upon a subsequent trial or *483 proceeding. Township of McCandless v. McCarthy, 7 Pa. Commonwealth Ct. 611, 300 A.2d 815 (1973). For res judicata to prevail, four conditions must exist: identity in the thing sued upon or for; identity of the cause of action; identity of persons and parties to the action; and identity of the quality or capacity of the parties suing or sued. Id.
Collateral estoppel is generally invoked when the second action between the same parties is upon a different claim or demand. Under this theory the judgment in the prior action operates as an estoppel in the second action only as to those matters in issue that are identical, were actually litigated, were essential to the judgment, and were material to the adjudication. Id.
In the case before us we find that the contempt proceeding and the Board's adjudication were directly related and as a practical matter arose out of the same cause of action. In the contempt proceeding, this court was concerned with determining whether petitioner had violated the consent order. Upon finding that petitioner did violate the order, Judge BARRY found him in contempt.
The issue before the Board was whether DER had acted arbitrarily or capriciously in revoking petitioner's waste dumping license, because he had violated the consent order. In order to determine if DER's actions were proper, it was necessary for the Board to determine if petitioner had materially violated the consent order, to wit, exactly what Judge BARRY had done. Thus, the issue before Judge BARRY and the Board was essentially the same. We therefore find that a subsequent determination by the Board as to whether the consent order had been violated was not proper, since that determination had already been made by this court.
As this court has recently indicated, it is often difficult to characterize a scenario as res judicata or collateral *484 estoppel. See Keystone Water Co. v. Pennsylvania Public Utility Commission, 81 Pa. Commonwealth Ct. 312, 474 A.2d 368 (1984). The important thing for the court to consider is whether the ultimate and controlling issues have been decided in a prior proceeding in which the parties actually had an opportunity to appear and assert their rights. Wallace's Estate, 316 Pa. 148, 174 A. 397 (1934). We are convinced that both parties had an adequate opportunity to litigate the question of whether petitioner had violated the consent order, and that the Board acted properly in relying on Judge BARRY'S factual determination in this matter.
Petitioner's last contention is that the decision of the Board should be reversed since DER did not prove pollution prior to the suspension of petitioner's permit, and there has been no pollution for a considerable time after the suspension. This argument warrants no further discussion as we have already stated above that DER acted within its legislative mandate when it suspended petitioner's permit; the Board properly affirmed that decision.
Accordingly, we affirm the Board.

ORDER
Now, April 23, 1986, the order of the Environmental Hearing Board entered at Docket No. 83-160-G, dated April 25, 1984, is affirmed.
NOTES
[1]  Paragraphs 4, 5, 7 and 9 of the consent order entered into between DER and petitioner, William Fiore, on January 25, 1983, are as follows:

4. By June 15, 1983, M & I shall remove all solid waste material that has been and is presently stored on the area identified as the temporary storage pits on drawing XXX-XX-XX, (Revised January, 1979), the temporary storage pits, all contaminated soil, below and surrounding the excavated waste and the storage pits, and said waste, pits, and contaminated soil ("Waste Material") shall by June 15, 1983, be either disposed of in the Phase I Pit, or remove the Waste Material to a storage or disposal location off-site authorized to accept such Waste Material (hereinafter referred to as the "Off-Site Waste Facility"), it being understood that M & I shall notify DER in writing of the identity of the Off-Site Waste Facility and obtain all required authorization for storage or disposal prior to the transportation of any Waste Material thereto.
5. Within fifteen (15) days of the date of the execution of this Consent Order and Agreement, M & I shall submit to the DER Bureau of Solid Waste Management, 851 Kossman Building, Pittsburgh, Pennsylvania 15222, a revised closure plan in accordance with the applicable provisions of the 25 Pa. Code §75.265(o) (Sept. 4, 1982 Pa. Bulletin Pa. 3063) to reflect the removal of the Waste Material as required by Paragraph 4, above.
7. M & I shall not expand the above-referenced hazardous waste facility; the Phase I Industrial Waste Pit, and shall not utilize or construct any off-site or on-site hazardous waste disposal facility which is not permitted by the Pennsylvania DER Bureau of Solid Waste Management or does not qualify for interim status as a hazardous waste disposal facility.
9. Commencing February 1, 1983, and by the fifth day of each succeeding month until M & I has received a permit from the Department pursuant to Paragraph 1(a) above, M & I shall pay a civil penalty of $500.00 per month to the Department's Clean Water Fund, payable to the Commonwealth of Pennsylvania, Department of Environmental Resources, at the address set forth in Paragraph 1(a) above.
[2]  DER found petitioner's revised closure plan filed on February 1, 1983 unacceptable because:

petitioner proposed to place the waste material from the temporary pit into a pit known as the Phase II Residential Pit, a disposal facility that [petitioner] had constructed adjacent to the Phase I Pit at the site, rather than into either the Phase I Pit or a location off-site authorized to accept such waste material.
This plan was objectionable since Paragraph 7 of the consent order prohibited petitioner from expanding the Phase I Pit and from utilizing or constructing any on-site hazardous waste disposal facility.
