void ucGe_Menu_Mantenimiento_x_usuario_event_btnAnular_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                if (info.IdCobro == 0)
                {
                    return;
                }

                ba_Cbte_Ban_Info InfoCbteBan_del_deposito = new ba_Cbte_Ban_Info();

                if (Bus.Valida_cobro_x_deposito(info, ref InfoCbteBan_del_deposito))
                {
                    MessageBox.Show("El cobro tiene depositos aplicados y no se puede anular.\n\n" + "Cbte Bancario#:" + InfoCbteBan_del_deposito.IdCbteCble + "\n"
                                    + "Banco del Deposito:" + InfoCbteBan_del_deposito.Banco + "\n" + "Fecha del Deposito:" + InfoCbteBan_del_deposito.cb_Fecha.ToShortDateString()
                                    , param.NombreEmpresa, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return;
                }


                frmCxc_CobrosGenerales_Mant frm = new frmCxc_CobrosGenerales_Mant();
                cxc_cobro_Info infoCobro        = new cxc_cobro_Info();
                frm.setAccion(Cl_Enumeradores.eTipo_action.Anular);
                infoCobro = Bus.Get_Info_cobro_x_cliente(Convert.ToInt32(info.IdEmpresa), Convert.ToInt32(info.IdSucursal), Convert.ToDecimal(info.IdCobro), Convert.ToInt32(info.IdCliente));
                frm.Set_info(infoCobro);
                frm.MdiParent = this.MdiParent;
                frm.Show();
                frm.event_FrmClose += new frmCxc_CobrosGenerales_Mant.Delegate_FrmClose(frm_event_FrmClose);
            }
            catch (Exception ex)
            {
                Log_Error_bus.Log_Error(ex.ToString());
                MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Beispiel #2
0
 public Boolean ConsultarCobro()
 {
     try
     {
         cxc_cobro_x_Anticipo_Info infoA = new cxc_cobro_x_Anticipo_Info();
         infoA = (cxc_cobro_x_Anticipo_Info)gridViewcxc.GetFocusedRow();
         if (infoA == null)
         {
             return(false);
         }
         cxc_cobro_Info infocobro = new cxc_cobro_Info();
         infocobro = cxccBus.Get_Info_Cobro(infoA.IdEmpresa_Cobro, infoA.IdSucursal_cobro, Convert.ToInt32(infoA.IdCobro_cobro));
         frmCxc_CobrosGenerales_Mant frm = new frmCxc_CobrosGenerales_Mant();
         frm.setAccion(Cl_Enumeradores.eTipo_action.actualizar);
         frm.Set_info(infocobro);
         frm.MdiParent = this.MdiParent;
         frm.Show();
         frm.event_FrmClose += new frmCxc_CobrosGenerales_Mant.Delegate_FrmClose(frm_event_FrmClose);
         return(true);
     }
     catch (Exception ex)
     {
         Log_Error_bus.Log_Error(ex.ToString());
         MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         return(false);
     }
 }
 void ucGe_Menu_Mantenimiento_x_usuario_event_btnNuevo_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     try
     {
         frmCxc_CobrosGenerales_Mant frm = new frmCxc_CobrosGenerales_Mant();
         frm.setAccion(Cl_Enumeradores.eTipo_action.grabar);
         frm.MdiParent = this.MdiParent;
         frm.Show();
         frm.event_FrmClose += new frmCxc_CobrosGenerales_Mant.Delegate_FrmClose(frm_event_FrmClose);
     }
     catch (Exception ex)
     {
         Log_Error_bus.Log_Error(ex.ToString());
         MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
 void ucGe_Menu_Mantenimiento_x_usuario_event_btnconsultar_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     try
     {
         if (info.IdCobro == 0)
         {
             return;
         }
         frmCxc_CobrosGenerales_Mant frm = new frmCxc_CobrosGenerales_Mant();
         frm.setAccion(Cl_Enumeradores.eTipo_action.consultar);
         frm.Set_info(Bus.Get_Info_cobro_x_cliente(Convert.ToInt32(info.IdEmpresa), Convert.ToInt32(info.IdSucursal), Convert.ToDecimal(info.IdCobro), Convert.ToInt32(info.IdCliente)));
         frm.MdiParent = this.MdiParent;
         frm.Show();
     }
     catch (Exception ex)
     {
         Log_Error_bus.Log_Error(ex.ToString());
         MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }