コード例 #1
0
ファイル: LCargaMasiva.cs プロジェクト: herrerabc/TPV
        private void saveProducto(Eproductos item, ref ETransactionResult res)
        {
            Daproductos db = new Daproductos();

            db.productos_Insert(item, ref res);

            if (res.result == 0)
            {
                EMovimiento        mov     = new EMovimiento();
                EMovimientoDetalle detalle = new EMovimientoDetalle();
                ETransactionResult result  = new ETransactionResult();
                int     idDetalle          = 0;
                decimal totalCantidad      = 0;

                mov.fecha            = DateTime.Now;
                mov.idMovimiento     = (int)getIdMovimiento();
                mov.idTipoMovimiento = "EPT";
                mov.usuario          = "admin";

                totalCantidad = item.cantidad;
                idDetalle     = (int)getIdMovimientoDet();

                detalle.idDetalle      = idDetalle;
                detalle.idMovimiento   = mov.idMovimiento;
                detalle.tipoAfectacion = "E";
                detalle.idProducto     = item.idProducto;
                detalle.cantidad       = totalCantidad;

                _movimiento.Movimiento_Insert(mov, ref result);
                if (result.result == 0)
                {
                    _movimientoDetalle.MovimientoDetalle_Insert(detalle, ref result);
                }
            }
        }
コード例 #2
0
ファイル: LProductos.cs プロジェクト: herrerabc/TPV
        public object Insert(object obj, ref ETransactionResult result)
        {
            Daproductos daLista = new Daproductos();

            return((Eproductos)daLista.productos_Insert((Eproductos)obj, ref result));
        }