コード例 #1
0
ファイル: BORole.cs プロジェクト: duhowise/HelpDeskManager
 ///<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;
     }
 }
コード例 #2
0
ファイル: BORole.cs プロジェクト: duhowise/HelpDeskManager
        ///<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;
            }
        }