示例#1
0
        public static FormInfo GetFormInfo(int siteId, int id)
        {
            var formInfoList = FormManagerCache.GetCacheFormInfoList(siteId);

            return(formInfoList.FirstOrDefault(x => x.Id == id));
        }
示例#2
0
        public static FormInfo GetFormInfoByTitle(int siteId, string title)
        {
            var formInfoList = FormManagerCache.GetCacheFormInfoList(siteId);

            return(formInfoList.FirstOrDefault(x => x.Title == title));
        }
示例#3
0
        public static List <FormInfo> GetFormInfoList(int siteId, int channelId)
        {
            var formInfoList = FormManagerCache.GetCacheFormInfoList(siteId);

            return(formInfoList.Where(formInfo => formInfo.ChannelId == channelId).OrderBy(formInfo => formInfo.Taxis == 0 ? int.MaxValue : formInfo.Taxis).ToList());
        }
示例#4
0
        public static FormInfo GetFormInfoByContentId(int siteId, int channelId, int contentId)
        {
            var formInfoList = FormManagerCache.GetCacheFormInfoList(siteId);

            return(formInfoList.FirstOrDefault(x => x.ChannelId == channelId && x.ContentId == contentId));
        }