public static TransporterList GetList(ETipoTransportista tipo, bool childs)
        {
            CriteriaEx criteria = Transporter.GetCriteria(Transporter.OpenSession());

            criteria.Childs = childs;

            //No criteria. Retrieve all de List
            if (nHManager.Instance.UseDirectSQL)
            {
                criteria.Query = TransporterList.SELECT(tipo);
            }

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

            CloseSession(criteria.SessionCode);
            return(list);
        }
        public static TransporterList GetList(EEstado estado, bool childs)
        {
            CriteriaEx criteria = Transporter.GetCriteria(Transporter.OpenSession());

            criteria.Childs = childs;

            if (nHManager.Instance.UseDirectSQL)
            {
                criteria.Query = TransporterList.SELECT(new QueryConditions {
                    Estado = estado
                });
            }

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

            CloseSession(criteria.SessionCode);
            return(list);
        }