Example #1
0
        private void AvoidSummaryData(string overtime, double?getudoyyyymm)
        {
            if (getudoyyyymm == null)
            {
                return;
            }

            var o = new OverTime();
            var timespan_overtime = o.ConvertDispOverTime(overtime);
            int i = 0;

            if (int.TryParse(overtime.Replace(":", ""), out i))
            {
                i = i / 100;
            }

            foreach (var item in this.SummaryAttendance)
            {
                if (item.GetudoYYYYMM == (int)getudoyyyymm)
                {
                    item.OverTime = timespan_overtime;
                    item.Is45Over = i >= 45;
                    item.Is80Over = i >= 80;
                    return;
                }
            }
            var record = new SummaryAttendanceData();

            record.GetudoYYYYMM = (int)getudoyyyymm;
            record.OverTime     = timespan_overtime;
            record.Is45Over     = i >= 45;
            record.Is80Over     = i >= 80;
            return;
        }