admin/wzinfo/cache.aspx.cs

(完整代码) 1KB

using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.OleDb;
using System.Data;

namespace web.admin.wzinfo
{
    public partial class cache : System.Web.UI.Page
    {
        
        protected void Page_Load(object sender, EventArgs e)
        {
            if(!IsPostBack)
            {
                using(DataTable dt=new AcsHelper().ExecuteDataTable("select * from cache where id = 1"))
                {
                    foreach (DataRow r in dt.Rows)
                    {
                        this.RadioButtonList1.SelectedValue = r["iftj"].ToString();
                        this.TextBox1.Text = r["times"].ToString();
                    }
                }
            }
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            string iftj = this.RadioButtonList1.SelectedValue;
            string times = this.TextBox1.Text;

            string sql = "update cache set iftj = "+iftj+",times="+times+" where id = 1";
            int a = new AcsHelper().ExecuteNonQuery(sql);
            if (a > 0)
            {
                Response.Write("<script>alert('修改成功!');location.href='" + Request.RawUrl + "';</script>");
            }
        }
    }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。