public static FormInfo GetFormInfo(int siteId, int id) { var formInfoList = FormManagerCache.GetCacheFormInfoList(siteId); return(formInfoList.FirstOrDefault(x => x.Id == id)); }
public static FormInfo GetFormInfoByTitle(int siteId, string title) { var formInfoList = FormManagerCache.GetCacheFormInfoList(siteId); return(formInfoList.FirstOrDefault(x => x.Title == title)); }
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()); }
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)); }