Esempio n. 1
0
        public OperationResult <Info> GetAdminInfoById(int id)
        {
            Info info   = InfoDao.GetAdminInfoById(id);
            var  result = new OperationResult <Info>(info, (info != null));

            return(result);
        }
Esempio n. 2
0
        public OperationResult <Info> GetInfoById(int id)
        {
            Info list   = InfoDao.GetInfoById(id);
            var  result = new OperationResult <Info>(list, (list != null));

            return(result);
        }
Esempio n. 3
0
        public OperationResult <List <Info> > GetTopListByChannelId(int channelId, int total)
        {
            List <Info> list   = InfoDao.GetListByChannelId(channelId, total);
            var         result = new OperationResult <List <Info> >(list, (list != null));

            return(result);
        }
Esempio n. 4
0
 public OperationMsg Edit(int userId, int infoId, int channelId, int ShowSort, string infoTitle, string infoContent, bool Enable, string TitleImg, string jumpUrl)
 {
     if (infoId > 0)
     {
         return(new OperationMsg(InfoDao.Edit(userId, infoId, channelId, ShowSort, infoTitle, infoContent, Enable, TitleImg)));
     }
     else
     {
         int id = InfoDao.Insert(userId, channelId, ShowSort, infoTitle, infoContent, Enable, TitleImg, jumpUrl);
         if (id > 0)
         {
             Channel_Info_RelationDao.Insert(id, channelId);
         }
         return(new OperationMsg(id > 0));
     }
 }
Esempio n. 5
0
        public OperationResult <bool> Delete(int id)
        {
            var result = new OperationResult <bool>(InfoDao.Delete(id));

            return(result);
        }
Esempio n. 6
0
 public GridPage <Info> GetPager(int pageSize, int pageCurrentIndex, int channelId)
 {
     return(InfoDao.GetPager(pageSize, pageCurrentIndex, channelId));
 }