admin/diandongcheAdd.aspx.cs
(完整代码) 1KBusing 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 admin_diandongcheAdd : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
string bianhao = this.bianhao.Text;
string mingcheng = this.mingcheng.Text;
string shengchanshang = this.shengchanshang.Text;
string goumairiqi = this.goumairiqi.Text;
string leixing = this.DropDownList1.Text;
string strsql = "select * from diandongche where bianhao='" + bianhao + "'";
sqlConn conn = new sqlConn();
DataSet ds = new DataSet();
ds = conn.hsggetdata(strsql);
if (ds.Tables[0].Rows.Count > 0)
{
Response.Write("<script>javascript:alert('电动车编号已经存在,不能重复添加');</script>");
}
strsql = "Insert into diandongche(bianhao,mingcheng,shengchanshang,goumairiqi,leixing)values(";
strsql += "'" + bianhao + "','" + mingcheng + "','" + shengchanshang + "','" + goumairiqi + "','" + leixing + "')";
int result;
result = conn.hsgexucute(strsql);
if (result == 1)
{
Response.Write("<script language=javascript>alert('添加成功!');location='diandongcheAdd.aspx'</script>");
}
else
{
Response.Write("<script>javascript:alert('系统错误,请检查数据库的连?);</script>");
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。