Exemplo n.º 1
0
        private void bAceptar_Click(object sender, EventArgs e)
        {
            int port = 0;
            if (!Int32.TryParse(textBoxPort.Text, out port))
            {
                Framework.General.GIMsgBox.Show("Debe ingresar un valor válido para el perto", GI.Framework.General.enumTipoMensaje.Error);
                return;
            }

            Inmobiliaria.Direccion = ctrlDireccion1.Direccion;
            Inmobiliaria.Fax = textBoxFax.Text;
            Inmobiliaria.Nombre = textBoxNombreInmobiliaria.Text;
            Inmobiliaria.Telefono = textBoxTelefono.Text;
            Inmobiliaria.Url = textBoxDireccionWeb.Text;

            Inmobiliaria.Actualizar();

            smtp.AutenticacionSmtp = checkBoxAutenticacion.Checked;
            smtp.Email = textBoxMail.Text;
            smtp.Host = textBoxSmtpHost.Text;
            smtp.Nombre = textBoxNombre.Text;
            smtp.Password = textBoxPassword.Text;
            smtp.Puerto = port;
            smtp.Ssl = checkBoxSSL.Checked;
            smtp.UserName = textBoxUsuario.Text;

            smtp.Actualizar();

            BR.Reportes.ParametrosReportes reps = new GI.BR.Reportes.ParametrosReportes();
            if (pictureBox1.Image != null)
            {
                reps.Encabezado = new Bitmap( pictureBox1.Image);
            }
            if (pictureBox2.Image != null)
            {
                reps.PiePagina = new Bitmap(pictureBox2.Image);
            }
            reps.Guardar();

            Close();
        }