代码
<
ext:Button runat
=
"
server
"
Text
=
"
添加联系人
"
>
< Listeners >
< Click Handler = " buildWindowColse('ContactPersonAdd.aspx', '添加客户联系人', 900, 320); " />
</ Listeners >
</ ext:Button >
< Listeners >
< Click Handler = " buildWindowColse('ContactPersonAdd.aspx', '添加客户联系人', 900, 320); " />
</ Listeners >
</ ext:Button >
代码
function buildWindowColse(url, title, width, height) {
var DisplayPanel = new Ext.TabPanel({
id: " tab1 " ,
height: height,
width: width,
autoScroll: true ,
activeTab: 0 ,
frame: true ,
autoDestroy: false
});
var tan = DisplayPanel.add({
id: " ee " ,
height: height,
width: width,
autoScroll: true ,
closable: false ,
autoLoad: {
showMask: true ,
url: url,
mode: ' iframe ' ,
maskMsg: ' 加载数据 ' + title + ' ... '
}
});
var win = new Ext.Window({
id: " wind " ,
layout: " fit " ,
autoScroll: true ,
title: title,
iconCls: " icon-pagewhitecode " ,
width: width,
height: height,
maximizable: true ,
autoShow: true ,
plain: true ,
resizable: false ,
shadow: false ,
bufferResize: true ,
modal: true ,
items: [DisplayPanel],
listeners: {
" close " : function() {
myRefresh();
}
}
});
win.show();
}
var DisplayPanel = new Ext.TabPanel({
id: " tab1 " ,
height: height,
width: width,
autoScroll: true ,
activeTab: 0 ,
frame: true ,
autoDestroy: false
});
var tan = DisplayPanel.add({
id: " ee " ,
height: height,
width: width,
autoScroll: true ,
closable: false ,
autoLoad: {
showMask: true ,
url: url,
mode: ' iframe ' ,
maskMsg: ' 加载数据 ' + title + ' ... '
}
});
var win = new Ext.Window({
id: " wind " ,
layout: " fit " ,
autoScroll: true ,
title: title,
iconCls: " icon-pagewhitecode " ,
width: width,
height: height,
maximizable: true ,
autoShow: true ,
plain: true ,
resizable: false ,
shadow: false ,
bufferResize: true ,
modal: true ,
items: [DisplayPanel],
listeners: {
" close " : function() {
myRefresh();
}
}
});
win.show();
}
弹出页面调用
代码
const
string
fn
=
@"
function(but){if(but === 'ok'){parent.window.wind.close();}}
"
;
Ext.Msg.Show( new MessageBox.Config
{
Title = " 提示 " ,
Message = " 保存成功 " ,
Buttons = MessageBox.Button.OK,
Icon = MessageBox.Icon.INFO,
Fn = new JFunction {Fn = fn}
});
Ext.Msg.Show( new MessageBox.Config
{
Title = " 提示 " ,
Message = " 保存成功 " ,
Buttons = MessageBox.Button.OK,
Icon = MessageBox.Icon.INFO,
Fn = new JFunction {Fn = fn}
});