Esempio n. 1
0
        public void Insertar(int id, string nombre, string descripcion, string color,
                             double valor, string serial, string tipo, string inventario, string peso,
                             string ancho, string alto, string largo, string estado, DateTime compra, DateTime baja)
        {
            activos a = new activos();

            a.id_activo      = id;
            a.nombre         = nombre;
            a.descripcion    = descripcion;
            a.color          = color;
            a.valor_compra   = valor;
            a.serial         = serial;
            a.tipo           = tipo;
            a.num_inventario = inventario;
            a.peso           = peso;
            a.ancho          = ancho;
            a.alto           = alto;
            a.largo          = largo;
            a.estado         = estado;
            a.fecha_compra   = compra;
            a.fecha_baja     = baja;

            activosController ac = new activosController();

            ac.Postactivos(a);
        }
Esempio n. 2
0
        protected void btnPersonas_Click(object sender, EventArgs e)
        {
            activosController ac = new activosController();
            pruebaEntities    db = new pruebaEntities();

            GridViewTodo.DataSource = db.personas.ToList();
            GridViewTodo.DataBind();
        }
Esempio n. 3
0
        protected void btnBuscar_Click(object sender, EventArgs e)
        {
            activosController ac = new activosController();
            pruebaEntities    db = new pruebaEntities();

            if (txtID.Text != "" && dropTipo.Text != "" && calCompra.SelectedDate != null && txtSerial.Text != "")
            {
                int id = Convert.ToInt32(txtID.Text);
                GridViewTodo.DataSource = ac.Getactivo(id);
            }
            else
            {
                GridViewTodo.DataSource = db.activos.ToList();
            }
            GridViewTodo.DataBind();
        }