Example #1
0
            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);
            }
Example #2
0
        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();
        }
Example #3
0
		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();
		}