xuanzeti_add.aspx.cs

(开头部分) 2KB

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

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using SimpleExam.App_Code;

namespace SimpleExam
{
    public partial class xuanzeti_add : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                addxiala2("nanyichengdu", "nanyichengdu");
                daan.Items.Add("A");
                daan.Items.Add("B");
                daan.Items.Add("C");
                daan.Items.Add("D");
            }
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            ischongfu("select id from xuanzeti where  timu='" + timu.Text.ToString().Trim() + "' and nanyichengdu='" + nanyichengdu.Text.ToString().Trim() + "'");
            string sql;
            sql = "insert into xuanzeti(timu,nanyichengdu,xuanxiangA,xuanxiangB,xuanxiangC,xuanxiangD,daan) values('" + timu.Text.ToString().Trim() + "','" + nanyichengdu.Text.ToString().Trim() + "','" + xuanxiangA.Text.ToString().Trim() + "','" + xuanxiangB.Text.ToString().Trim() + "','" + xuanxiangC.Text.ToString().Trim() + "','" + xuanxiangD.Text.ToString().Trim() + "','" + daan.Text.ToString().Trim() + "') ";
            int result;
            result = new Class1().hsgexucute(sql);
            if (result == 1)
            {
                Response.Write("<script>javascript:alert('添加成功');</script>");
            }
            else
            {
                Response.Write("<script>javascript:alert('系统错误,请检查数据库设置问题');</script>");
            }
        }
        private void addxiala2(string ntable, string nzd)
        {
            string sql;
            sql = "select " + nzd + " from " + ntable + " order by id desc";
            DataSet result = new DataSet();
            result = new Class1().hsggetdata(sql);
            if (result != null)
            {
                if (result.Tables[0].Rows.Count > 0)
                {
                    int i = 0;
                    for (i = 0; i < result.Tables[0].Rows.Count; i++)
                    {
                        nanyichengdu.Items.Add(result.Tables[0].Rows[i][0].ToString().Trim());
                    }
                }
            }
后面还有 16 行代码,购买后查看完整代码

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

AI 解读 AI

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

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