Beispiel #1
0
        public void Insert(int id_orden, int id_producto, int cantidad)
        {
            Producto p = new Producto();//primero se disminuye la cantidad de ese prod en el almacen

            p.LoadByPrimaryKey(id_producto);
            this.AddNew();
            this.Id_orden    = id_orden;
            this.Id_producto = id_producto;
            this.Cantidad    = cantidad;
            this.Save();
        }
Beispiel #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();
     }
 }