Example #1
0
 private void CargarPortada()
 {
     BLLayer.Producto p = new BLLayer.Producto();
     p.Portada();
     if (p.RowCount > 1)
     {
         this.Producto1.CargarProducto(p);
         this.Producto1.Visible = true;
     }
     if (p.MoveNext())
     {
         this.Producto2.CargarProducto(p);
         this.Producto2.Visible = true;
     }
     if (p.MoveNext())
     {
         this.Producto3.CargarProducto(p);
         this.Producto3.Visible = true;
     }
     if (p.MoveNext())
     {
         this.Producto4.CargarProducto(p);
         this.Producto4.Visible = true;
     }
 }
Example #2
0
 private void CargarProducto(int id_prod)
 {
     BLLayer.Producto p = new BLLayer.Producto();
     p.LoadByPrimaryKey(id_prod);
     if (p.RowCount > 0)
     {
         this.LBNombre.Text     = p.Nombre_producto;
         this.LMarca.Text       = p.Marca;
         this.LPrecio.Text      = "$ " + UsefullProc.FormatoPrecio(p.Precio);
         this.LExistencia.Text  = p.Existencia.ToString();
         this.LDescripcion.Text = p.Descripcion;
         this.IFoto2.ImageUrl   = "~/Handlers/ImageHandler.ashx?id=" + id_prod.ToString();
     }
 }
Example #3
0
        public void Delete(int id_producto)
        {
            Producto p = new Producto();

            p.Delete(id_producto);
        }