Admin/jiaoyiQuery.aspx.cs

(开头部分) 3KB

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

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

public partial class jiaoyiQuery : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string sql = "select * from Project";
            DataSet result = new DataSet();
            result = new Class1().hsggetdata(sql);
            this.DropDownList1.Items.Add("");
            if (result != null)
            {
                for (int i = 0; i < result.Tables[0].Rows.Count; i++)
                {
                    this.DropDownList1.Items.Add(result.Tables[0].Rows[i]["Name"].ToString());
                }
            }
            sql = "select * from jiaoyi order by id desc";
            string strsql = "select sum(jiner) as jiner from jiaoyi where 1>0";
            getdata(sql, strsql);
        }
    }
    private void getdata(string sql,string strsql)
    {
        DataSet result = new DataSet();
        result = new Class1().hsggetdata(sql);
        if (result != null)
        {

            if (result.Tables[0].Rows.Count > 0)
            {
                DataGrid1.DataSource = result.Tables[0];
                DataGrid1.DataBind();
                Label1.Text = "以上数据中共" + result.Tables[0].Rows.Count + "条";
            }
            else
            {
                DataGrid1.DataSource = null;
                DataGrid1.DataBind();
                Label1.Text = "以上数据中共0条";
            }
        }
        if (strsql != "") 
        {
            result = new Class1().hsggetdata(strsql);
            if (result.Tables[0].Rows.Count > 0) 
            {
                this.Label2.Text = result.Tables[0].Rows[0]["jiner"].ToString() + "元";
            }
        }
        
    }
后面还有 30 行代码,购买后查看完整代码

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

AI 解读 AI

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

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