Exemple #1
0
 private void setUIData(Activo activo)
 {
     lblActivoId.Text = activo.Id.ToString();
     txtConcepto.Text = activo.Descripcion;
     txtPrecio.Text = activo.Precio.ToString();
     txtCantidad.Text = activo.Existencia.ToString();
     ddlAlmacen.SelectedValue = activo.Almacen.Id.ToString();
 }
Exemple #2
0
        private Activo getUIData()
        {
            activo = new Activo();

            int id = Convert.ToInt32(lblActivoId.Text);
            if (id != 0)
                activo = activoService.findById(id);

            activo.Descripcion = txtConcepto.Text;
            activo.Precio = Convert.ToDouble(txtPrecio.Text);
            activo.Existencia += Convert.ToInt32(txtCantidad.Text);
            activo.Almacen = new Almacen();
            activo.Almacen.Id = Convert.ToInt32(ddlAlmacen.SelectedValue);

            return activo;
        }
Exemple #3
0
 public bool saveOrUpdate(Activo activo)
 {
     return ActivoDAO.getInstance().saveOrUpdate(activo);
 }