OpenPetra
Free Administration Software for Non-Profits
|
Class for date verifications that are needed both on Server and Client side. More...
Static Public Member Functions | |
static TVerificationResult | IsNotUndefinedDateTime (DateTime? ADate, String ADescription, bool ATreatNullAsInvalid=false, object AResultContext=null, System.Data.DataColumn AResultColumn=null) |
Checks whether the date is not undefined. DateTime.MinValue is seen as undefined by this Method. Null values are accepted. They are treated as valid, unless ATreatNullAsInvalid is set to true. More... | |
static TVerificationResult | IsNotCorporateDateTime (DateTime? ADate, String ADescription, object AResultContext=null, System.Data.DataColumn AResultColumn=null, int AAlternativeFirstDayOfPeriod=1) |
Checks whether the date is not undefined. DateTime.MinValue is seen as undefined by this Method. Null values are accepted. More... | |
static TVerificationResult | IsValidDateTime (String AString, String ADescription, object AResultContext=null, System.Data.DataColumn AResultColumn=null) |
Checks whether the string AString contains a valid DateTime. More... | |
static TVerificationResult | IsCurrentOrFutureDate (DateTime? ADate, String ADescription, object AResultContext=null, System.Data.DataColumn AResultColumn=null) |
Checks whether the date is today or in the future. Null values are accepted. More... | |
static TVerificationResult | IsCurrentOrPastDate (DateTime? ADate, String ADescription, object AResultContext=null, System.Data.DataColumn AResultColumn=null) |
Checks whether the date is today or in the past. Null values are accepted. More... | |
static TVerificationResult | IsDateBetweenDates (DateTime? ADate, DateTime? ALowerDateRangeEnd, DateTime? AUpperDateRangeEnd, String ADescription, TDateBetweenDatesCheckType ALowerRangeCheckType=TDateBetweenDatesCheckType.dbdctUnspecific, TDateBetweenDatesCheckType AUpperRangeCheckType=TDateBetweenDatesCheckType.dbdctUnspecific, object AResultContext=null, System.Data.DataColumn AResultColumn=null) |
Checks whether the date is within a specified date range. Null values are accepted. More... | |
static TVerificationResult | FirstLesserOrEqualThanSecondDate (DateTime? ADate1, DateTime? ADate2, string AFirstDateDescription, string ASecondDateDescription, object AResultContext=null, System.Data.DataColumn AResultColumn=null) |
Checks whether the first submitted date is earlier or equal than the second submitted date. Null dates are accepted. More... | |
static TVerificationResult | FirstLesserThanSecondDate (DateTime? ADate1, DateTime? ADate2, string AFirstDateDescription, string ASecondDateDescription, object AResultContext=null, System.Data.DataColumn AResultColumn=null) |
Checks whether the first submitted date is earlier than the second submitted date. Null dates are accepted. More... | |
static TVerificationResult | FirstGreaterOrEqualThanSecondDate (DateTime? ADate1, DateTime? ADate2, string AFirstDateDescription, string ASecondDateDescription, object AResultContext=null, System.Data.DataColumn AResultColumn=null) |
Checks whether the first submitted date is later or equal than the second submitted date. Null dates are accepted. More... | |
static TVerificationResult | FirstGreaterThanSecondDate (DateTime? ADate1, DateTime? ADate2, string AFirstDateDescription, string ASecondDateDescription, object AResultContext=null, System.Data.DataColumn AResultColumn=null) |
Checks whether the first submitted date is later than the second submitted date. Null dates are accepted. More... | |
static TVerificationResult | GetInvalidDateVerificationResult (String ADescription, object AResultContext=null) |
This is called in case a date is invalid, in order to generate a generic TVerificationResult. More... | |
Class for date verifications that are needed both on Server and Client side.
None of the data verifications in here must access the database since the Client doesn't have access to the database!
|
inlinestatic |
Checks whether the first submitted date is later or equal than the second submitted date. Null dates are accepted.
ADate1 | First date. |
ADate2 | Second date. |
AFirstDateDescription | Description what the first date is about (for the error message). |
ASecondDateDescription | Description what the second date is about (for the error message). |
AResultContext | Context of verification (can be null). |
AResultColumn | Which System.Data.DataColumn failed (can be null). |
|
inlinestatic |
Checks whether the first submitted date is later than the second submitted date. Null dates are accepted.
ADate1 | First date. |
ADate2 | Second date. |
AFirstDateDescription | Description what the first date is about (for the error message). |
ASecondDateDescription | Description what the second date is about (for the error message). |
AResultContext | Context of verification (can be null). |
AResultColumn | Which System.Data.DataColumn failed (can be null). |
|
inlinestatic |
Checks whether the first submitted date is earlier or equal than the second submitted date. Null dates are accepted.
ADate1 | First date. |
ADate2 | Second date. |
AFirstDateDescription | Description what the first date is about (for the error message). |
ASecondDateDescription | Description what the second date is about (for the error message). |
AResultContext | Context of verification (can be null). |
AResultColumn | Which System.Data.DataColumn failed (can be null). |
|
inlinestatic |
Checks whether the first submitted date is earlier than the second submitted date. Null dates are accepted.
ADate1 | First date. |
ADate2 | Second date |
AFirstDateDescription | Description what the first date is about (for the error message). |
ASecondDateDescription | Description what the second date is about (for the error message). |
AResultContext | Context of verification (can be null). |
AResultColumn | Which System.Data.DataColumn failed (can be null). |
|
inlinestatic |
This is called in case a date is invalid, in order to generate a generic TVerificationResult.
ADescription | Either a name for the date value or an empty string. |
AResultContext | Context of verification (can be null). |
|
inlinestatic |
Checks whether the date is today or in the future. Null values are accepted.
ADate | Date to check. |
ADescription | Name of the date value. |
AResultContext | Context of verification (can be null). |
AResultColumn | Which System.Data.DataColumn failed (can be null). |
|
inlinestatic |
Checks whether the date is today or in the past. Null values are accepted.
ADate | The date to check. |
ADescription | The name of the date value. |
AResultContext | Context of verification (can be null). |
AResultColumn | Which System.Data.DataColumn failed (can be null). |
|
inlinestatic |
Checks whether the date is within a specified date range. Null values are accepted.
This Method is capable of returning varyingTVerificationResult objects! The objects returned are determined by the values specified for ALowerRangeCheckType and AUpperRangeCheckType !
ADate | Date to check. |
ALowerDateRangeEnd | Lower end of the valid Date Range. |
AUpperDateRangeEnd | Upper end of the valid Date Range. |
ADescription | Name of the date value. |
ALowerRangeCheckType | Type of Date Check: lower end of the valid Date Range (defaults to TDateBetweenDatesCheckType.dbdctUnspecific). |
AUpperRangeCheckType | Type of Date Check: upper end of the valid Date Range (defaults to TDateBetweenDatesCheckType.dbdctUnspecific). |
AResultContext | Context of verification (can be null). |
AResultColumn | Which System.Data.DataColumn failed (can be null). |
|
inlinestatic |
Checks whether the date is not undefined. DateTime.MinValue is seen as undefined by this Method. Null values are accepted.
ADate | The date to check. |
ADescription | The name of the date value. |
AResultContext | Context of verification (can be null). |
AResultColumn | Which System.Data.DataColumn failed (can be null). |
AAlternativeFirstDayOfPeriod |
Usage in the Data Validation Framework: rather than using this Method, use Method 'TValidationControlHelper.IsNotInvalidDate' for checking the validity of dates as the latter can deal not only with empty dates, but dates that are invalid in other respects (e.g. exceeding a valid date range)!!!
|
inlinestatic |
Checks whether the date is not undefined. DateTime.MinValue is seen as undefined by this Method. Null values are accepted. They are treated as valid, unless ATreatNullAsInvalid is set to true.
ADate | The date to check. |
ADescription | The name of the date value. |
ATreatNullAsInvalid | Set this to true to treated null value in ADate as invalid. |
AResultContext | Context of verification (can be null). |
AResultColumn | Which System.Data.DataColumn failed (can be null). |
Usage in the Data Validation Framework: rather than using this Method, use Method 'TValidationControlHelper.IsNotInvalidDate' for checking the validity of dates as the latter can deal not only with empty dates, but dates that are invalid in other respects (e.g. exceeding a valid date range)!!!
|
inlinestatic |
Checks whether the string AString contains a valid DateTime.
AString | The date to check. |
ADescription | The name of the date value. |
AResultContext | Context of verification (can be null). |
AResultColumn | Which System.Data.DataColumn failed (can be null). |