Beispiel #1
0
 private void btnAprobar_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (_currentRow["Asiento"].ToString() == "" || _currentRow["Asiento"] == null)
     {
         try
         {
             //Security.ConnectionManager.BeginTran();
             String Asiento = MovimientosDAC.GenerarAsientoContable(Convert.ToInt32(_currentRow["Numero"]), Convert.ToInt32(_currentRow["IDCuentaBanco"]), Convert.ToInt32(_currentRow["IDTipo"]), Convert.ToInt32(_currentRow["IDSubTipo"]), sUsuario);
             if (Asiento == "")
             {
                 MessageBox.Show("Ha ocurrido un error tratando de generar el asiento contable del cheque");
                 return;
             }
             CG.frmAsiento ofrmAsiento = new CG.frmAsiento(Asiento, "PndtGuardar", true);
             ofrmAsiento.FormClosed += ofrmAsiento_FormClosed;
             ofrmAsiento.ShowDialog();
             //Security.ConnectionManager.CommitTran();
         }
         catch (Exception ex) {
             MessageBox.Show("Han ocurrido los siguientes errores, tratando de generar el asiento contable \n\r\n\r\n\r\n\r\n\r\n\r\n\r" + ex.Message);
             // Security.ConnectionManager.RollBackTran();
         }
     }
 }