コード例 #1
0
        private void btnGuardar_Click(object sender, EventArgs e)
        {
            if (ValidateFields().ShowIfThereAreErrors())
            {
                return;
            }
            if (repoCliente.ExistsDNIAndCuil(cliente.id, comboBoxTipoDoc.SelectedItem.ToString(), txtNumeroDocumento.Text, txtCuil.Text))
            {
                MessageBox.Show("Ya existe un Cliente con el mismo Dni y Cuil");
                return;
            }

            ReadAllTextBox(cliente);
            clienteStrategy.BuildCliente(cliente);
            clienteStrategy.Execute(repoCliente, cliente);
            this.CloseThis();
        }