private void btnAgregar_Click(object sender, EventArgs e) { Proveedor cliente = new Proveedor(); ProveedoresNegocio negocio = new ProveedoresNegocio(); if (txtCuit.Text.Length > 0 && txtRazSoc.Text.Length > 0 && txtContacto.Text.Length > 0 && txtNumero.Text.Length > 0 && txtTipo.Text.Length > 0) { cliente.CUIT = Convert.ToInt32(txtCuit.Text); cliente.RazonSocial = txtRazSoc.Text; cliente.NombreContacto = txtContacto.Text; cliente.telefono = new Telefono(); cliente.telefono.Id = Convert.ToInt32(txtId.Text); cliente.telefono.Numero = Convert.ToInt32(txtNumero.Text); cliente.telefono.TipoDeTelefono = txtTipo.Text; negocio.agregarProveedor(cliente); cargarGrilla(); } else { MessageBox.Show("DEBEN ESTAR TODOS LOS CAMPOS COMPLETOS!!"); } }