Пример #1
0
        private void btnNuevo_Click(object sender, EventArgs e)
        {
            FrmMantenimientoComprobantePago frm = new FrmMantenimientoComprobantePago();

            frm.ShowInTaskbar = false;
            frm.BringToFront();
            DialogResult dr = frm.ShowDialog();

            if (dr == DialogResult.OK)
            {
                BuscarComprobantesPago();
            }
        }
Пример #2
0
        private void mitPagar_Click(object sender, EventArgs e)
        {
            MenuItem mitControl = (MenuItem)sender;

            var obj = (dynamic)mitControl.Tag;

            var listaLetra = (List <dynamic>)obj.ListaLetra;

            var listaComprobantePagoDetalle = listaLetra.Select((x, i) => new ComprobantePagoDetalleBe
            {
                Fila = (i + 1),
                CodigoTipoDocumentoPago = (int)TipoDocumentoPago.Letra,
                CodigoDocumentoPago     = x.CodigoLetra,
                Descripcion             = $"{TipoDocumentoPago.Letra.GetAttributeOfType<DescriptionAttribute>().Description} {x.Numero.ToString("00000000")}",
                Monto         = x.Monto,
                Mora          = x.Mora,
                Protesto      = x.Protesto,
                Total         = x.Total,
                MontoPagar    = x.Monto,
                MoraPagar     = x.Mora,
                ProtestoPagar = x.Protesto,
                ImportePagar  = x.Total,
            }).ToList();

            string formulario = this.GetType().FullName;
            FrmMantenimientoComprobantePago frm = new FrmMantenimientoComprobantePago(listaComprobantePagoDetalle, obj.CodigoCliente, obj.CodigoMoneda, formulario);

            frm.ShowInTaskbar = false;
            frm.BringToFront();
            DialogResult dr = frm.ShowDialog();

            if (dr == DialogResult.OK)
            {
                BuscarLetras();
            }
        }