示例#1
0
 ///<Summary>
 ///DesignationCollectionFromSearchFieldsCount
 ///This method returns the collection count of BODesignation objects, filtered by a search object
 ///</Summary>
 ///<returns>
 ///Int32
 ///</returns>
 ///<parameters>
 ///
 ///</parameters>
 public static Int32 DesignationCollectionFromSearchFieldsCount(BODesignation boDesignation)
 {
     try
     {
         DAODesignation daoDesignation = new DAODesignation();
         daoDesignation.Id   = boDesignation.Id;
         daoDesignation.Name = boDesignation.Name;
         Int32 objCount = DAODesignation.SelectAllBySearchFieldsCount(daoDesignation);
         return(objCount);
     }
     catch
     {
         throw;
     }
 }
示例#2
0
        ///<Summary>
        ///DesignationCollectionFromSearchFields
        ///This method returns the collection of BODesignation objects, filtered by a search object
        ///</Summary>
        ///<returns>
        ///List<BODesignation>
        ///</returns>
        ///<parameters>
        ///
        ///</parameters>
        public static IList <BODesignation> DesignationCollectionFromSearchFields(BODesignation boDesignation)
        {
            try
            {
                IList <BODesignation> boDesignationCollection = new List <BODesignation>();
                DAODesignation        daoDesignation          = new DAODesignation();
                daoDesignation.Id   = boDesignation.Id;
                daoDesignation.Name = boDesignation.Name;
                IList <DAODesignation> daoDesignationCollection = DAODesignation.SelectAllBySearchFields(daoDesignation);

                foreach (DAODesignation resdaoDesignation in daoDesignationCollection)
                {
                    boDesignationCollection.Add(new BODesignation(resdaoDesignation));
                }

                return(boDesignationCollection);
            }
            catch
            {
                throw;
            }
        }