Example #1
0
        /*para crear el detalle de la factura*/

        public Boolean inserDetalle(int id)
        {
            Boolean a = false;


            controlador.CrudFactura fac = new controlador.CrudFactura();
            fac.Idfac = id;
            for (int i = 0; i < idproducto.Count; i++)
            {
                a = fac.inserDetalle(precioVenta[i], cantidad[i], descuento[i], totalproducto[i], idproducto[i]);
            }
            return(a);
        }
Example #2
0
 public void cambioTotal()
 {
     controlador.FacClienselect f = new controlador.FacClienselect();
     if (f.cambioTotalFact(this.Sub, this.iva, this.total, this.idfactura).Equals(true))
     {
         controlador.CrudFactura f2 = new controlador.CrudFactura();
         f2.Idfac = this.idfactura;
         if (f2.inserDetalle(this.precioVenta, this.cantidad, this.descuento, this.totalproducto, this.idproducto).Equals(true))
         {
             this.msg = "Producto agregado";
         }
         else
         {
             this.msg = "No se Agrego detalle";
         }
     }
     else
     {
         this.msg = "No se Agrego";
     }
 }