public frmAltaProv(PROVEEDORES id, char tipo) { InitializeComponent(); txbNomProv.MaxLength = 50; mtbCUIT.MaxLength = 13; txbNomContacto.MaxLength = 80; txbEmail.MaxLength = 50; txbDireccion.MaxLength = 50; txbIDProv.ReadOnly = true; txbIDContacto.ReadOnly = true; btnAceptar.Hide(); btnCancelar.Hide(); try { ProveedoresNegocio conectarP = new ProveedoresNegocio(); PROVEEDORES datosP = new PROVEEDORES(); datosP = conectarP.ConsultarProv(id.intIDProv); ContactosNegocio conectarC = new ContactosNegocio(); DatosContacto datosC = new DatosContacto(); datosC = conectarC.consultar(id.intIdContacto); txbIDProv.Text = id.intIDProv.ToString(); txbNomProv.Text = datosP.strNombre; mtbCUIT.Text = datosP.strCuit; txbIDContacto.Text = id.intIdContacto.ToString(); txbNomContacto.Text = datosC.strNombre; mtbTelefono.Text = datosC.intTelefono.ToString(); txbEmail.Text = datosC.strEmail; txbDireccion.Text = datosC.strDireccion; if (tipo == 'v') { txbNomProv.ReadOnly = true; mtbCUIT.ReadOnly = true; txbNomContacto.ReadOnly = true; mtbTelefono.ReadOnly = true; txbEmail.ReadOnly = true; txbDireccion.ReadOnly = true; btnMod.Hide(); } else if (tipo == 'm') { btnMod.Show(); } } catch (Exception ex) { throw ex; } }