private void ShowItem(AttendanceRules item)
        {
            chkMinLate.Checked = item.MinLate != null;
            if (item.MinLate != null)
            {
                txtMinLate.IntergerValue = item.MinLate.Value;
                txtMinLateAsAbsentMinute.IntergerValue = item.MinLateAsAbsentMinute;
            }
            chkMinLeaveEarly.Checked = item.MinLeaveEarly != null;
            if (item.MinLeaveEarly != null)
            {
                txtMinLeaveEarly.IntergerValue = item.MinLeaveEarly.Value;
                txtMinLeaveEarlyAsAbsentMinute.IntergerValue = item.MinLeaveEarlyAsAbsentMinute;
            }
            chkLateAsAbsent.Checked = item.LateAsAbsent != null;
            if (item.LateAsAbsent != null) txtLateAsAbsent.IntergerValue = item.LateAsAbsent.Value;
            chkLeaveEarlyAsAbsent.Checked = item.LeaveEarlyAsAbsent != null;
            if (item.LeaveEarlyAsAbsent != null) txtLeaveEarlyAsAbsent.IntergerValue = item.LeaveEarlyAsAbsent.Value;
            chkShiftTimeIncludeWaiChu.Checked = item.ShiftTimeIncludeWaiChu;
            chkShiftTimeExclueLateAndLeaveEarly.Checked = !item.ShiftTimeIncludeLateOrLeaveEarly;
            txtMinOTMinute.IntergerValue = item.MinOTMinute;
            txtMinShiftMinute.IntergerValue = item.MinShiftMinute;
            txtOTBeforeStartTime.Value = item.BeforeOTStartTime;
            txtOTAfterEndTime.Value = item.AfterOTEndTime;
            txtMinutesOfWorkDay.Value = item.MinutesOfWorkDay;
            comAttendanceUnit.SelectedUnit = item.AttendanceUnit;
            txtMinAttendanceTime.DecimalValue = item.MinAttendanceTime;

            #region 其它
            txtSNofAbsent.Text  = item.SNofAbsent;
            txtSNofLate.Text  = item.SNofLate;
            txtSNofLateLeaveEarly.Text  = item.SNofLateLeaveEarly;
            txtSNofLeaveEarly.Text  = item.SNofLeaveEarly;
            txtSNofOk.Text = item.SNofOk;
            txtSNofRest.Text = item.SNofRest;
            #endregion
        }
        private AttendanceRules GetFromInput()
        {
            AttendanceRules item = new AttendanceRules();
            if (chkMinLate.Checked)
            {
                item.MinLate = txtMinLate.IntergerValue;
                item.MinLateAsAbsentMinute = txtMinLateAsAbsentMinute.IntergerValue;

            }
            if (chkMinLeaveEarly.Checked)
            {
                item.MinLeaveEarly = txtMinLeaveEarly.IntergerValue;
                item.MinLeaveEarlyAsAbsentMinute = txtMinLeaveEarlyAsAbsentMinute.IntergerValue;
            }
            if (chkLateAsAbsent.Checked) item.LateAsAbsent = txtLateAsAbsent.IntergerValue;
            if (chkLeaveEarlyAsAbsent.Checked) item.LeaveEarlyAsAbsent = txtLeaveEarlyAsAbsent.IntergerValue;
            item.ShiftTimeIncludeWaiChu = chkShiftTimeIncludeWaiChu.Checked;
            item.ShiftTimeIncludeLateOrLeaveEarly = !chkShiftTimeExclueLateAndLeaveEarly.Checked;
            item.MinShiftMinute = txtMinShiftMinute.IntergerValue;
            item.MinOTMinute = txtMinOTMinute.IntergerValue;
            item.BeforeOTStartTime = (int)txtOTBeforeStartTime.Value;
            item.AfterOTEndTime = (int)txtOTAfterEndTime.Value;
            item.MinutesOfWorkDay = (int)txtMinutesOfWorkDay.Value;
            item.AttendanceUnit = comAttendanceUnit.SelectedUnit;
            item.MinAttendanceTime = txtMinAttendanceTime.DecimalValue;

            #region 其它
            item.SNofAbsent = txtSNofAbsent.Text;
            item.SNofLate = txtSNofLate.Text;
            item.SNofLateLeaveEarly = txtSNofLateLeaveEarly.Text;
            item.SNofLeaveEarly = txtSNofLeaveEarly.Text;
            item.SNofOk = txtSNofOk.Text;
            item.SNofRest = txtSNofRest.Text;
            #endregion
            return item;
        }