public override IField FillAndClone(string dataToBeFilledWith) { CheckForNullOrNotValidDateTimeArgument(dataToBeFilledWith); DateField newDateField = new DateField(Name); newDateField.Data = ParseToISO8061Date(dataToBeFilledWith); return(newDateField); }
private bool UseCorrectComparationAcoordingIfTheyAreEmptyOrNot(DateField otherDateField) { if (this.IsEmpty() && otherDateField.IsEmpty()) { return(Name.Equals(otherDateField.Name)); } else if (otherDateField.IsEmpty()) { return(false); } else { return(GetData().Equals(otherDateField.GetData()) && Name.Equals(otherDateField.Name)); } }
public override bool Equals(object otherIField) { if (IsNull(otherIField)) { return(false); } try { DateField otherDateField = (DateField)otherIField; return(UseCorrectComparationAcoordingIfTheyAreEmptyOrNot(otherDateField)); } catch (InvalidCastException) { return(false); } }
public override IField ClearDataAndClone() { IField clearedField = new DateField(this.Name); return(clearedField); }