/// <summary> /// Determine any broken business rules /// </summary> public override void Validate() { BrokenRules.AddRule("reqCustomerId", "Customer Id is required", CustomerId < 1); BrokenRules.AddRule("reqLine1", "Dealer Id is required", string.IsNullOrWhiteSpace(Line1)); }
/// <summary> /// Determine any broken business rules /// </summary> public override void Validate() { BrokenRules.AddRule("reqGroupId", "Group Id is required", GroupId < 1); BrokenRules.AddRule("reqFirstName", "FirstName is required", string.IsNullOrWhiteSpace(FirstName)); BrokenRules.AddRule("reqLastName", "LastName is required", string.IsNullOrWhiteSpace(LastName)); }
/// <summary> /// Determine any broken business rules /// </summary> public override void Validate() { BrokenRules.AddRule("reqGroupName", "GroupName is required", string.IsNullOrWhiteSpace(GroupName)); }
/// <summary> /// Determine any broken business rules /// </summary> public override void Validate() { BrokenRules.AddRule("reqCustomerId", "Customer Id is required", CustomerId < 1); BrokenRules.AddRule("reqMake", "Make is required", string.IsNullOrWhiteSpace(Make)); BrokenRules.AddRule("invYear", "Year can not be in the future", Year != null && Year > DateTime.Now.Year); }