Ejemplo n.º 1
0
        public void Add([FromForm] OfficeProduct info)
        {
            ArbolB <OfficeProduct> .IniciarArbol("OfficeProduct", new StringToObject(OfficeProduct.StringToObject), new ObjectToString(OfficeProduct.ObjectToString));

            SDES.obtainKey();
            ArbolB <OfficeProduct> .InsertarArbol(new OfficeProduct { IdOffice = info.IdOffice, IdProduct = info.IdProduct, Inventory = info.Inventory });
        }
Ejemplo n.º 2
0
        public void Alter([FromForm] OfficeProduct info)
        {
            SDES.obtainKey();
            ArbolB <OfficeProduct> .IniciarArbol("OfficeProduct", new StringToObject(OfficeProduct.StringToObject), new ObjectToString(OfficeProduct.ObjectToString));

            ArbolB <OfficeProduct> .Modificar(info, new string[2] {
                info.Inventory.ToString(), null
            }, new Modify(OfficeProduct.Alter));
        }
 /// <summary>
 ///     Loads the specified product.
 /// </summary>
 /// <param name="product">The product.</param>
 public void Load(OfficeProduct product)
 {
     this.OfficeProductId = product.OfficeProductId;
     this.Name            = product.Name;
     this.Price           = product.Price;
 }