Ejemplo n.º 1
0
        /// <summary>
        /// Checks if the end time of this time entry is equal to the begin time of nextEntry
        /// </summary>
        public void ValidateEndTimeIsEqualTo(DateTime nextEntryBeginTime, string errorMessage)
        {
            DateTime?endTime = Helper.ConvertToDateTime(EndDate, EndTime);

            if (endTime != null && endTime.Value == nextEntryBeginTime)
            {
                if (!ErrorCtl.ContainsKey("txtEndDate"))
                {
                    ErrorCtl["txtEndDate"] = errorMessage;
                }
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Checks if the end time of the prior entry is equal to the begin time of this time entry
        /// </summary>
        public void ValidateBeginTimeIsEqualTo(DateTime priorEntryEndTime, string errorMessage)
        {
            DateTime?beginTime = Helper.ConvertToDateTime(BeginDate, BeginTime);

            if (beginTime != null && beginTime.Value == priorEntryEndTime)
            {
                if (!ErrorCtl.ContainsKey("txtBeginDate"))
                {
                    ErrorCtl["txtBeginDate"] = errorMessage;
                }
            }
        }