//  @ Project : TestOnline
//  @ File Name : CountMark.cs
//  @ Date : 2009-3-12
//  @ Author : ruimingde
using System;
using System.Collections.Generic;
using System.Text;

namespace Entity
{
    public class CountMark
    {
        private string testName;

        public string TestName
        {
            get { return testName; }
            set { testName = value; }
        }
        private int testerSum;

        public int TesterSum
        {
            get { return testerSum; }
            set { testerSum = value; }
        }
        private int testerSumDoTest;

        public int TesterSumDoTest
        {
            get { return testerSumDoTest; }
            set { testerSumDoTest = value; }
        }
        private int passedSum;

        public int PassedSum
        {
            get { return passedSum; }
            set { passedSum = value; }
        }

        private int noPassedSum;
        public int NoPassedSum
        {
            get
            {
                noPassedSum = testerSum - passedSum;
                return noPassedSum;
            }
        }

        private decimal passedRate;

        public decimal PassedRate
        {
            get 
            {
                if (testerSum == 0)
                    return new decimal(0);

                passedRate =(decimal)( (passedSum * 100.0) / testerSum );
                return decimal.Round(passedRate,1); 
            }
        }

        private decimal passedRateDoTest;

        public decimal PassedRateDoTest
        {
            get
            {
                if (testerSumDoTest == 0)
                    return new decimal(0);

                passedRateDoTest=(decimal)( (passedSum * 100.0) / testerSumDoTest );
                return decimal.Round(passedRateDoTest,1); 
            }
        }
    }
}
