Пример #1
0
 /// <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));
 }
Пример #2
0
 /// <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));
 }
Пример #3
0
 /// <summary>
 /// Determine any broken business rules
 /// </summary>
 public override void Validate()
 {
     BrokenRules.AddRule("reqGroupName", "GroupName is required", string.IsNullOrWhiteSpace(GroupName));
 }
Пример #4
0
 /// <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);
 }