示例#1
0
文件: Claim.cs 项目: mehabadi/HPMS
        public Claim(ClaimId claimId, Period period, string employeeNo, string title, DateTime claimDate,
                     ClaimTypeEnum claimTypeId, string request)
        {
            period.CheckAddClaim();

            if (claimId == null)
            {
                throw new ArgumentNullException("claimId");
            }
            if (period == null)
            {
                throw new ArgumentNullException("period");
            }

            id            = claimId;
            this.periodId = period.Id;
            if (string.IsNullOrWhiteSpace(employeeNo))
            {
                throw new ClaimArgumentException("Claim", "EmployeeNo");
            }
            this.employeeNo  = employeeNo;
            this.title       = title;
            this.claimDate   = claimDate;
            this.claimTypeId = claimTypeId;
            this.request     = request;
            state            = new ClaimOpenedState();
        }