private void btnGastoAgregar_Click(object sender, EventArgs e) { // Se pre-selecciona la cuenta según la posición en el Grid var oGasto = new GastoContable(); if (this.tgvCuentas.CurrentNode != null && this.tgvCuentas.CurrentNode.Level == 4) { int iId = Util.Entero(this.tgvCuentas.CurrentNode.Cells["Cuentas_Id"].Value); oGasto.Load += new EventHandler((s, ea) => { oGasto.SeleccionarCuentaFinal(iId); }); } var frmCont = new ContenedorControl("Agregar Gasto", oGasto); frmCont.FormBorderStyle = FormBorderStyle.Sizable; if (frmCont.ShowDialog(Principal.Instance) == DialogResult.OK) { this.LlenarCuentasTotales(); } frmCont.Dispose(); }
private void btnGastoAgregar_Click(object sender, EventArgs e) { // Se pre-selecciona la cuenta según la posición en el Grid var oGasto = new GastoContable(); if (this.tgvCuentas.CurrentNode != null && this.tgvCuentas.CurrentNode.Level == 4) { int iId = Util.Entero(this.tgvCuentas.CurrentNode.Cells["Cuentas_Id"].Value); oGasto.Load += new EventHandler((s, ea) => { oGasto.SeleccionarCuentaFinal(iId); }); } var frmCont = new ContenedorControl("Agregar Gasto", oGasto); frmCont.FormBorderStyle = FormBorderStyle.Sizable; if (frmCont.ShowDialog(Principal.Instance) == DialogResult.OK) this.LlenarCuentasTotales(); frmCont.Dispose(); }