Exemple #1
0
 public bool ThisOrAnyChildMatchesFilter(string filter)
 {
     return(
         (MatchesFilter(filter)) ||
         (HelpCategories.Any(hc => hc.ThisOrAnyChildMatchesFilter(filter)))
         );
 }
Exemple #2
0
        public List <HelpCategories> Get()
        {
            List <HelpCategories> list = new List <HelpCategories>();

            DataProvider.ExecuteCmd("dbo.HelpCategories_SelectAll"
                                    , inputParamMapper : null
                                    , singleRecordMapper : delegate(IDataReader reader, short set)
            {
                HelpCategories singleItem = Mapper(reader);
                list.Add(singleItem);
            });
            return(list);
        }
Exemple #3
0
        private HelpCategories Mapper(IDataReader reader)
        {
            HelpCategories singleItem = new HelpCategories();
            int            index      = 0;

            singleItem.Id           = reader.GetSafeInt32(index++);
            singleItem.Name         = reader.GetSafeString(index++);
            singleItem.UrlPath      = reader.GetSafeString(index++);
            singleItem.CreatedDate  = reader.GetSafeDateTime(index++);
            singleItem.ModifiedDate = reader.GetSafeDateTime(index++);
            singleItem.ModifiedBy   = reader.GetSafeString(index++);

            return(singleItem);
        }
Exemple #4
0
        public HelpCategories Get(int id)
        {
            HelpCategories singleItem = null;

            DataProvider.ExecuteCmd("dbo.HelpCategories_SelectById"
                                    , inputParamMapper : delegate(SqlParameterCollection paramCollection)
            {
                paramCollection.AddWithValue("@Id", id);
            }
                                    , singleRecordMapper : delegate(IDataReader reader, short set)
            {
                singleItem = Mapper(reader);
            });
            return(singleItem);
        }
        public List <HelpCategories> GetCategories()
        {
            List <HelpCategories> list = new List <HelpCategories>();

            DataProvider.ExecuteCmd("dbo.HelpCategories_GetCategories"
                                    , inputParamMapper : null
                                    , singleRecordMapper : delegate(IDataReader reader, short set)
            {
                HelpCategories singleItem = new HelpCategories();
                int index          = 0;
                singleItem.Id      = reader.GetSafeInt32(index++);
                singleItem.Name    = reader.GetSafeString(index++);
                singleItem.UrlPath = reader.GetSafeString(index++);
                list.Add(singleItem);
            });
            return(list);
        }