admin/news/news_in.aspx.cs

(开头部分) 4KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

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.news
{
    public partial class news_in : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if(!IsPostBack)
            {
                if (Request.QueryString["typeid"] != null)
                {
                    this.Label1.Text = news.typeid(Request.QueryString["typeid"]);
                }
                if (Request.QueryString["id"] == null)
                {
                    this.Button1.Text = " 添加 ";
                }
                else 
                {
                    int id = Convert.ToInt32(Request.QueryString["id"]);
                    string sqlstring = "select * from news where id="+id.ToString();
                    using(DataTable dt=new AcsHelper().ExecuteDataTable(sqlstring))
                    {
                        foreach (DataRow r in dt.Rows)
                        {

                             this.TextBox1.Text=r["btname"].ToString();
                             this.Label1.Text = news.typeid(r["type"]);
                             this.TextBox2.Text = r["title"].ToString();
                             this.TextBox3.Text = r["keyname"].ToString();
                             this.TextBox4.Text = r["counts"].ToString();
                             this.TextBox5.Text = r["nrtext"].ToString();
                        }
                    }
                }
            }
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            if(Request.QueryString["typeid"]!=null)
            {
                int uid = Convert.ToInt32(Request.QueryString["typeid"]);

                string t1 = this.TextBox1.Text;
                string t2 = this.TextBox2.Text;
                string t3 = this.TextBox3.Text;
                string t4 = this.TextBox4.Text;
                string t5 = this.TextBox5.Text;

                

                string sqlstg = "select MAX(px) FROM news where type="+uid.ToString();
后面还有 44 行代码,购买后查看完整代码

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

AI 解读 AI

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

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