Question.aspx.cs 937 Bytes
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Quiz.SiteBase;

namespace Quiz.WebSite
{
    public partial class Question : WebSiteBase
    {
        protected int Countall = 0;
        protected List<Models.Topic> TopicList = new List<Models.Topic>();
        protected string Name = "", Mobile = "";
        protected int UserType = 0;
        protected void Page_Load(object sender, EventArgs e)
        {
            UserType = RequestInt("userType");
            if (SiteBase.Cache.CacheManage.Topic.CacheData == null) TopicList = new List<Models.Topic>();
            else
            {
                TopicList = (List<Models.Topic>)SiteBase.Cache.CacheManage.Topic.CacheData;
            }
            TopicList = TopicList.Where(o => o.TopicType == UserType).ToList();
            Countall = TopicList.Count;
        }
    }
}