public override string EjecutarAccion() { bool flag = false; string str = ""; RespuestaIfcsuspchqdsjv respuestaIfcsuspchqdsjv = new RespuestaIfcsuspchqdsjv(); if (this.tipoTransaccion == EnumTransaccion.SuspensionChequera) { respuestaIfcsuspchqdsjv = HelperIbs.ibsSuspCheqrs(base.Afiliado.AF_CodCliente, base.Afiliado.sAF_Rif, this.SNroCuenta, this.SerialChq, this.MotivoSusp, this.FechaSusp, this.NroChequeInicial, this.NroChequeFinal, this.Monto); flag = (!string.IsNullOrEmpty(respuestaIfcsuspchqdsjv.ifcsuspchqdsjv.EErrores.SVectorCod) ? false : true); } else if (this.tipoTransaccion == EnumTransaccion.SuspensionCheques) { for (int i = 0; i < this.Cheques.Count; i++) { respuestaIfcsuspchqdsjv = HelperIbs.ibsSuspCheqrs(base.Afiliado.AF_CodCliente, base.Afiliado.sAF_Rif, this.SNroCuenta, this.SerialChq, this.MotivoSusp, this.FechaSusp, this.Cheques[i], this.Cheques[i], this.Monto); flag = (!string.IsNullOrEmpty(respuestaIfcsuspchqdsjv.ifcsuspchqdsjv.EErrores.SVectorCod) ? false : true); } } if (!flag) { this.LogSuspension("Fallido"); throw new IBException(respuestaIfcsuspchqdsjv.ifcsuspchqdsjv.EErrores.SVectorCod.Trim()); } str = "Se realizó exitosamente"; this.LogSuspension("Exitoso"); return(str); }
public static RespuestaIfcsuspchqdsjv ibsSuspCheqrs(long SUserId, string SCedRif, string SNroCta, string Sserial, string SmotivSus, DateTime DtfechaSusp, string SCheqDesde, string SCheqHasta, string SMonto) { IfcsuspchqdsjvIn ifcsuspchqdsjvIn = new IfcsuspchqdsjvIn() { SPrefijo = string.Empty, SFiller = string.Empty, SUserId = SUserId.ToString(), SCedRif = SCedRif, SNroCta = SNroCta, SSerial = Sserial, SMotivoSuspen = SmotivSus, SFechaSuspen = DtfechaSusp.ToString("ddMMyy"), SCheqFrom = SCheqDesde, SCheqDesde = SCheqHasta, SMtoCheq = SMonto }; RespuestaIfcsuspchqdsjv respuestaIfcsuspchqdsjv = null; using (IbsServiceService ibsServiceService = new IbsServiceService()) { ibsServiceService.Timeout = 10000; try { respuestaIfcsuspchqdsjv = ibsServiceService.ibaSuspCheqrs(ifcsuspchqdsjvIn); if (respuestaIfcsuspchqdsjv == null) { throw new IBException(9998, "SQLIB"); } if (!string.IsNullOrEmpty(respuestaIfcsuspchqdsjv.SError)) { throw new IBException(respuestaIfcsuspchqdsjv.SError, "SQLIB"); } if (respuestaIfcsuspchqdsjv.ifcsuspchqdsjv == null) { throw new IBException(9998, "SQLIB"); } if ((respuestaIfcsuspchqdsjv.ifcsuspchqdsjv.EErrores == null ? false : !string.IsNullOrEmpty(respuestaIfcsuspchqdsjv.ifcsuspchqdsjv.EErrores.SVectorCod))) { throw new IBException(respuestaIfcsuspchqdsjv.ifcsuspchqdsjv.EErrores.SVectorCod, "IBS"); } } catch (WebException webException) { throw new IBException(9997, "SQLIB"); } catch (SoapException soapException) { throw new IBException(9997, "SQLIB"); } } return(respuestaIfcsuspchqdsjv); }