Admin/DfeiEdit.aspx.cs

(完整代码) 1KB

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

public partial class Admin_DfeiEdit : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            this.DropDownList1.DataTextField = "学号";
            this.DropDownList1.DataValueField = "学号";
            this.DropDownList1.DataSource = Database.GetData("select * from 党员信息");
            this.DropDownList1.DataBind();
        }
    }

    protected void Button2_Click(object sender, EventArgs e)
    {
        Response.Redirect("DfeiList.aspx");
    }
    protected void Button1_Click(object sender, EventArgs e)
    {

            Database.Execute("INSERT INTO [党费] ( [学号] ,[缴费日期] ,[缴费金额] ) VALUES ('"+ this.DropDownList1.SelectedValue +"','"+ TxtLXFS.Text +"',"+ txtBZ.Text +")");

            Page.ClientScript.RegisterStartupScript(this.GetType(), "info", "<script>alert('交费成功!');window.location.href='DfeiList.aspx';</script>");
    }
    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    {
        this.TxtRDRQ.Text = Database.GetData("select 姓名 from 党员信息 where 学号='" + DropDownList1.SelectedValue + "'").Rows[0]["姓名"].ToString();
    }
}

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

AI 解读 AI

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

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