private void btnGuardar_Click(object sender, EventArgs e) { try { List <Error> Errores = this.ValidarDatos(); if (Errores.Count == 0) { Producto Datos = this.ObtenerDatos(); Producto_Negocio ProdNeg = new Producto_Negocio(); ProdNeg.EnviarTarjetasRegalo(Datos, Comun.IDSucursalCaja); if (Datos.Completado) { MessageBox.Show("Datos guardados correctamente.", Comun.Sistema, MessageBoxButtons.OK, MessageBoxIcon.Information); this.DialogResult = DialogResult.OK; } else { MessageBox.Show(Comun.MensajeError, Comun.Sistema, MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { this.MostrarMensajeError(Errores); } } catch (Exception ex) { LogError.AddExcFileTxt(ex, "frmEnviarTarjetas ~ btnGuardar_Click"); MessageBox.Show(Comun.MensajeError, Comun.Sistema, MessageBoxButtons.OK, MessageBoxIcon.Error); } }