private void btnBuscar_Click(object sender, EventArgs e) { try { clsDatoComprobante dato = new clsDatoComprobante(); set(dato.consultaComprobante(Convert.ToDecimal(txtNumCom.Text), 1)); gridViewComprobante_RowUpdated(new object(), new DevExpress.XtraGrid.Views.Base.RowObjectEventArgs(1, new object())); } catch (Exception) { } }
private void btnEliminar_Click(object sender, EventArgs e) { try { decimal NumComReve = 0; clsDatoComprobante dato = new clsDatoComprobante(); if (dato.RevertirC(Convert.ToDecimal(NumeroComprobante), 1, ref NumComReve)) { MessageBox.Show("Comprobante Revertido con el Numero " + NumComReve.ToString(), "Contabilidad", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); txtNumCom.Text = NumComReve.ToString(); set(dato.consultaComprobante(NumComReve, 1)); gridViewComprobante_RowUpdated(new object(), new DevExpress.XtraGrid.Views.Base.RowObjectEventArgs(1, new object())); } else { MessageBox.Show("Comprobante no existe", "Contabilidad", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } catch (Exception) { } }