Esempio n. 1
0
        public List <int> VerifyPostcode()
        {
            var errors = new List <int>();

            if (Postcode == null)
            {
                return new List <int> {
                           15
                }
            }
            ;

            Postcode = Postcode.Trim().Replace(HidroConstants.WHITE_SPACE, string.Empty);
            if (string.IsNullOrWhiteSpace(Postcode))
            {
                return new List <int> {
                           15
                }
            }
            ;

            var lenTest = new Regex(@".{1,10}");

            if (!lenTest.IsMatch(Postcode))
            {
                errors.Add(16);
            }

            var rx = new Regex(@"^[\d]*$");

            if (!rx.IsMatch(Postcode))
            {
                errors.Add(17);
            }

            return(errors);
        }
Esempio n. 2
0
        private List <int> VerifyPostcode()
        {
            var errors = new List <int>();

            if (Postcode == null)
            {
                return new List <int> {
                           10
                }
            }
            ;

            Postcode = Postcode.Trim().Replace(SharedConstants.DoubleSpace, SharedConstants.MonoSpace);
            if (!Helpers.IsProperString(Postcode))
            {
                return new List <int> {
                           10
                }
            }
            ;

            var lenTest = new Regex(@".{1,20}");

            if (!lenTest.IsMatch(Postcode))
            {
                errors.Add(11);
            }

            var rx = new Regex(@"^[\d]*$");

            if (!rx.IsMatch(Postcode))
            {
                errors.Add(12);
            }

            return(errors);
        }
        private void InformationIsvalid()
        {
            int tmp;

            SaveIsEnabled = (Bedrijfsnaam != null && !Bedrijfsnaam.Trim().Equals("") && EMail != null && !EMail.Trim().Equals("") && int.TryParse(_huisnummer, out tmp) && Postcode != null && !Postcode.Trim().Equals("") && int.TryParse(_telefoonnummer, out tmp));
        }