Example #1
0
        public List <ArticleCategoryInfo> UpdataSorting(int fatherid, int sorting)
        {
            List <ArticleCategoryInfo> infos = new List <ArticleCategoryInfo>();
            IDataReader reader = db.UpdataSorting(fatherid, sorting, lidValue).CreateDataReader();

            while (reader.Read())
            {
                infos.Add(ArticleCategoryInfo.Populate(reader));
            }
            return(infos);
        }
Example #2
0
        public ArticleCategoryInfo getAllById(int id)
        {
            ArticleCategoryInfo info   = new ArticleCategoryInfo();
            IDataReader         reader = db.GetDataByAcId(id).CreateDataReader();

            if (reader.Read())
            {
                info = ArticleCategoryInfo.Populate(reader);
            }
            return(info);
        }
Example #3
0
        public List <ArticleCategoryInfo> GetDataByFatherIdAndLidOrderSorting(int fatherId, int lidvalue)
        {
            List <ArticleCategoryInfo> infos = new List <ArticleCategoryInfo>();
            IDataReader reader = db.GetDataByFatherIdAndLidOrderSorting(fatherId, lidvalue).CreateDataReader();

            while (reader.Read())
            {
                infos.Add(ArticleCategoryInfo.Populate(reader));
            }
            return(infos);
        }
Example #4
0
        public List <ArticleCategoryInfo> getAll()
        {
            List <ArticleCategoryInfo> infos = new List <ArticleCategoryInfo>();
            IDataReader reader = db.GetData().CreateDataReader();

            while (reader.Read())
            {
                infos.Add(ArticleCategoryInfo.Populate(reader));
            }
            return(infos);
        }
Example #5
0
        public int GetDataByFatherIdAndLidOrderSortDESC(int fatherId, int lidvalue)
        {
            ArticleCategoryInfo info   = new ArticleCategoryInfo();
            IDataReader         reader = db.GetDataByFatherIdAndLidOrderSortDESC(fatherId, lidvalue).CreateDataReader();

            if (reader.Read())
            {
                info = ArticleCategoryInfo.Populate(reader);
                return(info.ac_sorting + 1);
            }
            return(1);
        }