public object Check() { DayResult result = new DayResult(this.DayNum); result.DayRecord = this; bool isLate = true; bool isLess = true; isLate = IsLate(this.mWorkStartTime.Start); isLess = IsLess(this.mWorkStartTime.End); if (isLate) { if (isLess) { result.Status = ResultStatus.Late | ResultStatus.LessTime | ResultStatus.HR; } else if (useElastic) { result.Status = ResultStatus.Late | ResultStatus.MaybeUnpaidLeave | ResultStatus.HR; } else { result.Status = ResultStatus.Late | ResultStatus.HR; } } else { if (isLess) { result.Status = ResultStatus.LessTime | ResultStatus.HR; } else if (DayTimes.Count == 2 | DayTimes.Count == 3) { result.Status = ResultStatus.Normal; } else { result.Status = ResultStatus.Normal | ResultStatus.HR; } } return(result); }
public void AddResult(DayResult result) { DayResults.Add(result); this.Status = this.Status | result.Status; }