• Ext.Net弹出子窗口


    1、前台代码:

    <ext:ImageCommandColumn Width="60" Header="操作" Align="Center">
                                                <Commands >
                                                    <ext:ImageCommand CommandName="Edit" Icon="TableEdit" Text="操作">
                                                        <ToolTip Text="操作" />
                                                    </ext:ImageCommand>
                                                </Commands>
      </ext:ImageCommandColumn>

    <Listeners>
                           
                                        <%--<Command Handler="Ext.Msg.alert(command, record.data.mc_MaterialCode);" />--%>
                                        <%--<Command Handler="CompanyX.showPage(record.data.Id);"/>--%>
                                        <Command Handler="showWindow(record.data.Id);"/>
                                       
                                     <%--  #{Window1}.show(this);--%>

    </Listeners>

    2、弹出子页面方法

    第一种:

    [Ext.Net.DirectMethod]
            public void showPage(string ss)
            {
                var win = new Ext.Net.Window
                {
                    ID = "Window1",
                    Title = "使用记录",
                    Width = Unit.Pixel(1000),
                    Height = Unit.Pixel(600),
                    Modal = true,
                    Collapsible = true,
                    Maximizable = true,
                    Hidden = true
                };


                win.AutoLoad.Url = "~/StorageRecord/UsedDetail.aspx?ID=" + ss;
                win.AutoLoad.Mode = Ext.Net.LoadMode.IFrame;
                win.Render(this.Form);

                win.Show();
            }

    第二种:

    <script type="text/javascript">
            function showWindow(maCode) {
                var iTop = (window.screen.availHeight - 30 - 400) / 2;
                //获得窗口的水平位置
                var iLeft = (window.screen.availWidth - 10 - 800) / 2;
                //window.showModalDialog("UsedDetail.aspx?ID=" + maCode, "使用明细", "dialogHeight=400px,dialogWidth=800,center=yes,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no, status=no");
                window.open("UsedDetail.aspx?ID=" + maCode, "使用明细", "dialogHeight=400px,dialogWidth=800,left=" + iLeft + ",top=" + iTop + ",center=yes,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no, status=no");
                }
            </script>

  • 相关阅读:
    perl -p -i -w -e
    s///|s()()i|/i|/g|U|u|L|l|Ul|split|join|匹配到hash|匹配到变量|`date`|$^I
    /^/m|/$/m||B|$&|$`|$'|变量捕获|()?|(?:pattern)|(?<LABEL>PATTERN)|$+{LABEL}|(|)|g{LABEL}
    ALG 4-3: Optimal Caching
    ALG 4-2: Scheduling to Minimize Lateness
    ALG 4-1: Interval Scheduling
    ALG 3-n: Practice
    ALG 3-6: Directed Acyclic Graphs and Topological Ordering (有向无环图与拓扑排序)
    ALG 3-5: Connectivity in Directed Graphs (有向图的连接性)
    ALG 3-4: Testing Bipartiteness
  • 原文地址:https://www.cnblogs.com/spring_wang/p/3072210.html
Copyright © 2020-2023  润新知