예제 #1
0
        public static BatchList GetChildList(StoreInfo parent, bool childs)
        {
            CriteriaEx criteria = Batch.GetCriteria(Batch.OpenSession());

            criteria.Query  = SELECT(parent);
            criteria.Childs = childs;

            BatchList list = DataPortal.Fetch <BatchList>(criteria);

            list.CloseSession();

            return(list);
        }
        /// <summary>
        /// Copia los atributos del objeto
        /// </summary>
        /// <param name="source">Objeto origen</param>
        protected void CopyValues(InventarioAlmacenInfo source)
        {
            if (source == null)
            {
                return;
            }


            StoreInfo almacen = StoreInfo.Get(OidAlmacen, false);

            if (almacen != null)
            {
                _base.Almacen = almacen.Nombre;
            }
        }
예제 #3
0
        public static ProductList GetListByAlmacen(long oid, bool childs)
        {
            CriteriaEx criteria = Product.GetCriteria(Product.OpenSession());

            criteria.Childs = childs;

            StoreInfo item = Almacen.New().GetInfo();

            item.Oid       = oid;
            criteria.Query = ProductList.SELECT(item);

            ProductList list = DataPortal.Fetch <ProductList>(criteria);

            CloseSession(criteria.SessionCode);
            return(list);
        }
예제 #4
0
        public static BatchList GetChildListByProducto(StoreInfo parent, long oidProducto, bool childs)
        {
            CriteriaEx criteria = Batch.GetCriteria(Batch.OpenSession());

            criteria.Childs = childs;

            QueryConditions conditions = new QueryConditions
            {
                Almacen  = parent,
                Producto = Product.New().GetInfo(false)
            };

            conditions.Producto.Oid = oidProducto;
            criteria.Query          = Batchs.SELECT(conditions);

            BatchList list = DataPortal.Fetch <BatchList>(criteria);

            list.CloseSession();

            return(list);
        }
예제 #5
0
 public static string SELECT(StoreInfo item)
 {
     return(Product.SELECT(item, false));
 }
 public static string SELECT(StoreInfo parent)
 {
     return(SELECT(new QueryConditions {
         Almacen = parent
     }));
 }
예제 #7
0
 public static string SELECT(StoreInfo item)
 {
     return(SELECT(new Library.Store.QueryConditions {
         Almacen = item
     }));
 }