示例#1
0
        protected override void FillOnePerson(PersonResult result, Worksheet sheet)
        {
            Cells cells      = sheet.Cells;
            int   maxDataRow = cells.MaxDataRow + 1;

            cells[maxDataRow, 0].PutValue(result.PersonName);
            foreach (var dayResult in result.DayResults)
            {
                int dayNum = dayResult.DayNum;
                if (dayResult.Status == ResultStatus.Normal)
                {
                    SetCellColor(cells, maxDataRow, dayNum, 1, mWorkbook.Styles[NORMAL_COLOR]);
                }
                else
                {
                    //cells[maxDataRow, dayNum].PutValue(GetStatusString(dayResult.Status));
                    if (IsContain(dayResult.Status, ResultStatus.Late))
                    {
                        SetCellColor(cells, maxDataRow, dayNum, 1, mWorkbook.Styles[LATE_COLOR]);
                    }
                    else if (IsContain(dayResult.Status, ResultStatus.HR))
                    {
                        SetCellColor(cells, maxDataRow, dayNum, 1, mWorkbook.Styles[NEED_HR_COLOR]);
                    }
                }
            }
        }
示例#2
0
        protected override void FillOnePerson(PersonResult result, Worksheet sheet)
        {
            Cells cells      = sheet.Cells;
            int   maxDataRow = cells.MaxDataRow;
            int   index      = 1;

            foreach (var dayResult in result.DayResults)
            {
                DayRecord dayRecord = dayResult.DayRecord;
                foreach (var dayTime in dayRecord.DayTimes)
                {
                    cells[maxDataRow + index, 0].PutValue(result.PersonName);
                    cells[maxDataRow + index, 1].PutValue((dayRecord.HighDayTime + dayTime).ToString());
                    cells[maxDataRow + index, 2].PutValue(GetStatusString(dayResult.Status));
                    if (IsContain(dayResult.Status, ResultStatus.Late))
                    {
                        SetCellColor(cells, maxDataRow + index, 0, 3, mWorkbook.Styles[LATE_COLOR]);
                    }
                    else if (IsContain(dayResult.Status, ResultStatus.HR))
                    {
                        SetCellColor(cells, maxDataRow + index, 0, 3, mWorkbook.Styles[NEED_HR_COLOR]);
                    }
                    index++;
                }
            }
        }
示例#3
0
 public void CheckRecords(Dictionary <string, PersonRecord> persons)
 {
     foreach (var person in persons)
     {
         PersonResult checkResult  = new PersonResult();
         PersonRecord personRecord = person.Value;
         personRecord.PickWorkStartTime();
         checkResult = personRecord.Check() as PersonResult;
         CheckResults.Add(checkResult);
     }
 }
示例#4
0
        public object Check()
        {
            PersonResult result = new PersonResult(this.Name);

            foreach (var item in DayRecords)
            {
                DayRecord day = item.Value;
                day.SetStandardRecord(this.mWorkStartTime);
                result.AddResult(day.Check() as DayResult);
            }
            return(result);
        }
示例#5
0
 protected virtual void FillOnePerson(PersonResult result, Worksheet sheet)
 {
 }