public void AbrirParaAgregar(listadoEmpresa frmEnviador) { frmPadre = frmEnviador; this.Show(); txtRazonSocial.Text = ""; txtCuit.Text = ""; txtNombreContacto.Text = ""; txtMail.Text = ""; txtTelefono.Text = ""; txtCalle.Text = ""; txtNumeroCalle.Text = ""; txtNroPiso.Text = ""; txtDepto.Text = ""; txtCodPostal.Text = ""; txtLocalidad.Text = ""; txtFechaCreacion.Text = Convert.ToString(DateTime.Today); chkActivo.Visible = false; btnAceptarMEmpresa.Visible = false; btnAceptarAEmpresa.Visible = true; btnAceptarREmpresa.Visible = false; }
public void AbrirParaModificar(Empresa unaEmpresa, listadoEmpresa frmEnviador) { frmPadre = frmEnviador; empresaDelForm = unaEmpresa; this.Show(); txtRazonSocial.Text = unaEmpresa.Razon_social; txtCuit.Text = unaEmpresa.Cuit; txtNombreContacto.Text = unaEmpresa.Nombre_contacto; txtMail.Text = unaEmpresa.Mail; txtTelefono.Text = unaEmpresa.Telefono; txtCalle.Text = unaEmpresa.Dom_calle; txtNumeroCalle.Text = Convert.ToString(unaEmpresa.Dom_nro_calle); txtNroPiso.Text = Convert.ToString(unaEmpresa.Dom_piso); txtDepto.Text = Convert.ToString(unaEmpresa.Dom_depto); txtCodPostal.Text = unaEmpresa.Dom_cod_postal; txtLocalidad.Text = unaEmpresa.Dom_ciudad; txtFechaCreacion.Text = Convert.ToString(unaEmpresa.Fecha_creacion); chkActivo.Checked = unaEmpresa.Activo; txtRazonSocial.Enabled = true; txtCuit.Enabled = true; txtNombreContacto.Enabled = true; txtMail.Enabled = true; txtTelefono.Enabled = true; txtCalle.Enabled = true; txtNumeroCalle.Enabled = true; txtNroPiso.Enabled = true; txtDepto.Enabled = true; txtCodPostal.Enabled = true; txtLocalidad.Enabled = true; txtFechaCreacion.Enabled = true; chkActivo.Enabled = true; btnAceptarAEmpresa.Visible = false; btnAceptarREmpresa.Visible = false; }