Exemplo n.º 1
0
        public static StockList GetByBatchList(long oidBatch, bool childs, bool throwStockException)
        {
            QueryConditions conditions = new QueryConditions {
                Partida = (oidBatch != 0) ? BatchInfo.New(oidBatch) : null
            };

            return(GetList(StockList.SELECT_BATCH(conditions, null, null, false), false));
        }
        public static InputDeliveryList GetListByPartida(bool childs, long oidBatch)
        {
            QueryConditions conditions = new QueryConditions
            {
                Partida = BatchInfo.New(oidBatch)
            };

            return(GetList(childs, SELECT(conditions)));
        }
Exemplo n.º 3
0
        public static Stocks GetListByExpedienteByPartida(long oidExpedient, long oidBatch)
        {
            if (!Stock.CanEditObject())
            {
                throw new System.Security.SecurityException(moleQule.Resources.Messages.USER_NOT_ALLOWED);
            }

            CriteriaEx criteria = Stock.GetCriteria(Stock.OpenSession());

            criteria.Childs = false;

            QueryConditions conditions = new QueryConditions
            {
                Expedient = ExpedientInfo.New(oidExpedient),
                Partida   = BatchInfo.New(oidBatch)
            };

            criteria.Query = Stocks.SELECT(conditions);

            Stock.BeginTransaction(criteria.SessionCode);

            return(DataPortal.Fetch <Stocks>(criteria));
        }