public string this[string columnName] { get { if (columnName == "AccidentDate") { if (string.IsNullOrEmpty(AccidentDate.ToString())) { return("Date is required"); } } return(string.Empty); } }
public override string ToString() { return(ClaimNumber + " - " + PolicyPeriod.Policy.PolicyNumber + " - " + PolicyPeriod.Policy.Vehicle.PalateNumber + ", " + AccidentDate.ToString("YYYY-MM-DD")); }