示例#1
0
 public static IList <Contact> GetContactByPager(string where, int pageIndex, int pageSize, ref int recordCount)
 {
     using (DataTable dt = DatabaseProvider.GetInstance().GetContactByPager(pageIndex, pageSize, where, ref recordCount))
     {
         if (dt != null)
         {
             IList <Contact> list = DbTranslate.Translate <Contact>(dt);
             if (list != null && list.Count > 0)
             {
                 return(list);
             }
         }
     }
     return(null);
 }
示例#2
0
 public static IList <Comment> GetCommentsByMid(int pageIndex, int pageSize, long mid, long uid, int isFollow, ref int rowCount)
 {
     using (DataTable dt = DatabaseProvider.GetInstance().GetCommentsByMid(pageIndex, pageSize, mid, uid, isFollow, ref rowCount))
     {
         if (dt != null)
         {
             IList <Comment> list = DbTranslate.Translate <Comment>(dt);
             if (list != null && list.Count > 0)
             {
                 return(list);
             }
         }
     }
     return(null);
 }
示例#3
0
 public static IList <Comment> GetRecCommentsByPager(long uid, int isFollow, string key, int pageIndex, int pageSize, ref int recordCount)
 {
     using (DataTable dt = DatabaseProvider.GetInstance().GetRecCommentsByPager(pageIndex, pageSize, uid, isFollow, key, ref recordCount))
     {
         if (dt != null)
         {
             IList <Comment> list = DbTranslate.Translate <Comment>(dt);
             if (list != null && list.Count > 0)
             {
                 return(list);
             }
         }
     }
     return(null);
 }
示例#4
0
文件: Topics.cs 项目: apple0523/Weibo
 public static IList <StatisticTopic> GetTopStaticTopic(DateTime startTime, DateTime endTime, int topCount)
 {
     using (DataTable dt = DatabaseProvider.GetInstance().GetTopStaticTopic(startTime, endTime, topCount))
     {
         if (dt != null)
         {
             IList <StatisticTopic> list = DbTranslate.Translate <StatisticTopic>(dt);
             if (list != null && list.Count > 0)
             {
                 return(list);
             }
         }
     }
     return(null);
 }
示例#5
0
 public static IList <Comment> GetTop10CommentsByMid(long mid)
 {
     using (DataTable dt = DatabaseProvider.GetInstance().GetTop10CommentsByMid(mid))
     {
         if (dt != null)
         {
             IList <Comment> list = DbTranslate.Translate <Comment>(dt);
             if (list != null && list.Count > 0)
             {
                 return(list);
             }
         }
     }
     return(null);
 }
示例#6
0
文件: Topics.cs 项目: apple0523/Weibo
 public static IList <Topic> GetTopicsByPager(int pageIndex, int pageSize, string where, ref int rowCount)
 {
     using (DataTable dt = DatabaseProvider.GetInstance().GetTopicsByPager(pageIndex, pageSize, where, ref rowCount))
     {
         if (dt != null)
         {
             IList <Topic> list = DbTranslate.Translate <Topic>(dt);
             if (list != null && list.Count > 0)
             {
                 return(list);
             }
         }
     }
     return(null);
 }
示例#7
0
文件: Topics.cs 项目: apple0523/Weibo
 public static IList <Topic> GetTopicsBySearch(string searchName)
 {
     using (DataTable dt = DatabaseProvider.GetInstance().GetTopicsBySearch(searchName))
     {
         if (dt != null)
         {
             IList <Topic> list = DbTranslate.Translate <Topic>(dt);
             if (list != null && list.Count > 0)
             {
                 return(list);
             }
         }
     }
     return(null);
 }
示例#8
0
 public static IList <Expression> GetAllExpressions()
 {
     using (DataTable dt = DatabaseProvider.GetInstance().GetAllExpressions())
     {
         if (dt != null)
         {
             IList <Expression> list = DbTranslate.Translate <Expression>(dt);
             if (list != null && list.Count > 0)
             {
                 return(list);
             }
         }
         return(null);
     }
 }
示例#9
0
文件: Types.cs 项目: apple0523/Weibo
 public static IList <Entity.Type> GetTypesByPID(int pid)
 {
     using (DataTable dt = DatabaseProvider.GetInstance().GetTypesByPID(pid))
     {
         if (dt != null)
         {
             IList <Entity.Type> list = DbTranslate.Translate <Entity.Type>(dt);
             if (list != null && list.Count > 0)
             {
                 return(list);
             }
         }
         return(null);
     }
 }
示例#10
0
 public static IList <School> GetSchoolsByLikeName(string name)
 {
     using (DataTable dt = DatabaseProvider.GetInstance().GetSchoolsByLikeName(name))
     {
         if (dt != null)
         {
             IList <School> list = DbTranslate.Translate <School>(dt);
             if (list != null && list.Count > 0)
             {
                 return(list);
             }
         }
     }
     return(null);
 }
示例#11
0
 public static IList <Follow> GetOtherFollowByPager(long otherUid, long curUid, int pageIndex, int pageSize, string where, string orderby, ref int rowCount)
 {
     using (DataTable dr = DatabaseProvider.GetInstance().GetOtherFollowByPager(otherUid, curUid, pageIndex, pageSize, where, orderby, ref rowCount))
     {
         if (dr != null)
         {
             IList <Follow> list = DbTranslate.Translate <Follow>(dr);
             if (list != null && list.Count > 0)
             {
                 return(list);
             }
         }
     }
     return(null);
 }
示例#12
0
文件: Themes.cs 项目: apple0523/Weibo
 public static IList <Theme> GetRecommendThemes()
 {
     using (DataTable dt = DatabaseProvider.GetInstance().GetRecommendThemes())
     {
         if (dt != null)
         {
             IList <Theme> list = DbTranslate.Translate <Theme>(dt);
             if (list != null && list.Count > 0)
             {
                 return(list);
             }
         }
     }
     return(null);
 }
示例#13
0
 public static IList <User> SearchUser(int pageIndex, int pageSize, ref int rowCount, string key, string school, string tag, string career, int location, int sex, DateTime?birthDayStart, DateTime?birthDayEnd)
 {
     using (DataTable dr = DatabaseProvider.GetInstance().SearchUser(pageIndex, pageSize, ref rowCount, key, school, tag, career, location, sex, birthDayStart, birthDayEnd))
     {
         if (dr != null)
         {
             IList <User> list = DbTranslate.Translate <User>(dr);
             if (list != null && list.Count > 0)
             {
                 return(list);
             }
         }
     }
     return(null);
 }
示例#14
0
 public static IList <Vote> GetVoteByUID(long uid)
 {
     using (DataTable dt = DatabaseProvider.GetInstance().GetVoteByUID(uid))
     {
         if (dt != null)
         {
             IList <Vote> list = DbTranslate.Translate <Vote>(dt);
             if (list != null && list.Count > 0)
             {
                 return(list);
             }
         }
     }
     return(null);
 }
示例#15
0
 public static IList <Favorite> GetFavorteByPager(int pageIndex, int pageSize, long uid, string key, ref int rowCount)
 {
     using (DataTable dt = DatabaseProvider.GetInstance().GetFavorteByPager(pageIndex, pageSize, uid, key, ref rowCount))
     {
         if (dt != null)
         {
             IList <Favorite> list = DbTranslate.Translate <Favorite>(dt);
             if (list != null && list.Count > 0)
             {
                 return(list);
             }
         }
     }
     return(null);
 }
示例#16
0
 public static IList <School> GetShoolsByLetLocType(int Location, string letter, int type)
 {
     using (DataTable dt = DatabaseProvider.GetInstance().GetShoolsByLetLocType(Location, letter, type))
     {
         if (dt != null)
         {
             IList <School> list = DbTranslate.Translate <School>(dt);
             if (list != null && list.Count > 0)
             {
                 return(list);
             }
         }
     }
     return(null);
 }
示例#17
0
 public static IList <MiniBlog> GetAtMeByPager(int pageIndex, int pageSize, string key, int isFollow, int isOri, long uid, ref int rowCount)
 {
     using (DataTable dt = DatabaseProvider.GetInstance().GetAtMeByPager(pageIndex, pageSize, key, isFollow, isOri, uid, ref rowCount))
     {
         if (dt != null)
         {
             IList <MiniBlog> list = DbTranslate.Translate <MiniBlog>(dt);
             if (list != null && list.Count > 0)
             {
                 return(list);
             }
         }
     }
     return(null);
 }
示例#18
0
 public static IList <Career> GetCareersByIsVisible(long uid, int isVisible)
 {
     using (DataTable dt = DatabaseProvider.GetInstance().GetCareersByIsVisible(uid, isVisible))
     {
         if (dt != null)
         {
             IList <Career> list = DbTranslate.Translate <Career>(dt);
             if (list != null && list.Count > 0)
             {
                 return(list);
             }
         }
     }
     return(null);
 }
示例#19
0
 public static IList <MiniBlog> GetTop500MiniBlogsByQuery(string where, string sortField, string sortType)
 {
     using (DataTable dt = DatabaseProvider.GetInstance().GetTop500MiniBlogsByQuery(where, sortField, sortType))
     {
         if (dt != null)
         {
             IList <MiniBlog> list = DbTranslate.Translate <MiniBlog>(dt);
             if (list != null && list.Count > 0)
             {
                 return(list);
             }
         }
     }
     return(null);
 }
示例#20
0
 public static IList <MiniBlog> GetMiniBlogsByUID(long uid, int pageIndex, int pageSize, ref int recordCount)
 {
     using (DataTable dt = DatabaseProvider.GetInstance().GetMiniBlogsByUID(pageIndex, pageSize, ref recordCount, uid))
     {
         if (dt != null)
         {
             IList <MiniBlog> list = DbTranslate.Translate <MiniBlog>(dt);
             if (list != null && list.Count > 0)
             {
                 return(list);
             }
         }
     }
     return(null);
 }
示例#21
0
 public static IList <Tag> GetInterestTag(long uid)
 {
     using (DataTable dt = DatabaseProvider.GetInstance().GetInterestTag(uid))
     {
         if (dt != null)
         {
             IList <Tag> list = DbTranslate.Translate <Tag>(dt);
             if (list != null && list.Count > 0)
             {
                 return(list);
             }
         }
     }
     return(null);
 }
示例#22
0
文件: Groups.cs 项目: apple0523/Weibo
 public static IList <Group> GetGroupsByUID(long UID)
 {
     using (DataTable dt = DatabaseProvider.GetInstance().GetGroupsByUID(UID))
     {
         if (dt != null)
         {
             IList <Group> list = DbTranslate.Translate <Group>(dt);
             if (list != null && list.Count > 0)
             {
                 return(list);
             }
         }
     }
     return(null);
 }
示例#23
0
 public static Career GetCareerByID(long id)
 {
     using (IDataReader dr = DatabaseProvider.GetInstance().GetCareerByID(id))
     {
         if (dr != null)
         {
             IList <Career> list = DbTranslate.Translate <Career>(dr);
             dr.Close();
             if (list != null && list.Count > 0)
             {
                 return(list[0]);
             }
         }
     }
     return(null);
 }
示例#24
0
 public static MiniBlog GetMiniBlogByIDCode(string idCode)
 {
     using (IDataReader dr = DatabaseProvider.GetInstance().GetMiniBlogByIDCode(idCode))
     {
         if (dr != null)
         {
             IList <MiniBlog> list = DbTranslate.Translate <MiniBlog>(dr);
             dr.Close();
             if (list != null && list.Count > 0)
             {
                 return(list[0]);
             }
         }
     }
     return(null);
 }
示例#25
0
 public static IList <MiniBlog> SearchMiniBlogForMbIndexAdvanced(int pageIndex, int pageSize, ref int rowCount, string key, int isOri, int isRet, DateTime?startTime, DateTime?endTime, int isMyself, int isMyFollow,
                                                                 long curUid, int isHavePic, int isHaveLink, int isHaveVideo, int isHaveMusic, int isHaveVote, string sort, long GroupID, int IsFriendShip)
 {
     using (DataTable dt = DatabaseProvider.GetInstance().SearchMiniBlogForMbIndexAdvanced(pageIndex, pageSize, ref rowCount, key, isOri, isRet, startTime, endTime, isMyself, isMyFollow, curUid, isHavePic, isHaveLink, isHaveVideo, isHaveMusic, isHaveVote, sort, GroupID, IsFriendShip))
     {
         if (dt != null)
         {
             IList <MiniBlog> list = DbTranslate.Translate <MiniBlog>(dt);
             if (list != null && list.Count > 0)
             {
                 return(list);
             }
         }
     }
     return(null);
 }
示例#26
0
 public static School GetSchoolByID(int id)
 {
     using (IDataReader dr = DatabaseProvider.GetInstance().GetSchoolByID(id))
     {
         if (dr != null)
         {
             IList <School> list = DbTranslate.Translate <School>(dr);
             dr.Close();
             if (list != null && list.Count > 0)
             {
                 return(list[0]);
             }
         }
     }
     return(null);
 }
示例#27
0
文件: Groups.cs 项目: apple0523/Weibo
 public static Group GetTopSort(long UID)
 {
     using (IDataReader dr = DatabaseProvider.GetInstance().GetTopSort(UID))
     {
         if (dr != null)
         {
             IList <Group> list = DbTranslate.Translate <Group>(dr);
             dr.Close();
             if (list != null && list.Count > 0)
             {
                 return(list[0]);
             }
         }
     }
     return(null);
 }
示例#28
0
文件: Froms.cs 项目: apple0523/Weibo
 public static From GetFromByUrl(string url)
 {
     using (IDataReader dr = DatabaseProvider.GetInstance().GetFromByUrl(url))
     {
         if (dr != null)
         {
             IList <From> list = DbTranslate.Translate <From>(dr);
             dr.Close();
             if (list != null && list.Count > 0)
             {
                 return(list[0]);
             }
         }
     }
     return(null);
 }
示例#29
0
文件: Themes.cs 项目: apple0523/Weibo
 public static ThemeDIY GetThemeDIYByUID(long uid)
 {
     using (IDataReader dr = DatabaseProvider.GetInstance().GetThemeDIYByUID(uid))
     {
         if (dr != null)
         {
             IList <ThemeDIY> list = DbTranslate.Translate <ThemeDIY>(dr);
             dr.Close();
             if (list != null && list.Count > 0)
             {
                 return(list[0]);
             }
         }
     }
     return(null);
 }
示例#30
0
 public static Tag GetTagByName(string Name)
 {
     using (IDataReader dr = DatabaseProvider.GetInstance().GetTagByName(Name))
     {
         if (dr != null)
         {
             IList <Tag> list = DbTranslate.Translate <Tag>(dr);
             dr.Close();
             if (list != null && list.Count > 0)
             {
                 return(list[0]);
             }
         }
     }
     return(null);
 }