jiaofei.aspx.cs

(开头部分) 2KB

这里只显示每个文件的开头 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 jiaofei : System.Web.UI.Page
{
    sqlConn conn = new sqlConn();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string id = Request.QueryString["id"].ToString().Trim();
            string sql = "select * from geren where danweizhanghao=(select danweizhanghao from danwei where id=" + id + ")";
            DataSet result = new DataSet();
            result = conn.hsggetdata(sql);
            Repeater1.DataSource = result.Tables[0];
            Repeater1.DataBind();

            sql = "select sum(jiner) as jiner from geren where danweizhanghao=(select danweizhanghao from danwei where id=" + id + ")";
            result = conn.hsggetdata(sql);
            if (result.Tables[0].Rows.Count > 0) 
            {
                this.Label1.Text = result.Tables[0].Rows[0]["jiner"].ToString();
            }
        }
    }
    protected void Button1_Click1(object sender, EventArgs e)
    {
        string id = Request.QueryString["id"].ToString().Trim();

        string strsql1 = " select * from danwei where ID=" + id + " and riqi='" + this.riqi.Text + "' ";
        DataSet ds = conn.hsggetdata(strsql1);
        if (ds.Tables[0].Rows.Count > 0)
        {
            Response.Write("<script>javascript:alert('该单位在" + this.riqi.Text + "已经缴费');</script>");
            return;
        }


        string strsql = "Update danwei set riqi='" + this.riqi.Text + "' where ID=" + id + " ";

        string sql = "select * from geren where danweizhanghao=(select danweizhanghao from danwei where id=" + id + ")";
        DataSet result = new DataSet();
        result = conn.hsggetdata(sql);
        for (int i = 0; i < result.Tables[0].Rows.Count; i++)
        {
            strsql += "Update geren set  riqi='" + this.riqi.Text + "',zongjiner=zongjiner+" + double.Parse(result.Tables[0].Rows[i]["jiner"].ToString()) + " where ID=" + result.Tables[0].Rows[i]["id"].ToString() + "";
            strsql += " Insert into jiaofei(gerenID,riqi,jiner)values(" + result.Tables[0].Rows[i]["id"].ToString() + ",'" + this.riqi.Text + "'," + double.Parse(result.Tables[0].Rows[i]["jiner"].ToString()) + ")";
        }
        int n;
       n  = conn.hsgexucute(strsql);
        if (n >0)
        {
            Response.Write("<script language=javascript>alert('缴费成功!');location='danweilist2.aspx'</script>");
        }
        else
后面还有 5 行代码,购买后查看完整代码

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

AI 解读 AI

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

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