private void validar() { if (!Validador.isNumeric(txt_codpostal.Text)) { throw new System.ArgumentException("Codigo postal debe ser númerico", "original"); } else if (!Validador.IsValidEmail(txt_mail.Text)) { throw new System.ArgumentException("el mail debe ser válido", "original"); } else if (!Validador.isNumeric(txt_tel.Text)) { throw new System.ArgumentException("el telefono debe ser númerico", "original"); } else if (!Validador.isNumeric(txt_cuit.Text)) { throw new System.ArgumentException("el CUIT debe ser númerico", "original"); } else if (Validador.isEmpty(txt_razonsocial.Text) || Validador.isEmpty(txt_cuit.Text) || Validador.isEmpty(txt_tel.Text) || Validador.isEmpty(txt_nombreContacto.Text) || Validador.isEmpty(txt_mail.Text) || Validador.isEmpty(txt_ciudad.Text) || Validador.isEmpty(txt_calle.Text) || Validador.isEmpty(txt_codpostal.Text) || comboRubro.SelectedItem == null) { throw new System.ArgumentException("No puede haber campos vacios", "original"); } }
private void validar() { if (!Validador.isNumeric(txt_cpostal.Text)) { throw new System.ArgumentException("Codigo postal debe ser númerico", "original"); } else if (!Validador.isNumeric(txt_dni.Text)) { throw new System.ArgumentException("Codigo postal debe ser númerico", "original"); } else if (!Validador.IsValidEmail(txt_mail.Text)) { throw new System.ArgumentException("el mail debe ser válido", "original"); } else if (!Validador.isNumeric(txt_tel.Text)) { throw new System.ArgumentException("el telefono debe ser númerico", "original"); } else if (Validador.isEmpty(txt_nombre.Text) || Validador.isEmpty(txt_apellido.Text) || Validador.isEmpty(txt_mail.Text) || Validador.isEmpty(txt_tel.Text) || Validador.isEmpty(txt_ciudad.Text) || Validador.isEmpty(txt_calle.Text) || Validador.isEmpty(txt_cpostal.Text)) { throw new System.ArgumentException("Los campos no deben ir vacios", "original"); } }