public override void Autorizar() { this.simpleButtonAutorizar.Enabled = false; if (!this.validarDatos()) { this.simpleButtonAutorizar.Enabled = true; } else { FormaPagoForm formaPagoForm = new FormaPagoForm(this.comprobante); int num = (int)formaPagoForm.ShowDialog(); if (formaPagoForm.DialogResult == DialogResult.Cancel) { this.simpleButtonAutorizar.Enabled = true; } else { if (formaPagoForm.DialogResult == DialogResult.OK) { this.detalleFormaPago = formaPagoForm.getComprobanteFormaPago(); this.Grabar(6L); } this.comprobante.PUNTOEMISION = CredencialUsuario.getInstancia().getPuntoDeEmision(); if (this.comprobante.PUNTOEMISION.ELECTRONICO.Equals("S")) { this.autorizarSri(this.comprobante); } this.Imprimir(); this.simpleButtonAutorizar.Enabled = true; this.DatosIniciales(); } } }
public override void Autorizar() { this.simpleButtonAutorizar.Enabled = false; if (!validarDatos()) { this.simpleButtonAutorizar.Enabled = true; return; } ; FormaPagoForm pago = new FormaPagoForm(this.comprobante); pago.ShowDialog(); if (pago.DialogResult == DialogResult.OK) { this.detalleFormaPago = (List <COMPROBANTEFORMAPAGO>)(pago.getComprobanteFormaPago()); this.Grabar((long)EnumEstadoComprobante.AUTORIZADO); } this.comprobante.PUNTOEMISION = CredencialUsuario.getInstancia().getPuntoDeEmision(); this.comprobante.TIPOCOMPROBANTE = (TIPOCOMPROBANTE)this.CODIGOTIPOCOMPROBANTELookUpEdit.GetSelectedDataRow(); this.Imprimir(); this.simpleButtonAutorizar.Enabled = true; this.DatosIniciales(); }