private void FrmSaldosAhorros_Load(object sender, EventArgs e) { ahorrorosRegistrados cl = new blAhorrador().gmtdConsultarTotalesdeAhorros(); this.txtAhorroaFuturo.Text = cl.decAhorroaFuturo.ToString("##,###,#00.00"); this.txtAhorroEstudiantil.Text = cl.decAhorroEstudiantil.ToString("##,###,#00.00"); this.txtAhorroFijo.Text = cl.decAhorroFijo.ToString("##,###,#00.00"); this.txtAhorroNavideño.Text = cl.decAhorroNavideño.ToString("##,###,#00.00"); this.txtAhorroEscolar.Text = cl.decAhorroNatilleraEscolar.ToString("##,###,#00.00"); this.txtAhorrosalaVista.Text = cl.decAhorroalaVista.ToString("##,###,#00.00"); this.txtCdta.Text = cl.decAhorroCdta.ToString("##,###,#00.00"); this.txtTotales.Text = cl.decTotales.ToString("##,###,#00.00"); }
private void dgv_DoubleClick(object sender, EventArgs e) { this.pmtdLimpiarText(); tblAhorradore ahorrador = new tblAhorradore(); DataGridViewSelectedRowCollection rows = ((DataGridView)sender).SelectedRows; foreach (DataGridViewRow dato in rows) { ahorrador = new blAhorrador().gmtdConsultarDetalle(dato.Cells[1].Value.ToString()); } if (ahorrador.strNombreAho != null) { this.txtCedula.Enabled = false; if (ahorrador.bitSexo == true) { this.cboSexo.SelectedIndex = 0; } else { this.cboSexo.SelectedIndex = 1; } this.txtCodigo.Text = ahorrador.intCodigoSoc.ToString(); this.txtApellido1.Text = ahorrador.strApellido1Aho; this.txtApellido2.Text = ahorrador.strApellido2Aho; this.txtApellidoBeneficiario.Text = ahorrador.strApellidoBen; this.txtCedula.Text = ahorrador.strCedulaAho; this.txtCedulaBeneficiario.Text = ahorrador.strCedulaBen; this.txtDireccion.Text = ahorrador.strDireccion; this.txtMail.Text = ahorrador.strCorreo; this.txtNombre.Text = ahorrador.strNombreAho; this.txtNombreBeneficiario.Text = ahorrador.strNombreBen; this.txtTelefono.Text = ahorrador.strTelefono; this.cboBarrios.SelectedValue = ahorrador.strCodBarrio; this.cboEscolaridad.SelectedValue = ahorrador.strEscolaridad; this.cboOficios.SelectedValue = ahorrador.strCodOficio; this.cboOrigen.SelectedText = ahorrador.strOrigen; this.cboTipo.SelectedText = ahorrador.strTipoCed; this.dtpIngreso.Value = ahorrador.dtmFechaIng; this.dtpNacimiento.Value = ahorrador.dtmFechaNac; this.chkAhorroEstudiantil.Checked = ahorrador.bitAhorroEstudiantil; this.chkExcenta4xMil.Checked = Convert.ToBoolean(ahorrador.bitCobraCuatroxMil); this.txtCedulaAut.Text = ahorrador.strCedulaAut; this.txtNombreAut.Text = ahorrador.strNombreAut; this.txtApellidoAut.Text = ahorrador.strApellidoAut; this.txtLugardeExpedicion.Text = ahorrador.strLugarExpedicion; this.dtmFechaExpedicion.Value = Convert.ToDateTime(ahorrador.dtmFechaExpedicion); } }
private void txtCedulaAho_Leave(object sender, EventArgs e) { if (this.txtCedulaAho.Text.Trim() == "") { this.txtCedulaAho.Text = "0"; } tblAhorradore ahorrador = new blAhorrador().gmtdConsultar(this.txtCedulaAho.Text); if (ahorrador.strNombreAho == null) { this.txtNomAhorrador.Text = ""; } else { this.txtNomAhorrador.Text = ahorrador.strNombreAho + " " + ahorrador.strApellido1Aho + " " + ahorrador.strApellido2Aho; } }
/// <summary> Inserta un cdt. </summary> /// <param name="tobjAhorroaFuturo"> Un objeto del tipo ahorro cdt. </param> /// <returns> Un string que indica si se ejecuto o no la operación. </returns> public string gmtdInsertar(tblAhorrosCdt tobjAhorroCdt) { try { tblIngresosAhorrosCdt ingresoCdt = new tblIngresosAhorrosCdt(); ingresoCdt.decValorCdt = tobjAhorroCdt.decMontoCdt; ingresoCdt.intNumeroCdt = tobjAhorroCdt.intNumeroCdt; tblIngreso ingreso = new tblIngreso(); ingreso.bitAhorroCdt = true; ingreso.decTotalIng = tobjAhorroCdt.decMontoCdt; ingreso.dtmFechaAnu = Convert.ToDateTime("1/1/2009"); ingreso.dtmFechaRec = new blConfiguracion().gmtdCapturarFechadelServidor(); ingreso.strCedulaIng = tobjAhorroCdt.strCedulaAho; ingreso.strComputador = Environment.MachineName; ingreso.strFormulario = tobjAhorroCdt.strFormulario; ingreso.strLetras = new blConfiguracion().montoenLetras(tobjAhorroCdt.decMontoCdt.ToString()); tblAhorradore ahorrador = new blAhorrador().gmtdConsultar(tobjAhorroCdt.strCedulaAho); ingreso.strNombreIng = ahorrador.strNombreAho; ingreso.strApellidoIng = ahorrador.strApellido1Aho + " " + ahorrador.strApellido2Aho; ingreso.strUsuario = ""; ingreso.strUsuario = propiedades.strLogin; ingreso.objIngresosAhorrosCdt = ingresoCdt; ingreso.objAhorroCdt = tobjAhorroCdt; XmlDocument xml = blRecibosIngresos.SerializeServicio(ingreso); string strRetorno = new daoRecibosIngresos().gmtdInsertar(xml); if (strRetorno == "0") { return("- Ha ocurrido un error al ingresar el CDT."); } else { return(strRetorno + "+ Se ha registrado el CDT, el ingreso generado es el # " + strRetorno); } } catch (Exception ex) { new dao().gmtdInsertarError(ex); return("- Ocurrió un error al insertar el registro."); } }
private void txtCedulaAho_Leave(object sender, EventArgs e) { if (this.txtCedulaAho.Text.Trim() == "") { this.txtCedulaAho.Text = "0"; } tblAhorradore ahorrador = new blAhorrador().gmtdConsultar(this.txtCedulaAho.Text); if (ahorrador.strNombreAho == null) { this.txtNomAhorrador.Text = ""; MessageBox.Show("Este número de cédula no aparece registrada como ahorrador. ", "Cdt", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { this.txtNomAhorrador.Text = ahorrador.strNombreAho + " " + ahorrador.strApellido1Aho + " " + ahorrador.strApellido2Aho; } }