private void buttonGuardar_Click(object sender, EventArgs e) { if (textRazon.Text == "" || textCuit.Text == "" || textCP.Text == "" || textMail.Text == "") { MessageBox.Show("Complete los campos obligatorios"); } else { try { ClienteBE nCliente = new ClienteBE(); nCliente.RazonSocial = textRazon.Text; nCliente.Direccion = textDireccion.Text; nCliente.CodigoPostal = Convert.ToInt32(textCP.Text); nCliente.Telefono = textTel.Text; nCliente.Mail = textMail.Text; nCliente.Cuit = textCuit.Text; nCliente.Contacto = textContacto.Text; bllCli.InsertarCliente(nCliente); MessageBox.Show("Cliente Creado Correctamente"); this.Close(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } }