public CdaType consultarCda(string cda) { CdaTableAdapter financieraQTA = new CdaTableAdapter(); DataSetCda.CdaDataTable CdaDt = financieraQTA.ConsultarCdaPorCodigo(cda); CdaType cdaType = null; foreach (DataRow row in CdaDt.Rows) { cdaType = new CdaType(); cdaType.cda = row["cda"].ToString(); cdaType.montoPago = Double.Parse(row["monto_pago"].ToString()); cdaType.fechaGeneracion = ((DateTime)row["fecha_gerenacion"]).Add((TimeSpan)row["hora_generacion"]); } return cdaType; }
public CdaType generarCda(string codigoEntidad, string codigoEmpresa, double montopago) { String outCda; DateTime outFechaGeneracion; TimeSpan outHoraGeneracion; CdaQueriesTableAdapter dsFQTA = new CdaQueriesTableAdapter(); dsFQTA.usp_GeneraCda(new Decimal(montopago), codigoEntidad, codigoEmpresa, out outCda, out outFechaGeneracion, out outHoraGeneracion); CdaType response = new CdaType(); response.cda = outCda; response.fechaGeneracion = outFechaGeneracion.Add(outHoraGeneracion); return response; }
public CdaType pagarCda(string cda) { DateTime outFechaPago; TimeSpan outHoraPago; Decimal outMontoPago; CdaQueriesTableAdapter dsFQTA = new CdaQueriesTableAdapter(); CdaType response = null; int res = dsFQTA.usp_PagaCda(cda, out outMontoPago, out outFechaPago, out outHoraPago); response = new CdaType(); response.cda = cda; response.montoPago = Decimal.ToDouble(outMontoPago); response.fechaPago = outFechaPago.Add(outHoraPago); ServicioCeClient ServicioCe = new ServicioCeClient(); String texto = ""; String codigo = ServicioCe.TransmitirPago(cda, response.montoPago, response.fechaPago, out texto); return response; }
public CdaType[] listarCda(string codigoEmpresa) { CdaTableAdapter financieraQTA = new CdaTableAdapter(); DataSetCda.CdaDataTable CdaDt = financieraQTA.ConsultarCdaPendientePago(codigoEmpresa); List<CdaType> CdaTypeList = new List<CdaType>(); foreach (DataRow row in CdaDt.Rows) { CdaType cdaType = new CdaType(); cdaType.cda = row["cda"].ToString(); cdaType.montoPago = Double.Parse(row["monto_pago"].ToString()); CdaTypeList.Add(cdaType); } CdaType[] CdaTypeArray = CdaTypeList.ToArray(); return CdaTypeArray; }