?? default.asp
字號:
<!-- #include virtual="/eB3KTransaction.asp" --><!-- #include virtual="/Server/ebo.asp" --><!-- #include virtual="/Server/cbLib.asp" -->
<!-- #include file="../common.asp" --><HTML><HEAD><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><LINK REL=stylesheet HREF="/Client/All.css" TYPE="text/css"><script src="/Client/ebComm.js"></script></HEAD>
<script src="/client/ebo.js"></script>
<script src="/client/Request.js"></script>
<script src="/client/IClient.js"></script>
<script src="/client/grid.js"></script>
<BODY>
<div id=SelectArea></div>
<div id=PageCtrlArea></div>
</BODY>
<script title=User>
function gridInit(t){
t[0].text='№';
t[1].text='序號';
t[1].width=1;
t[2].text='編碼';
t[2].width=150;
t[3].text='名稱';
t[3].width=100;
t[4].text='色名';
t[4].width=80;
t[5].text='規格';
t[5].width=80;
t[6].text='銷價'
t[6].width=60;
t[7].text='確認';
t[7].width=40;
}
function ecbDetail(eo,szEvent,x,y){
if (szEvent=='MOUSECLICK'){
var data=new Array();
if (isNaN(x)) return;
if (x<0||x>gDetail.data.length) return;
data[0]=eo.data[x][0];
//Add your code here
//data[1]=eo.data[x][1];
//End
IClient('data',data);
IClient('end','');
}
}
</script>
<%
dim SetSearchString()
function SearchString(str)
dim i,n,m,j,StrLen,SetStr
n=1
j=1
SetStr=ltrim(rtrim(str))
do
if instr(n,SetStr," ")=0 then exit do
n=instr(n,SetStr," ")+1
j=j+1
loop
redim SetSearchString(j)
n=1
for i =1 to j
if instr(n,SetStr," ")=0 then
StrLen=len(SetStr)
else
StrLen=instr(n,SetStr," ")-n
end if
SetSearchString(i)=rtrim(mid(SetStr,n,StrLen))
n=instr(n,SetStr," ")+1
next
end function
dim szSQL,szFind,iListWidth
iListWidth = 5 'ListWidth
szFind = Request("Find")
dim SQLWhere,j
SearchString(CStr(szFind))
SQLWhere=" AND ("
for j=1 to ubound(SetSearchString)
if j>1 then SQLWhere=SQLWhere & " AND"
SQLWhere=SQLWhere & " (Title like '%" & SQLInputParam(SetSearchString(j)) & "%' OR Code like '%" & SQLInputParam(SetSearchString(j)) & "%' OR SearchCode1 like '%" & SQLInputParam(SetSearchString(j)) & "%')"
next
SQLWhere=SQLWhere & ")"
szSQL = "SELECT * FROM [BaseInfo] WHERE AccountID=(SELECT RootID FROM [biCorperation] WHERE [ID]=" & AccountID & ") AND InfoType=" & biType
szSQL = szSQL & SQLWhere
szSQL = szSQL & " ORDER BY ID DESC"
'eboReg
eboReg 1, "List_0_", "ID", "", "cbRSDirect"
eboReg 1, "List_1_", "Code", "", "cbRSDirect"
eboReg 1, "List_2_", "Title", "", "cbRSDirect"
eboReg 1, "List_3_", "BigInt2", "", "cbRSColorToText"
eboReg 1, "List_4_", "BigInt3", "", "cbRSSpecToText"
eboReg 1, "List_5_","Currency1","","cbFunCurrency"
eboReg 2, "List_rows", "i", "", "cbLocalVariable"
eboReg 2, "List_cols", "iListWidth", "", "cbLocalVariable"
eboReg 2, "MaxPage", "iMaxPage", "", "cbLocalVariable"
'End
dim iPage,iRows,iMaxPage
iMaxPage = 0
iPage = GetLong(Request("Page"),1) 'default page pos
iRows = GetLong(Request("Rows"),10) 'default rows
dim eBI,rs
dim i,x,szTableName
Set eBI = Server.CreateObject("eB3KCommon.BaseInfo")
x = eBI.biGetDetailByType(Conn, CLng(biType), rs)
set eBI = Nothing
if x=0 then
szSQl = ""
else
szTableName = CStr(rs("TableName"))
end if
set rs = nothing
i = 0
Response.Write "<script>" & VBCrLf
if szSQL <> "" then
szSQL=replace(szSQL,"[BaseInfo]","["&szTableName&"]")
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.open szSQL,Conn,1,1
iMaxPage = Int((rs.RecordCount+iRows-1)/iRows)
if rs.RecordCount > 0 then rs.move iPage*iRows-iRows
IData2d 1,1
Do While Not rs.EOF And i < iRows
eboGet 1, rs, nothing
i = i + 1
rs.MoveNext
Loop
Set rs = Nothing
end if
IData2d 0,2
eboGet 2, nothing, nothing
Response.Write "</script>" & VBCrLf
%>
<script>
requestSet('Page','<%=iPage%>');
requestSet('Rows','<%=iRows%>');
var indata = IDataEnd();
var gDetail = new ZYDGRID(new ZYDGRIDFORIEBUG(),SelectArea,indata.item('List_rows'),7,'100%','');
gridInit(gDetail.title);
var gPageCtrl = new ZYDPAGECTRL(new ZYDPAGECTRLFORIEBUG(),PageCtrlArea,request('Page'),indata.item('MaxPage'));
</script>
<script title=eboReg>
function mydetailproc(method,ebo){
switch (method){
case EBO_GET:
break;
case EBO_SET:
var i,j;
var rows=parseInt(indata.item(ebo.serversidename+'_rows'));
var cols=parseInt(indata.item(ebo.serversidename+'_cols'));
ebo.id.data.length=0;
for (i=0;i<rows;i++){
ebo.id.data[i]=new Array();
for (j=0;j<cols;j++)
ebo.id.data[i][j]=indata.item(ebo.serversidename+'_'+j+'_'+i);
ebo.id.data[i][j]=indata.item(ebo.serversidename+'_'+j+'_'+i);
ebo.id.data[i][j+1]='<input type=button value="添加" onclick="btnAdd(\''+i+'\',\''+ebo.serversidename+'\')">';
}
break;
default:
break;
}
return (true);
}
eboReg('List',gDetail,'',mydetailproc);
</script>
<script title=User>
eboSet();
gDetail.refreshAll();
function btnAdd(clickID,ServerSideName){
var e,i,data=new Array();
try{
i = parseInt(clickID);
if (isNaN(i)) return;
if (i<0||i>gDetail.data.length) return;
data[0]=indata.item('List_0_'+i);
data[1]=indata.item('List_1_'+i);
data[2]=indata.item('List_2_'+i);
data[3]=indata.item('List_3_'+i);
data[4]=indata.item('List_4_'+i);
data[5]=indata.item('List_5_'+i);
IClient('data',data);
}catch(e){return;}
}
function IClientSetSize(){
document.body.style.borderWidth=1;
document.body.style.borderColor='#000000';
document.body.style.borderStyle='solid';
IClient('setSize',new Array(document.body.scrollWidth+2,document.body.scrollHeight+2));
}
IClientSetSize();
</script>
</HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -