Ejemplo n.º 1
0
 private void OnSeleccionarTipoGastoFinished(TiposGasto tipoGasto)
 {
     if (SeleccionarFinished != null)
     {
         SeleccionarFinished(this, tipoGasto);
     }
 }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
 private void SeleccionarTiposGasto()
 {
     _tiposGasto = TipoGastoId.HasValue ?  Uow.TiposGastos.Obtener(p => p.Id == (int)Combo.SelectedValue) : null;
     OnSeleccionarTipoGastoFinished(_tiposGasto);
 }
Ejemplo n.º 4
0
 private void SetConcepto(object sender, TiposGasto tipo)
 {
     TxtConcepto.Text = tipo != null
                            ? (tipo.Descripcion ?? TxtConcepto.Text)
                            : TxtConcepto.Text;
 }
Ejemplo n.º 5
0
 private void RefrescarCbxTiposGasto(object sender, TiposGasto tipo)
 {
     CbxTipoGastos.CargarTiposGasto();
     CbxTipoGastos.TipoGastoId = tipo.Id;
     SetConcepto(sender, tipo);
 }