Exemplo n.º 1
0
    private void BindData(int Type)
    {
        DataTable cacheAsDataTable = Shove._Web.Cache.GetCacheAsDataTable("MemberQuestionList_" + Type.ToString() + "_" + base._User.ID.ToString());

        if (cacheAsDataTable == null)
        {
            switch (Type)
            {
            case 1:
                cacheAsDataTable = new Views.V_Questions().Open("", "SiteID = " + base._Site.ID.ToString() + " and UserID = " + base._User.ID.ToString() + " and UseType = 1", "[DateTime] desc");
                break;

            case 2:
                cacheAsDataTable = new Views.V_Questions().Open("", "SiteID = " + base._Site.ID.ToString() + " and UserID = " + base._User.ID.ToString() + " and UseType = 1 and AnswerStatus = 0", "[DateTime] desc");
                break;

            case 3:
                cacheAsDataTable = new Views.V_Questions().Open("", "SiteID = " + base._Site.ID.ToString() + " and UserID = " + base._User.ID.ToString() + " and UseType = 1 and AnswerStatus = 1", "[DateTime] desc");
                break;
            }
            if (cacheAsDataTable == null)
            {
                PF.GoError(4, "数据库繁忙,请重试", base.GetType().FullName);
                return;
            }
            Shove._Web.Cache.SetCache("MemberQuestionList_" + Type.ToString() + "_" + base._User.ID.ToString(), cacheAsDataTable);
        }
        PF.DataGridBindData(this.g, cacheAsDataTable, this.gPager);
    }
Exemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (base.IsPostBack)
        {
            return;
        }
        this.labUserName.Text = base._User.Name;
        long num = _Convert.StrToLong(Utility.GetRequest("id"), 0L);

        if (num > 0L)
        {
            DataTable table = new Views.V_Questions().Open("", "id = " + num.ToString(), "");
            if ((table == null) || (table.Rows.Count == 0))
            {
                PF.GoError(4, "数据库繁忙,请重试", "Room_QuestionList");
                return;
            }
            if (table.Rows.Count > 0)
            {
                this.labContent.Text = table.Rows[0]["Content"].ToString();
                this.labAnswer.Text  = table.Rows[0]["Answer"].ToString();
                switch (_Convert.StrToShort(table.Rows[0]["AnswerStatus"].ToString(), 0))
                {
                case 0:
                    this.labAnswerDateTime.Text = "未答复";
                    goto Label_0173;

                case 1:
                    this.labAnswerDateTime.Text = "处理中";
                    goto Label_0173;
                }
                this.labAnswerDateTime.Text = "(答复时间:" + table.Rows[0]["AnswerDateTime"].ToString() + ")";
            }
        }
Label_0173:
        this.btnType_1_Click(this.btnType_1, e);
    }