コード例 #1
0
        //-------------------------------------------------
        // Window
        //-------------------------------------------------

        /*
         * <f:Window ID = "Window1" runat="server" IsModal="true" Hidden="true" Target="Top"
         *  Width="700px" Height="600px"
         *  EnableResize="true" EnableMaximize="true" EnableClose="false"
         *  EnableIFrame="true" IFrameUrl="about:blank"
         *  OnClose="Window1_Close"
         *  />
         */
        protected void CreateWindow()
        {
            _window = new FineUI.Window()
            {
                ID             = this.WinID,
                IsModal        = true,
                Hidden         = true,
                Target         = FineUI.Target.Top,
                Width          = this.WinWidth,
                Height         = this.WinHeight,
                EnableResize   = true,
                EnableMaximize = true,
                EnableClose    = true,
                EnableIFrame   = true,
                IFrameUrl      = "about:blank",
                CloseAction    = this.WinCloseAction
            };
            _window.Close += (s, e) =>
            {
                if (WindowClose != null)
                {
                    WindowClose(this, null);
                }
                else
                {
                    ShowData();
                }
            };
            this.Controls.Add(_window);
        }
コード例 #2
0
ファイル: UI.cs プロジェクト: surfsky/AppPlat
 // 显示订单(想办法弄个参数回来,是否已经支付)
 public static bool ShowOrder(FineUI.Window win, int?orderId)
 {
     if (orderId != null)
     {
         var url    = string.Format("OrderForm.aspx?id={0}&mode=view", orderId);
         var script = win.GetShowReference(url);
         PageContext.RegisterStartupScript(script);
         return(true);
     }
     return(false);
 }
コード例 #3
0
 /// <summary>
 /// 新增事件
 /// </summary>
 /// <param name="Window1">WindowId</param>
 /// <param name="AddPage">编辑页面</param>
 /// <param name="WindowTitle">窗体标题</param>
 protected void AddClick(Window Window1, string AddPage, string WindowTitle)
 {
     PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("{0}.aspx?action=1", AddPage), WindowTitle));
 }
コード例 #4
0
 /// <summary>
 /// 通用编辑单击事件
 /// </summary>
 /// <param name="Grid1">Grid</param>
 /// <param name="Window1">Window Id</param>
 /// <param name="EditPage">编辑页面名称</param>
 /// <param name="WindowTitle">窗体标题</param>
 protected void EditClick(Grid Grid1, Window Window1, string EditPage, string WindowTitle)
 {
     try
     {
         if (Grid1.SelectedRowIndexArray.Length == 0)
         {
             Alert.Show("请至少选择一项!", MessageBoxIcon.Information);
         }
         else if (Grid1.SelectedRowIndexArray.Length > 1)
         {
             Alert.Show("只能选择一项!", MessageBoxIcon.Information);
         }
         else
         {
             string id = Grid1.DataKeys[Grid1.SelectedRowIndexArray[0]][0].ToString();
             PageContext.RegisterStartupScript(
                 Window1.GetShowReference(string.Format("{0}.aspx?id={1}&action=2", EditPage, id), WindowTitle));
         }
     }
     catch (Exception)
     {
         Alert.Show("编辑失败,请重试!", MessageBoxIcon.Warning);
     }
 }