///<Summary> ///RoleCollectionFromSearchFieldsCount ///This method returns the collection count of BORole objects, filtered by a search object ///</Summary> ///<returns> ///Int32 ///</returns> ///<parameters> /// ///</parameters> public static Int32 RoleCollectionFromSearchFieldsCount(BORole boRole) { try { DAORole daoRole = new DAORole(); daoRole.Id = boRole.Id; daoRole.Name = boRole.Name; Int32 objCount = DAORole.SelectAllBySearchFieldsCount(daoRole); return(objCount); } catch { throw; } }
///<Summary> ///RoleCollectionFromSearchFields ///This method returns the collection of BORole objects, filtered by a search object ///</Summary> ///<returns> ///List<BORole> ///</returns> ///<parameters> /// ///</parameters> public static IList <BORole> RoleCollectionFromSearchFields(BORole boRole) { try { IList <BORole> boRoleCollection = new List <BORole>(); DAORole daoRole = new DAORole(); daoRole.Id = boRole.Id; daoRole.Name = boRole.Name; IList <DAORole> daoRoleCollection = DAORole.SelectAllBySearchFields(daoRole); foreach (DAORole resdaoRole in daoRoleCollection) { boRoleCollection.Add(new BORole(resdaoRole)); } return(boRoleCollection); } catch { throw; } }