·您现在的位置: 云翼网络 >> 文章中心 >> 网站建设 >> 网站建设开发 >> ASP.NET网站开发 >> 请帮我看看这个页面,红色部份如何改才能保存到ACCess数据库中

请帮我看看这个页面,红色部份如何改才能保存到ACCess数据库中

作者:佚名      ASP.NET网站开发编辑:admin      更新时间:2022-07-23

请帮我看看这个页面,红色部份如何改才能保存到access数据库中

<%if session("shiwei_username")="" then%><script language="javascript">top.location.href="../index.asp"</script><%    response.endend if%><!-- #include file="../conn2.asp" --><!-- #include file="../const.asp" --><html><head><title><%=dianming%> - 产品入库</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><link href="../style/style.CSS" rel="stylesheet" type="text/css"><script language="Javascript" type="text/javascript" src="../inc/Public.js"></script><script type="text/javascript" src="http://Ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script><style>body {    background-color:#FFFFFF;}     table{margin: 5px auto 0;}    .add,.remove{color: blue; text-decoration: underline; cursor: pointer; margin: 0 5px;}     .i_color_error,.i_model_error{display: none; color: red;}    .pirce2,.shulian,.ku,.tiaoma{width: 100px;}    .pic{color: #333333; width: 150px;}    #i_model_add{background: #FF8000; color: #EEEEEE; padding: 3px 5px; box-shadow: 0px 1px 1px 1px #CCCCCC; border-radius: 3px; cursor: pointer; margin-left: 5px;}</style></HEAD><BODY><%if fla1="0" and session("shiwei_id")<>"1" then%><br><center><img src="../images/note.gif" align="absmiddle">&nbsp;<font color="#FF0000">你不具备此权限,请与管理员联系!</font></center><%    response.endend if%><%if request("hid1")="ok" thennowid_login=request("id_login")nowid_payment=request("id_payment")set rs_login=conn.execute("select * from login where id="&nowid_login)nowid_gys=request("id_gys")nowgys=""set rs_gys=conn.execute("select * from gys where id="&nowid_gys)if rs_gys.eof=false then nowgys=rs_gys("company")set rs_bianhao=conn.execute("select * from buy order by id desc")if rs_bianhao.eof then  nowbianhao=1000001else  nowbianhao=1000001+rs_bianhao("id")end iftotalshulian=0totalPRice2=0for x=1 to maxproduitnowku=request("ku"&x)set rs_ku=conn.execute("select * from ku where id="&nowku)nowhuohao=request("huohao"&x)nowshulian=request("shulian"&x)nowprice=request("price"&x)if nowprice="" then  nowprice=0end ifnowprice2=request("price2"&x)if nowprice2="" then  nowprice2=0end ifnowprice3=request("price3"&x)if nowprice3="" then  nowprice3=0end ifddan=request("ddan")wuliufee=request("wuliufee")if nowhuohao<>"单击选择产品" and nowshulian<>"" thenset rs_produit=conn.execute("select * from produit where huohao='"&nowhuohao&"'")beizhu=rs_produit("beizhu")price2=rs_produit("price2")price=rs_produit("price")price3=rs_produit("price3")set rs=server.createobject("ADODB.RecordSet")sql="select * from produit where huohao='"&nowhuohao&"' and id_ku="&nowkurs.open sql,conn,1,3if rs.eof then  rs.addnew  rs("id_bigclass")=rs_produit("id_bigclass")  rs("id_smallclass")=rs_produit("id_smallclass")  rs("title")=rs_produit("title")  rs("huohao")=rs_produit("huohao")  rs("tiaoma")=rs_produit("tiaoma")  rs("id_ku")=nowku  rs("shulian")=nowshulian  rs("danwei")=rs_produit("danwei")  rs("price")=rs_produit("price")  rs("price2")=nowprice2  rs("price3")=rs_produit("price3")  rs("sekuan")=rs_produit("sekuan")  rs("guige")=rs_produit("guige")  rs("jingzhong")=rs_produit("jingzhong")  rs("zhuangxiangshu")=rs_produit("zhuangxiangshu")  rs("baojin")=rs_produit("baojin")  rs("class")=rs_produit("class")  rs("duihuan")=rs_produit("duihuan")  rs("tichen_type")=rs_produit("tichen_type")  rs("tichen")=rs_produit("tichen")  rs("photo")=rs_produit("photo")  rs("gys")=nowgys  rs("id_gys")=nowid_gys  rs("beizhu")=beizhuelse  rs("shulian")=rs("shulian")+nowshulian  rs("price2")=nowprice2 end ifrs.updaters.closesql="select bigclass from bigclass where id="&rs_produit("id_bigclass")set rs_bigclass=conn.execute(sql)sql="select smallclass from smallclass where id="&rs_produit("id_smallclass")set rs_smallclass=conn.execute(sql)if rs_smallclass.eof then  smallclass=""else  smallclass=rs_smallclass(0)end iftotalshulian=totalshulian+nowshuliantotalprice2=totalprice2+nowprice2*nowshulianddan=request("ddan")wuliufee=request("wuliufee")sql="insert into buy(ddan,wuliufee,id_payment,id_produit,bigclass,smallclass,title,huohao,tiaoma,id_ku,ku,shulian,sekuan,guige,jingzhong,zhuangxiangshu,id_login,login,type,selldate,price,price2,price3,photo,id_gys,gys,bianhao,beizhu) values('"&ddan&"','"&wuliufee&"',"&nowid_payment&","&rs_produit("id")&",'"&rs_bigclass(0)&"','"&smallclass&"','"&rs_produit("title")&"','"&nowhuohao&"','"&rs_produit("tiaoma")&"',"&rs_ku("id")&",'"&rs_ku("ku")&"',"&nowshulian&",'"&rs_produit("sekuan")&"','"&rs_produit("guige")&"','"&rs_produit("jingzhong")&"','"&rs_produit("zhuangxiangshu")&"',"&nowid_login&",'"&rs_login("username")&"',0,#"&date()&"#,'"&rs_produit("price")&"',"&nowprice2&",'"&rs_produit("price3")&"','"&rs_produit("photo")&"',"&nowid_gys&",'"&nowgys&"','"&nowbianhao&"','"&beizhu&"')"conn.execute(sql)end ifnextsql="insert into buy(ddan,wuliufee,id_payment,shulian,id_login,login,type,selldate,price,price2,price3,id_gys,gys,bianhao,zu) values('"&ddan&"','"&wuliufee&"',"&nowid_payment&","&totalshulian&","&nowid_login&",'"&rs_login("username")&"',0,#"&date()&"#,"&price&","&price2&","&price3&","&nowid_gys&",'"&nowgys&"','"&nowbianhao&"',true)"conn.execute(sql)%><script language="javascript">alert("产品入库成功!")</script> <%if dayin1="yes" then%><script language="javascript">window.open('print_buy.asp?bianhao=<%=nowbianhao%>','打印','width=853,height=470,top=176,left=161,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,scrollbars=yes');</script><%end if%><%end if%><%if request("hid2")<>"" thennowbigclass=request("bigclass")nowsmallclass=request("smallclass")nowtitle=request("title")nowhuohao=request("huohao")nowtiaoma=request("tiaoma")nowku=request("ku")nowshulian=request("shulian")nowdanwei=request("danwei")nowprice=request("price")if nowprice="" then  nowprice=0end ifnowprice2=request("price2")if nowprice2="" then  nowprice2=0end ifnowprice3=request("price3")if nowprice3="" then  nowprice3=0end ifnowguige=request("guige")nowsekuan=request("sekuan")nowjingzhong=request("jingzhong")nowzhuangxiangshu=request("zhuangxiangshu")nowbaojin=request("baojin")nowclass=request("class")nowduihuan=request("duihuan")nowtichen_type=request("tichen_type")nowtichen=request("tichen")nowphoto=request("photo")nowbeizhu=request("beizhu")nowid_login=request("id_login")nowid_gys=request("id_gys")nowgys=""nowid_payment=request("id_payment")set rs_login=conn.execute("select * from login where id="&nowid_login)set rs_gys=conn.execute("select * from gys where id="&nowid_gys)if rs_gys.eof=false then nowgys=rs_gys("company")sql="select * from produit where huohao='"&nowhuohao&"'"set rs=conn.execute(sql)if rs.eof=false then%><script language="javascript">alert("您输入的淘宝条码已经存在,请使用已有产品入库进行添加!")window.history.go(-1)</script> <%  response.endend ifsql="insert into produit(id_bigclass,id_smallclass,title,huohao,tiaoma,id_ku,shulian,danwei,price,price2,price3,guige,sekuan,jingzhong,zhuangxiangshu,baojin,class,tichen_type,tichen,photo,beizhu,id_gys,gys) values("&nowbigclass&","&nowsmallclass&",'"&nowtitle&"','"&nowhuohao&"','"&nowtiaoma&"',"&nowku&","&nowshulian&",'"&nowdanwei&"',"&nowprice&","&nowprice2&","&nowprice3&",'"&nowguige&"','"&nowsekuan&"','"&nowjingzhong&"','"&nowzhuangxiangshu&"',"&nowbaojin&","&nowclass&","&nowtichen_type&","&nowtichen&",'"&nowphoto&"','"&nowbeizhu&"',"&nowid_gys&",'"&nowgys&"')"conn.execute(sql)sql="s