public List <clsCuenta> ConsultarCuentas(string strServicio) { List <clsCuenta> lstCuenta = new List <clsCuenta>(); DataTable dtRespuesta = null; clsPersistenciaCuenta objPersistenciaCuenta = new clsPersistenciaCuenta(); try { dtRespuesta = objPersistenciaCuenta.ConsultarCuenta(strServicio); if (dtRespuesta != null) { foreach (DataRow dr in dtRespuesta.Rows) { clsCuenta objCuenta = new clsCuenta(); objCuenta.idCuenta = int.Parse(dr[0].ToString()); objCuenta.numeroCuenta = dr[1].ToString(); objCuenta.idCliente = int.Parse(dr[2].ToString()); objCuenta.nombreCliente = dr[3].ToString(); objCuenta.tipoCuenta = dr[4].ToString(); objCuenta.saldo = double.Parse(dr[5].ToString()); objCuenta.estado = bool.Parse(dr[6].ToString()); lstCuenta.Add(objCuenta); } } } catch (Exception) { throw; } return(lstCuenta); }
internal bool EliminarCuenta(string strServicio, string strNumeroCuenta) { clsPersistenciaCuenta objPersistenciaCuenta = new clsPersistenciaCuenta(); bool retorno = false; try { retorno = objPersistenciaCuenta.EliminarCuenta(strServicio, strNumeroCuenta); } catch (Exception) { throw; } return(retorno); }
internal bool ModificarCuenta(string strServicio, int idCuenta, int idCliente, string strNumeroCuenta, string strTipoCuenta, double dblSaldo, bool estado) { clsPersistenciaCuenta objPersistenciaCuenta = new clsPersistenciaCuenta(); bool retorno = false; try { retorno = objPersistenciaCuenta.ModificarCuenta(strServicio, idCuenta, idCliente, strNumeroCuenta, strTipoCuenta, dblSaldo, estado); } catch (Exception) { throw; } return(retorno); }