Пример #1
0
        internal void CopyValues(LineaPedidoProveedor source)
        {
            if (source == null)
            {
                return;
            }

            _record.CopyValues(source._base.Record);

            _pendiente        = source.Pendiente;
            _pendiente_bultos = source.PendienteBultos;
            _oid_stock        = source.OidStock;
            _expediente       = source.Expediente;
            _almacen          = source.Almacen;
        }
        /// <summary>
        /// Retrieve the complete list from db
        /// </summary>
        /// <param name="retrieve_childs">Retrieving the childs</param>
        /// <returns></returns>
        public static LineaPedidoProveeedorList GetList(bool retrieve_childs)
        {
            CriteriaEx criteria = LineaPedidoProveedor.GetCriteria(LineaPedidoProveedor.OpenSession());

            criteria.Childs = retrieve_childs;

            //No criteria. Retrieve all de List

            if (nHManager.Instance.UseDirectSQL)
            {
                criteria.Query = SELECT();
            }

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

            CloseSession(criteria.SessionCode);
            return(list);
        }
        public static LineaPedidoProveeedorList GetPendientesChildList(PedidoProveedorInfo parent, bool childs)
        {
            CriteriaEx criteria = LineaPedidoProveedor.GetCriteria(LineaPedidoProveedor.OpenSession());

            criteria.Childs = childs;

            QueryConditions conditions = new QueryConditions
            {
                PedidoProveedor = parent
            };

            criteria.Query = SELECT_PENDIENTES(conditions);

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

            CloseSession(criteria.SessionCode);
            return(list);
        }
 public static string SELECT_PENDIENTES(QueryConditions conditions)
 {
     return(LineaPedidoProveedor.SELECT_PENDIENTES(conditions, false));
 }