internal bool CheckBothTimeHasFilledIn(PeriodOrderTmp periodOrderTmp) { periodOrderTmp.SelectAllByUserID(); TimeSpan SQLInitialTime = new TimeSpan(); if (periodOrderTmp.StartTime == SQLInitialTime || periodOrderTmp.EndTime == SQLInitialTime) { return(false); } else { return(true); } }
internal bool CheckBothDateHasFilledIn(PeriodOrderTmp periodOrderTmp) { periodOrderTmp.SelectAllByUserID(); DateTime SQLInitialTime = Convert.ToDateTime(System.Data.SqlTypes.SqlDateTime.MinValue.Value); if (periodOrderTmp.StartDate == SQLInitialTime || periodOrderTmp.EndDate == SQLInitialTime) { return(false); } else { return(true); } }
public static bool DateTimeCompareIsLaterThanEndTime(DateTime StartDate, PeriodOrderTmp periodOrderTmp) { periodOrderTmp.SelectAllByUserID(); if (periodOrderTmp.EndDate == Convert.ToDateTime(System.Data.SqlTypes.SqlDateTime.MinValue.Value)) { return(false); } int result = DateTime.Compare(StartDate, periodOrderTmp.EndDate); if (result < 0) { return(false); } else { return(true); } }
internal static bool TimeCompareIsEarlierThanStartTime(TimeSpan EndTime, PeriodOrderTmp periodOrderTmp) { periodOrderTmp.SelectAllByUserID(); if (periodOrderTmp.StartTime == new TimeSpan()) { return(false); } int result = TimeSpan.Compare(EndTime, periodOrderTmp.StartTime); // int result = DateTime.Compare(periodOrderTmp.StartTime, EndTime); if (result > 0) { return(false); } else { return(true); } }