public override bool Validate(string propertyName, object propertyValue, object propertyOwner) { MemberValidation owner = (MemberValidation)propertyOwner; if ((int)propertyValue < owner.Id) { MessageText = "ListId is less than id!"; return(false); } return(true); }
public void TestDateRangeBad() { MemberValidation m1 = new MemberValidation(0, 1, "John Doe", "*****@*****.**"); // set date to something outside range m1.DateTime1 = new DateTime(2005, 01, 01); // insert - should fail m1.Persist(); // clean up m1.Remove(); }
public void TestDateRangeBad() { MemberValidation m1 = new MemberValidation( 0, 1, "John Doe", "*****@*****.**" ); // set date to something outside range m1.DateTime1 = new DateTime( 2005, 01, 01 ); // insert - should fail m1.Persist(); // clean up m1.Remove(); }