分割功能:按覈定數量爲分割界限,將一個訂單ITEMID變爲兩個,覈定數量和(申請數量——覈定數量),其他基本信息不變。
主要代碼:頁面:LinkButton linb = (LinkButton)sender;
後臺:string oldName = linb.CommandArgument;
int Index = ((RepeaterItem)(linb.NamingContainer)).ItemIndex;
TextBox txtRealQty = rptRequestList.Items[Index].FindControl("txtRealQty") as TextBox;
TextBox txtAmount = rptRequestList.Items[Index].FindControl("txtAmount") as TextBox;
HiddenField hfReuQty = rptRequestList.Items[Index].FindControl("hfReuQty") as HiddenField;
HiddenField hfAmount = rptRequestList.Items[Index].FindControl("hfAmount") as HiddenField;
單選框全選功能:點擊頭部單選框下方的全部選中
主要代碼:頁面javaScript代碼:
function f_ChkAll(isChecked)
{
var c=document.getElementsByTagName("input");
var c_item = c[0];
var i = -1;
var n = 0;
while(c_item != null)
{
i++;
c_item = c[i];
if (c_item == null)
continue;
if (c_item.type != 'checkbox')
continue;
if (n == 0)
n = i;
if (n != i && n != 0){
c_item.checked = isChecked;
}
}
}
頁面表格向左滾動:
主要代碼:
function f_scroll() {
var x = document.getElementById("list").scrollLeft;
document.getElementById("intitle").style.left = (0 - x) + "px";
var y = document.getElementById("list").scrollTop;
document.getElementById("leftTitle").style.top = (0 - y) + "px";
}
ASP.NET頁面顯示數據,在表格中添加文本款textBox顯示數據
主要代碼:
<asp:TextBox ID="txtAmount" runat="server" Width="99%" Height="19" Text=' <%# Eval("REAL_AMOUNT", "{0:f2}")%>'></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" TargetControlID="txtAmount" FilterType="Custom" ValidChars=".1234567890" />