Esempio n. 1
0
        public string DisplayValue(WorkSumExcelType type)
        {
            if (this.IsHasExtraWork)
            {
                double value = 0;
                //return Math.Round(this.AttendanceRecordCal.actExtraWorkingHour.Value, 1).ToString();
                switch (type)
                {
                case WorkSumExcelType.Orign:
                    value = Math.Round(this.AttendanceRecordCal.actExtraWorkingHour.Value, 1);
                    break;

                case WorkSumExcelType.MinusHolidayWork:
                    value = Math.Round(this.MinuseHolidayWorkLeftExtraHour, 1);
                    //value = Math.Round(this.AttendanceRecordCal.actExtraWorkingHour.Value, 1);
                    break;

                case WorkSumExcelType.MinusThreasholdWork:
                    value = Math.Round(this.MinuseHolidayWorkAndThresHoldLeftExtraHour, 1);
                    break;

                case WorkSumExcelType.JobAward:
                    value = this.MinusedThresholdHour;
                    break;

                default:
                    break;
                }
                return(value <= 0 ? string.Empty : value.ToString());
            }
            else if (this.AbsenceRecord != null && this.AbsenceRecord.duration > 0)
            {
                return(string.Format("{0}{1}", this.AbsenceRecord.code, this.AbsenceRecord.duration));
            }
            else if (IsResign)
            {
                return("离职");
            }
            else if (IsNew)
            {
                return("新进");
            }
            return(string.Empty);
        }
Esempio n. 2
0
        /// <summary>
        /// 加班总计
        /// </summary>
        public double TotalExtraHourDisplay(WorkSumExcelType type)
        {
            switch (type)
            {
            case WorkSumExcelType.Orign:
                return(this.OriTotalExtraHour);

            case WorkSumExcelType.MinusHolidayWork:
                return(this.MinusedHolidayLeftTotalExtraHour);

            case WorkSumExcelType.MinusThreasholdWork:
                return(this.MinusedThresholdLeftTotalExtraHour);

            case WorkSumExcelType.JobAward:
                return(this.MinusedThresholdTotalExtraHour);

            default:
                break;
            }
            return(0);
        }