sadier

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
&#160;<%@ Import Namespace="System.Data" %> <link href="../css/Jump.css" type="text/css" rel="stylesheet"></link><script language="javascript">  
  
function document.onkeydown()
  {
   
if(event.keyCode==13)
   {
    event.keyCode
=9;
   }
  }
  

  
function showCode(result)
  {
   
if (result >= 0)
   document.all('label').value 
= '成功:' + result.value;
      
else 
   document.all('label').value 
= '失败:' + result.value;
      
  }  
  
 
function oninputchanged(field)
 {
  
var input=event.srcElement;
  
var td=input.parentElement;
  
var tr=td.parentElement;
  
var price=input.value;
  
var pkid =tr.cells(0).innerHTML.replace(" ","");   
 
  input.style.color
='green';
  input.style.backgroundColor
='#eeeeee';
  
  service.useService(
"http://localhost/WebErp/StockCheck.asmx?WSDL","UpdateColumn"); 
  service.UpdateColumn.callService(showCode,
"UpdatePrice",pkid,field,price); 
 
  
 } 
 
 
function oninputchanged2()
 {
      oninputchanged('A');
 } 
 
 
function oninputchanged3()
 {
      oninputchanged('B');
 } 
 
 
function oninputchanged4()
 {
      oninputchanged('C');
 } 
 
  
function oninputchanged5()
 {
      oninputchanged('D');
 } 
 
 
function oninputchanged6()
 {
     oninputchanged('E');
 } 
 
 


  
</script>
<!--form id= refreshForm method=get runat=server>
<ASP:BUTTON id=btnRefresh tabIndex=3 RUNAT="server" TEXT="刷新" WIDTH="79px"></ASP:BUTTON>
</form-->
<form id="Form2" accept-charset="UNKNOWN" method="post" encType="application/x-www-form-urlencoded">
<table cellSpacing="0" cellPadding="0" style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; WIDTH: 646px; BORDER-BOTTOM: medium none">
   
<tbody>
       
<tr>
           
<td align="center" colSpan="2"><font size="3"><font face="宋体">***&#160;&#160; 管&#160&#160; 理</font></font>
           
</td>
           
<td width="30"><font face="宋体"></font>
           
</td>
       
</tr>
   
</tbody>
</table><asp:panel id="top" width="650" RUNAT="server">
<table cellSpacing="0" cellPadding="0" width="650">
   
<tbody>
       
<tr>
           
<td align="right"><font face="宋体"></font>
           
</td>
           
<td><font face="宋体"></font>
           
</td>
           
<td><font face="宋体"></font>
           
</td>
       
</tr>
   
</tbody>
</table>
<table width="650">
   
<tbody>
       
<tr>
           
<td colSpan="5" style="HEIGHT: 14px"><font face="宋体">&#160;&#160;&#160;&#160;&#160;&#160;&#160</font>
           
</td>
       
</tr>
       
<tr>
           
<td colSpan="5"><font face="宋体">&#160
              
<div id="label" align="left" ms_positioning="FlowLayout" style="DISPLAY: inline; WIDTH: 472px; HEIGHT: 15px"><font face="宋体"></font>
              
</div></font>
           
</td>
       
</tr>
   
</tbody>
</table>
<div id="service" style="BEHAVIOR: url(webservice.htc)"></div><asp:button id="btnRefresh" tabIndex="3" RUNAT="server" TEXT="刷新" WIDTH="79px"></asp:button>
<table id="thetable" cellSpacing="0" cellPadding="4" border="1" style="BORDER-COLLAPSE: collapse">
   
<thead>
       
<tr style="COLOR: white; BACKGROUND-COLOR: gray"><%colums = new string[] {"编号","分类名称","A(%)","B(%)","C(%)","D(%)","E(%)"};%><%values = new string[] {"PKId","SpeciName","A","B","C","D","E"};%><%foreach(string A_str in colums){%>
           
<td columnName="&lt;%=A_str%&gt;"><%=A_str%><font face="宋体"></font>
           
</td><%}%>
       
</tr>
   
</thead><%if(false){%>
   
<tbody>
       
<tr><%}%><%foreach(DataRow row in dtschema.Rows){%><%="<tr "%><%=">"%>
           
<td><%=row[values[0]]%>
           
</td>
           
<td><%=row[values[1]]%>
           
</td>
           
<td><%{%>
              
<input start="fileopen" type="text" height="180252528" maxLength="2147483647" loop="1" onchange="oninputchanged2()" size="20" value="&lt;%=row[values[2]]%&gt;" oldvalue="&lt;%=row[2]%&gt;" style="WIDTH: 60px" /> <%}%>
           
</td>
           
<td><%{%>
              
<input start="fileopen" type="text" height="179724080" maxLength="2147483647" loop="1" onchange="oninputchanged3()" size="20" value="&lt;%=row[values[3]]%&gt;" oldvalue="&lt;%=row[3]%&gt;" style="WIDTH: 60px" /> <%}%>
           
</td>
           
<td><%{%>
              
<input start="fileopen" type="text" height="180252400" maxLength="2147483647" loop="1" onchange="oninputchanged4()" size="20" value="&lt;%=row[values[4]]%&gt;" oldvalue="&lt;%=row[4]%&gt;" style="WIDTH: 60px" /> <%}%>
           
</td>
           
<td><%{%>
              
<input start="fileopen" type="text" height="180186488" maxLength="2147483647" loop="1" onchange="oninputchanged5()" size="20" value="&lt;%=row[values[5]]%&gt;" oldvalue="&lt;%=row[5]%&gt;" style="WIDTH: 60px" /> <%}%>
           
</td>
           
<td><%{%>
              
<input start="fileopen" type="text" height="180252592" maxLength="2147483647" loop="1" onchange="oninputchanged6()" size="20" value="&lt;%=row[values[6]]%&gt;" oldvalue="&lt;%=row[6]%&gt;" style="WIDTH: 60px" /> <%}%>
           
</td><%="</tr>"%><%}%><%if(false){%>
       
</tr><%}%>
   
</tbody>
</table></asp:panel>
</form>//StockCheck.asmx函数 [WebMethod] public int UpdatePrice(int pkid,string Field,double A_price) { try { string UpdateSql = string.Format(&quot; Update TBL_TypePiceManage Set {0} = {1} Where PKId = \&#39;{2}\&#39; &quot;,Field,A_price,pkid); int iret = DataProvider.RunSQL(UpdateSql); return iret; } catch(Exception ee) { Debug.WriteLine(ee.ToString()); } return -1; } 
<br/>
<br/>本地需要webservice.htc
<br/>
<br/>
<br/>
posted on 2004-07-09 14:16  毛小华  阅读(1430)  评论(0编辑  收藏  举报