Esempio n. 1
0
        ///<Summary>
        ///Collection<T>
        ///This method returns the collection of T objects, ordered and filtered by optional criteria
        ///</Summary>
        ///<returns>
        ///IList<T>
        ///</returns>
        ///<parameters>
        ///object o (ICriteria)
        ///</parameters>
        public virtual IList <T> Collection <T>(object o)
        {
            Doing(this);
            try
            {
                ICriteria icriteria = (ICriteria)o;
                IList <T> boPrivilegesCollection       = new List <T>();
                IList <IDataCriterion> lstDataCriteria = (icriteria == null) ? null : icriteria.ListDataCriteria();
                IList <IDataOrderBy>   lstDataOrder    = (icriteria == null) ? null : icriteria.ListDataOrder();
                IDataSkip dataSkip = (icriteria == null) ? null : icriteria.DataSkip();
                IDataTake dataTake = (icriteria == null) ? null : icriteria.DataTake();
                IList <IDAOPrivileges> daoPrivilegesCollection = _iPrivilegesRepository.SelectAllByCriteria(lstDataCriteria, lstDataOrder, dataSkip, dataTake);

                foreach (IDAOPrivileges resdaoPrivileges in daoPrivilegesCollection)
                {
                    boPrivilegesCollection.Add((T)(object)new BOPrivileges(resdaoPrivileges));
                }

                return(boPrivilegesCollection);
            }
            catch (Exception ex)
            {
                Failed(this, ex);
                Handle(this, ex);
                return(null);
            }
        }
Esempio n. 2
0
        ///<Summary>
        ///Collection<T>
        ///This method returns the collection of T objects, ordered and filtered by optional criteria
        ///</Summary>
        ///<returns>
        ///IList<T>
        ///</returns>
        ///<parameters>
        ///object o (ICriteria)
        ///</parameters>
        public virtual IList <T> Collection <T>(object o)
        {
            Doing(this);
            try
            {
                ICriteria icriteria = (ICriteria)o;
                IList <T> boCustomerAndSuppliersByCityCollection = new List <T>();
                IList <IDataCriterion> lstDataCriteria           = (icriteria == null) ? null : icriteria.ListDataCriteria();
                IList <IDataOrderBy>   lstDataOrder = (icriteria == null) ? null : icriteria.ListDataOrder();
                IDataSkip dataSkip = (icriteria == null) ? null : icriteria.DataSkip();
                IDataTake dataTake = (icriteria == null) ? null : icriteria.DataTake();
                IList <IDAOCustomerAndSuppliersByCity> daoCustomerAndSuppliersByCityCollection = _iCustomerAndSuppliersByCityRepository.SelectAllByCriteria(lstDataCriteria, lstDataOrder, dataSkip, dataTake);

                foreach (IDAOCustomerAndSuppliersByCity resdaoCustomerAndSuppliersByCity in daoCustomerAndSuppliersByCityCollection)
                {
                    boCustomerAndSuppliersByCityCollection.Add((T)(object)new BOCustomerAndSuppliersByCity(resdaoCustomerAndSuppliersByCity));
                }

                return(boCustomerAndSuppliersByCityCollection);
            }
            catch (Exception ex)
            {
                Failed(this, ex);
                Handle(this, ex);
                return(null);
            }
        }
Esempio n. 3
0
 ///<Summary>
 ///PrivilegesCollectionFromCriteria
 ///This method returns the collection of projections, ordered and filtered by optional criteria
 ///</Summary>
 ///<returns>
 ///IList<IBOPrivileges>
 ///</returns>
 ///<parameters>
 ///ICriteria icriteria
 ///</parameters>
 public virtual IDictionary <string, IList <object> > Projections(object o)
 {
     Doing(this);
     try
     {
         ICriteria icriteria = (ICriteria)o;
         IList <IDataProjection> lstDataProjection = (icriteria == null) ? null : icriteria.ListDataProjection();
         IList <IDataCriterion>  lstDataCriteria   = (icriteria == null) ? null : icriteria.ListDataCriteria();
         IList <IDataOrderBy>    lstDataOrder      = (icriteria == null) ? null : icriteria.ListDataOrder();
         IDataSkip dataSkip = (icriteria == null) ? null : icriteria.DataSkip();
         IDataTake dataTake = (icriteria == null) ? null : icriteria.DataTake();
         return(_iPrivilegesRepository.SelectAllByCriteriaProjection(lstDataProjection, lstDataCriteria, lstDataOrder, dataSkip, dataTake));
     }
     catch (Exception ex)
     {
         Failed(this, ex);
         Handle(this, ex);
         return(null);
     }
 }