// EVENTO ENVIAR MENSAJE private void btnEnviar_Click(Object sender, EventArgs e) { if (ValidarMensaje() == 0) { if (Mensaje(txbMensaje.Text)) { MensajeCrear AMensaje = new MensajeCrear(); if (AMensaje.Mensaje(AUsuario.sIdusuario, "1", "2", txbMensaje.Text) == 0) { lblCaracteres.Text = "Caracteres: 0 de 140."; EnviarMensajes AMensajes = new EnviarMensajes(); AMensajes.Mensaje = txbMensaje.Text; txbMensaje.Text = ""; AMensajes.Show(); } else { FlatMessageBox.Show("Error al enviar el mensaje.", " ACEPTAR", string.Empty, FlatMessageBoxIcon.Error); } } else { FlatMessageBox.Show("El mensaje no debe contener caracteres especiales.", "ACEPTAR", string.Empty, FlatMessageBoxIcon.Warning); } } }
// EVENTO BOTON ENVIAR EL MENSAJE private void btnEnviar_Click(Object sender, EventArgs e) { if (ValidarMensaje() == 0) { MensajeCrear AMensaje = new MensajeCrear(); if (AMensaje.Mensaje(AUsuario.sIdusuario, ACliente.sIdCliente, "2", txbMensaje.Text) == 0) { LimpiarControles(); FlatMessageBox.Show("Mensaje enviado correctamente", "ACEPTAR", string.Empty, FlatMessageBoxIcon.Information); } else { FlatMessageBox.Show("Error al enviar el mensaje.", "ACEPTAR", string.Empty, FlatMessageBoxIcon.Error); } } }