Exemplo n.º 1
0
        private void cvState_Validating(object sender, Genghis.Windows.Forms.CustomValidator.ValidationCancelEventArgs e)
        {
            var states = ZoneGenerator.GenerateStateIDsByCountry(address.Data.Country);

            var stateFound = states.FirstOrDefault(c => c.TrimEnd() == cboState.Text.TrimEnd());

            e.Valid = stateFound != null;
        }
Exemplo n.º 2
0
        private void cvCountry_Validating(object sender, Genghis.Windows.Forms.CustomValidator.ValidationCancelEventArgs e)
        {
            var countryFound = countryNames.FirstOrDefault(c => c.Contains(cboCountry.Text.TrimEnd()));

            e.Valid = countryFound != null;
        }