private void OnSeleccionarTipoGastoFinished(TiposGasto tipoGasto) { if (SeleccionarFinished != null) { SeleccionarFinished(this, tipoGasto); } }
private void SetConcepto(object sender, TiposGasto tipo) { TxtConcepto.Text = tipo != null ? (tipo.Descripcion ?? TxtConcepto.Text) : TxtConcepto.Text; }
private void RefrescarCbxTiposGasto(object sender, TiposGasto tipo) { CbxTipoGastos.CargarTiposGasto(); CbxTipoGastos.TipoGastoId = tipo.Id; SetConcepto(sender, tipo); }
private void SeleccionarTiposGasto() { _tiposGasto = TipoGastoId.HasValue ? Uow.TiposGastos.Obtener(p => p.Id == (int)Combo.SelectedValue) : null; OnSeleccionarTipoGastoFinished(_tiposGasto); }
private void CargarTipoGasto() { if (_tipoGastoId == 0) { this.Text = "Crear Tipo de Gasto"; _tipoGasto = new TiposGasto(); //Default values. } else { this.Text = "Editar Tipo de Gasto"; _tipoGasto = Uow.TiposGastos.Obtener(t => t.Id == _tipoGastoId); } this.Nombre = _tipoGasto.Nombre; this.Abreviatura= _tipoGasto.Abreviatura; this.Descripcion= _tipoGasto.Descripcion; this.BienDeUso= _tipoGasto.BienDeUso??false; }