<!--#INCLUDE FILE="../HXINCLUDE/HXINCLUDEHEAD.ASP"-->
<%if WS_S.MemberPriv("WS_SaleManageProductManage")<>1 then HX_GoBack "对不起,您的权限不够!",""
ColumnName="":Tablename="HX_Product":Tablename1="HX_SaleShop":action=request("action"):id=request("id")
if not WS_S.HX_IsNUM(id) then  HX_GoBack "非法操作","" 
Orderby=" where WS_PTID="&id
set rs=WS_S.HX_SetRSD(ColumnName,Tablename,Orderby)
if action="saveinfo" then
 SSID=WS_s.HX_Replace(request("SSID")):Productname=WS_s.HX_Replace(request("Productname")):Producttype=WS_s.HX_Replace(request("Producttype")):ProductUnitPrice=WS_s.HX_Replace(request("ProductUnitPrice")):ProductPrice=WS_s.HX_Replace(request("ProductPrice")):ProductSalePrice=WS_s.HX_Replace(request("ProductSalePrice")):ProductIntr=WS_s.HX_Replace(request("ProductIntr"))
 Orderby=" where WS_productName='"&Infonname&"' and WS_PTID<>"&id&" and WS_productCreateMan="&loginuid
 set ifrs=WS_S.HX_SetRSD(ColumnName,Tablename,Orderby)
 if ifrs.recordcount>0 then   HX_GoBack "产品资料已存在",""
   rs("WS_SSID")=SSID:rs("WS_ProductName")=ProductName:rs("WS_Producttype")=Producttype:rs("WS_ProductUnitPrice")=ProductUnitPrice
   if WS_S.HX_IsNUM(ProductPrice) then rs("WS_ProductPrice")=ProductPrice
   if WS_S.HX_IsNUM(ProductSalePrice) then rs("WS_ProductSalePrice")=ProductSalePrice
   rs("WS_ProductIntr")=ProductIntr:rs.update
 HX_GoBack "修改成功","ProductManage.asp" 
end if
Orderby=""
response.Write "<head><meta http-equiv='Content-Type' content='text/html; charset=gb2312'><title>修改产品资料</title><link rel=stylesheet type=text/css href='../HXinclude/HX_Style.css'><script src='../HXinclude/HX_Function.js'></script></head><body topmargin='20' leftmargin='0' bottommargin='0'><table width='596'  border='0' cellspacing='1' cellpadding='0' align=center bgcolor='#613c25'><tr><td colspan='2' bgcolor=FFFBE8><table width='100%'  border='0' cellspacing='0' cellpadding='0'><tr><td height='25' background='../hximages/titleline.gif'><font class='fontmenu'>修改产品资料</font>　　　　<a href='productCreate.asp' class='menu'>添加产品</a><a href='ProductManage.asp' class='menu'>产品管理</a></td></tr></table><table width='100%'  border='0' cellspacing='1' cellpadding='3' bgcolor=FFFBE8><form name='form1' method='post' action='?action=saveinfo' onSubmit='return ProductCheck(this);'><tr bgcolor='#FFFBE8'><td width='23%' align='right'>供 应 商：</td><td width='77%'><select name='SSID' id='SSID'><option value='0'>选择供应商</option>"
set urs=WS_S.HX_SetRSD(ColumnName,Tablename1,Orderby)
if urs.recordcount>0 then
do until urs.eof
response.write "<option value='"&urs("WS_SSID")&"' "
if rs("WS_SSID")=urs("WS_SSID") then response.write "selected"
response.Write ">"&urs("WS_SaleShopName")&"</option>"
urs.movenext
loop
end if
WS_S.HX_RSClose urs  
response.write "</select></td></tr><tr bgcolor='#FFFBE8'><td align='right'>产品名称：</td><td><input name='ProductName' type='text' value='"&rs("WS_ProductName")&"' size='36'></td></tr><tr bgcolor='#FFFBE8'><td align='right'>产品型号：</td><td><input type='text' size='36' name='Producttype' value='"&rs("WS_Producttype")&"' style='ime-mode:disabled'></td></tr><tr bgcolor='#FFFBE8'><td align='right'>计量单位：</td><td><input type='text' size='36' name='ProductUnitPrice' value='"&rs("WS_ProductUnitPrice")&"'></td></tr><tr bgcolor='#FFFBE8'><td align='right'>成 本 价：</td><td><input type='text' size='36' name='ProductPrice' value='"&rs("WS_ProductPrice")&"' style='ime-mode:disabled'></td></tr><tr bgcolor='#FFFBE8'><td align='right'>出 售 价：</td><td><input type='text' size='36' name='ProductSalePrice' value='"&rs("WS_ProductSalePrice")&"' style='ime-mode:disabled'></td></tr><tr bgcolor='#FFFBE8'><td align='right'>产品描述：</td><td><input type='text' size='36' name='ProductIntr' value='"&rs("WS_ProductIntr")&"'></td></tr><tr bgcolor='#FFFBE8'><td align='right' valign=top>&nbsp;</td><td><input type='submit' name='Submit' value=' 修 改 '>  <input type='reset' name='Submit2' value=' 重 置 '> <input name='id' type='hidden' id='id' value='"&id&"'></td></tr></form></table></td></tr></table>"
WS_S.HX_RSClose rs%>
