private void buttonGuardar_Click(object sender, EventArgs e)
        {
            bool camposOK = Empresa.validarCamposModificacion(textRazonSocial, textCuit, textNombreC, textTelefono, textCalle, textNro, textPiso, textDepto, textCodP, textLocalidad, textCiudad, textDia, textMes, textAnio, textMail, textPassword);

            this.AutoValidate = AutoValidate.EnableAllowFocusChange;
            bool passed = this.ValidateChildren();

            if (passed == false)
            {
                MessageBox.Show("Por favor completar el formulario correctamente");
                return;
            }
            if (camposOK)
            {
                Empresa.modificar(textRazonSocial.Text, textCuit.Text, textNombreC.Text, textTelefono.Text, textCalle.Text, textNro.Text, textPiso.Text, textDepto.Text, textCodP.Text, textLocalidad.Text, textCiudad.Text, textDia.Text, textMes.Text, textAnio.Text, textMail.Text, textPassword.Text, idUsuario);
                FormABMEmpresa formABMEmpresa = new FormABMEmpresa();
                formABMEmpresa.MdiParent = this.MdiParent;
                this.Close();
                formABMEmpresa.Show();
            }
            else
            {
                FormABMEmpresa formABMEmpresa = new FormABMEmpresa();
                formABMEmpresa.MdiParent = this.MdiParent;
                MdiParent.Size           = formABMEmpresa.Size + Constantes.aumentoTamanio;
                this.Close();
                formABMEmpresa.Show();
            }
        }
Exemple #2
0
        private void buttonCancelar_Click(object sender, EventArgs e)
        {
            FormABMEmpresa formABMEmpresa = new FormABMEmpresa();

            formABMEmpresa.MdiParent = this.MdiParent;
            MdiParent.Size           = formABMEmpresa.Size + Constantes.aumentoTamanio;
            this.Close();
            formABMEmpresa.Show();
        }