<%@ 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="宋体">***   管    理</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="宋体">        </font>
</td>
</tr>
<tr>
<td colSpan="5"><font face="宋体"> 
<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="<%=A_str%>"><%=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="<%=row[values[2]]%>" oldvalue="<%=row[2]%>" style="WIDTH: 60px" /> <%}%>
</td>
<td><%{%>
<input start="fileopen" type="text" height="179724080" maxLength="2147483647" loop="1" onchange="oninputchanged3()" size="20" value="<%=row[values[3]]%>" oldvalue="<%=row[3]%>" style="WIDTH: 60px" /> <%}%>
</td>
<td><%{%>
<input start="fileopen" type="text" height="180252400" maxLength="2147483647" loop="1" onchange="oninputchanged4()" size="20" value="<%=row[values[4]]%>" oldvalue="<%=row[4]%>" style="WIDTH: 60px" /> <%}%>
</td>
<td><%{%>
<input start="fileopen" type="text" height="180186488" maxLength="2147483647" loop="1" onchange="oninputchanged5()" size="20" value="<%=row[values[5]]%>" oldvalue="<%=row[5]%>" style="WIDTH: 60px" /> <%}%>
</td>
<td><%{%>
<input start="fileopen" type="text" height="180252592" maxLength="2147483647" loop="1" onchange="oninputchanged6()" size="20" value="<%=row[values[6]]%>" oldvalue="<%=row[6]%>" 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(" Update TBL_TypePiceManage Set {0} = {1} Where PKId = \'{2}\' ",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/>
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="宋体">***   管    理</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="宋体">        </font>
</td>
</tr>
<tr>
<td colSpan="5"><font face="宋体"> 
<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="<%=A_str%>"><%=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="<%=row[values[2]]%>" oldvalue="<%=row[2]%>" style="WIDTH: 60px" /> <%}%>
</td>
<td><%{%>
<input start="fileopen" type="text" height="179724080" maxLength="2147483647" loop="1" onchange="oninputchanged3()" size="20" value="<%=row[values[3]]%>" oldvalue="<%=row[3]%>" style="WIDTH: 60px" /> <%}%>
</td>
<td><%{%>
<input start="fileopen" type="text" height="180252400" maxLength="2147483647" loop="1" onchange="oninputchanged4()" size="20" value="<%=row[values[4]]%>" oldvalue="<%=row[4]%>" style="WIDTH: 60px" /> <%}%>
</td>
<td><%{%>
<input start="fileopen" type="text" height="180186488" maxLength="2147483647" loop="1" onchange="oninputchanged5()" size="20" value="<%=row[values[5]]%>" oldvalue="<%=row[5]%>" style="WIDTH: 60px" /> <%}%>
</td>
<td><%{%>
<input start="fileopen" type="text" height="180252592" maxLength="2147483647" loop="1" onchange="oninputchanged6()" size="20" value="<%=row[values[6]]%>" oldvalue="<%=row[6]%>" 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(" Update TBL_TypePiceManage Set {0} = {1} Where PKId = \'{2}\' ",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/>