Beispiel #1
0
    void CreateOrderContent(ASPxPopupControl popup, int visibleIndex)
    {
        popup.Controls.Clear();
        object[] data    = (object[])GridView.GetRowValues(visibleIndex, new string[] { "OrderID", "OrderDate", "ShipCountry" });
        string   OrderID = data[0].ToString();

        ASPxLabel labelID = new ASPxLabel()
        {
            ID   = "IDLabel" + OrderID,
            Text = string.Format("Order ID: {0}\n", OrderID)
        };

        popup.Controls.Add(labelID);

        ASPxLabel labelOrderDate = new ASPxLabel()
        {
            ID   = "OrderDateLabel" + OrderID,
            Text = string.Format("Order Date: {0}\n", ((DateTime)data[1]).ToUniversalTime())
        };

        popup.Controls.Add(labelOrderDate);

        ASPxLabel labelShipCountry = new ASPxLabel()
        {
            ID   = "ShipCountryLabel" + OrderID,
            Text = string.Format("Ship Country: {0}\n", data[2])
        };

        popup.Controls.Add(labelShipCountry);
    }
Beispiel #2
0
        private static void ASPxGridView_HtmlEditFormCreated(object sender, ASPxGridViewEditFormEventArgs e)
        {
            ASPxPopupControl popup = e.EditForm.NamingContainer as ASPxPopupControl;

            popup.MaxHeight  = 600;
            popup.ScrollBars = ScrollBars.Both;
        }
Beispiel #3
0
    protected void ASPxPopupControl1_Init(object sender, EventArgs e)
    {
        ASPxPopupControl popupControl = (ASPxPopupControl)sender;

        popupControl.ClientInstanceName = GetUserControlSpecificId("_popup");
        popupControl.HeaderText         = this.ID + "'s popup";
    }
Beispiel #4
0
        protected void gv_HtmlEditFormCreated(object sender, DevExpress.Web.ASPxGridViewEditFormEventArgs e)
        {
            ASPxPopupControl popup = e.EditForm.NamingContainer as ASPxPopupControl;

            popup.Maximized  = true;
            popup.ScrollBars = ScrollBars.Vertical;
        }
Beispiel #5
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            tbControl = new Table()
            {
                CellPadding = 0, CellSpacing = 0
            };
            TableRow row = new TableRow();

            row.Cells.Add(new TableCell()
            {
                HorizontalAlign = System.Web.UI.WebControls.HorizontalAlign.Left,
                VerticalAlign   = System.Web.UI.WebControls.VerticalAlign.Middle
            });
            row.Cells.Add(new TableCell()
            {
                HorizontalAlign = System.Web.UI.WebControls.HorizontalAlign.Left,
                VerticalAlign   = System.Web.UI.WebControls.VerticalAlign.Middle
            });
            tbControl.Rows.Add(row);
            tbControl.Rows[0].Cells[1].Attributes.Add("style", "padding-left:2px");
            lblName = new ASPxLabel()
            {
                ID = "lblName",
                ClientInstanceName = this.ClientID + "_lblName",
            };
            hddData = new ASPxHiddenField()
            {
                ID = "hddData",
                ClientInstanceName = this.ClientID + "_hddData",
            };
            sqlDataSource = new SqlDataSource()
            {
                ID = this.ClientID + "_sqlDataSource",
                SelectCommandType = SqlDataSourceCommandType.Text,
            };
            cbClickGdvRow = new ASPxCallback()
            {
                ID = "cbClickGdvRow",
                ClientInstanceName = this.ClientID + "_cbClickGdvRow",
            };
            bteTextInput = new ASPxButtonEdit()
            {
                ID = "bteTextInput",
                ClientInstanceName = this.ClientID + "_bteTextInput",
            };
            popDataList = new ASPxPopupControl()
            {
                ID = "popDataList",
                ClientInstanceName = this.ClientID + "_popDataList",
            };
            gdvDataList = new ASPxGridView()
            {
                ID = "gdvDataList",
                ClientInstanceName = this.ClientID + "_gdvDataList",
                EnableRowsCache    = false,
                EnableViewState    = false,
            };
        }
    protected void grid_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e)
    {
        ASPxPopupControl popup = grid.FindEditFormTemplateControl("popup") as ASPxPopupControl;
        ASPxMemo         memo  = popup.FindControl("notesEditor") as ASPxMemo;

        e.NewValues["Notes"] = memo.Text;
        throw new InvalidOperationException("Data modifications are not allowed in the online demo");
    }
Beispiel #7
0
    protected void PopupControl_WindowCallback(object source, DevExpress.Web.PopupWindowCallbackArgs e)
    {
        ASPxPopupControl popup = source as ASPxPopupControl;

        if (!string.IsNullOrEmpty(e.Parameter))
        {
            CreateOrderContent(popup, Int32.Parse(e.Parameter));
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        ASPxPopupControl popup = new ASPxPopupControl();

        popup.ID = "popup";
        popup.ClientInstanceName = "popup";

        popup.HeaderText = "Runtime Popup";
        popup.Controls.Add(GetControl());

        form1.Controls.Add(popup);
    }
        private void RenderGrid(ASPxPopupControl container)
        {
            ASPxGridView grid = new ASPxGridView();

            grid.ID = "ASPxGridView";
            container.Controls.Add(grid);

            grid.Width        = Unit.Percentage(100);
            grid.DataBinding += (sender, e) => {
                (sender as ASPxGridView).DataSource = Enumerable.Range(0, 10).Select(i => new { Id = i, Name = "Name" + i }).ToList();
            };
            grid.DataBind();
        }
Beispiel #10
0
        private void RenderTree(ASPxPopupControl container)
        {
            container.Controls.Clear();
            ASPxTreeList tree = new ASPxTreeList();

            tree.ID = "ASPxTreeList";
            container.Controls.Add(tree);

            tree.Width        = Unit.Percentage(100);
            tree.DataBinding += (sender, e) => {
                (sender as ASPxTreeList).ParentFieldName = "Parent";
                (sender as ASPxTreeList).DataSource      = Enumerable.Range(0, 10).Select(i => new { Id = i, Name = "Name" + i, Parent = i % 3 }).ToList();
            };
            tree.DataBind();
        }
 protected override void OnLoad(EventArgs e)
 {
     base.OnLoad(e);
     m_portletPicker = new ASPxPopupControl()
     {
         ID = "PorletPicker",
         ClientInstanceName = this.ClientID,
         Modal = true,
         PopupHorizontalAlign = DevExpress.Web.ASPxClasses.PopupHorizontalAlign.WindowCenter,
         PopupVerticalAlign = DevExpress.Web.ASPxClasses.PopupVerticalAlign.WindowCenter,
         CloseAction = DevExpress.Web.ASPxClasses.CloseAction.CloseButton,
         HeaderText = "Cadidate Portlets",
         AllowDragging = true
     };
     m_portletPicker.ContentStyle.Paddings.Padding = Unit.Pixel(5);
     PopupControlContentControl p = new PopupControlContentControl();
 }
Beispiel #12
0
        /// <summary>
        /// Localizes text depending on selected language.
        /// </summary>
        private void Localize()
        {
            ASPxTextBox UserName = (ASPxTextBox)LoginControl.FindControl("UserName");
            ASPxTextBox Password = (ASPxTextBox)LoginControl.FindControl("Password");

            UserName.ValidationSettings.RequiredField.ErrorText = Utilities.GetResourceString("Validators", "UserNameRequiredValidator");
            Password.ValidationSettings.RequiredField.ErrorText = Utilities.GetResourceString("Validators", "PasswordRequiredValidator");

            ASPxPopupControl ForgotPopupControl = (ASPxPopupControl)LoginControl.FindControl("ForgotPopupControl");

            ForgotPopupControl.HeaderText = Utilities.GetResourceString("Headers", "RemindPassword");

            ASPxTextBox EmailTextBox = (ASPxTextBox)LoginControl.FindControl("ForgotPopupControl").FindControl("ForgotCallbackPanel").FindControl("EmailTextBox");

            EmailTextBox.ValidationSettings.RequiredField.ErrorText     = Utilities.GetResourceString("Validators", "EmailRequiredValidator");
            EmailTextBox.ValidationSettings.RegularExpression.ErrorText = Utilities.GetResourceString("Validators", "EmailFormatValidator");
        }
 protected override void OnLoad(EventArgs e)
 {
     base.OnLoad(e);
     m_portletPicker = new ASPxPopupControl()
     {
         ID = "PorletPicker",
         ClientInstanceName = this.ClientID,
         Modal = true,
         PopupHorizontalAlign = DevExpress.Web.ASPxClasses.PopupHorizontalAlign.WindowCenter,
         PopupVerticalAlign   = DevExpress.Web.ASPxClasses.PopupVerticalAlign.WindowCenter,
         CloseAction          = DevExpress.Web.ASPxClasses.CloseAction.CloseButton,
         HeaderText           = "Cadidate Portlets",
         AllowDragging        = true
     };
     m_portletPicker.ContentStyle.Paddings.Padding = Unit.Pixel(5);
     PopupControlContentControl p = new PopupControlContentControl();
 }
Beispiel #14
0
        public override System.Web.UI.Control Build()
        {
            base.Build();
            ASPxPanel         panel           = new ASPxPanel();
            ASPxUploadControl uploadpctrl     = new ASPxUploadControl();
            ASPxButton        uploadpbutton   = new ASPxButton();
            ASPxTextBox       uploadptext     = new ASPxTextBox();
            ASPxButton        previewpbutton  = new ASPxButton();
            ASPxButton        clippingpbutton = new ASPxButton();
            ASPxButton        clearpbutton    = new ASPxButton();
            ASPxButton        savepbutton     = new ASPxButton();
            ASPxRoundPanel    listpround      = new ASPxRoundPanel();
            PanelContent      listcontent     = new PanelContent();
            ASPxGridView      listgrid        = new ASPxGridView();

            //上传控件
            uploadpctrl.ClientInstanceName = "uploadpctrl" + ModuleField.FieldID;
            uploadpctrl.BrowseButton.Text  = "浏览";
            uploadpctrl.Width = Unit.Percentage(100);
            uploadpctrl.ClientSideEvents.TextChanged        = "function(s,e){TextChangedEvent(" + ModuleField.FieldID + ");}";
            uploadpctrl.ClientSideEvents.FileUploadStart    = "function(s,e){FileUploadStartEvent(" + ModuleField.FieldID + ");}";
            uploadpctrl.ClientSideEvents.FileUploadComplete = "function(s,e){FileUploadCompleteEvent(" + ModuleField.FieldID + ",e);}";
            uploadpctrl.FileUploadComplete += new EventHandler <FileUploadCompleteEventArgs>(uploadpctrl_FileUploadComplete);
            //上传按钮
            uploadpbutton.ClientInstanceName = "uploadpbutton" + ModuleField.FieldID;
            uploadpbutton.AutoPostBack       = false;
            uploadpbutton.Text                   = "上传";
            uploadpbutton.Width                  = 45;
            uploadpbutton.Height                 = 25;
            uploadpbutton.ClientEnabled          = false;
            uploadpbutton.ClientSideEvents.Click = "function(s,e){uploadpctrl" + ModuleField.FieldID + ".Upload();}";
            //文件名text
            uploadptext.ClientInstanceName = "uploadptext" + ModuleField.FieldID;
            uploadptext.Width    = Unit.Percentage(100);
            uploadptext.Height   = 25;
            uploadptext.ReadOnly = true;
            //预览按钮
            previewpbutton.ClientInstanceName = "previewpbutton" + ModuleField.FieldID;
            previewpbutton.AutoPostBack       = false;
            previewpbutton.Text                   = "预览";
            previewpbutton.Width                  = Unit.Percentage(100);
            previewpbutton.Height                 = 25;
            previewpbutton.ClientEnabled          = false;
            previewpbutton.ClientSideEvents.Click = "function(s,e){PreviewClickEvent(" + ModuleField.FieldID + ");}";
            //预览按钮弹出窗口
            #region 弹出窗口
            ASPxPopupControl previewpopup = new ASPxPopupControl();
            previewpopup.ClientInstanceName = "previewpopup" + ModuleField.FieldID;
            previewpopup.CloseAction        = CloseAction.CloseButton;
            previewpopup.HeaderText         = "图片预览";
            previewpopup.Modal                = true;
            previewpopup.AllowDragging        = true;
            previewpopup.PopupHorizontalAlign = PopupHorizontalAlign.WindowCenter;
            previewpopup.PopupVerticalAlign   = PopupVerticalAlign.WindowCenter;
            previewpopup.Controls.Add(new LiteralControl("<div style='width:500px;height:375px;text-align:center;overflow:scroll;'><img id='previewimage" + ModuleField.FieldID + "' alt='' src='' /></div>"));
            #endregion
            //剪裁按钮
            clippingpbutton.ClientInstanceName = "clippingpbutton" + ModuleField.FieldID;
            clippingpbutton.AutoPostBack       = false;
            clippingpbutton.Text                   = "剪裁";
            clippingpbutton.Width                  = 45;
            clippingpbutton.Height                 = 25;
            clippingpbutton.ClientEnabled          = false;
            clippingpbutton.ClientSideEvents.Click = "function(s,e){ClippingClickEvent(" + ModuleField.FieldID + ");}";
            //剪裁按钮弹出窗口
            #region 弹出窗口
            ASPxPopupControl clippingpopup = new ASPxPopupControl();
            clippingpopup.ClientInstanceName = "clippingpopup" + ModuleField.FieldID;
            clippingpopup.CloseAction        = CloseAction.CloseButton;
            clippingpopup.HeaderText         = "图片剪裁";
            clippingpopup.Modal                = true;
            clippingpopup.AllowDragging        = true;
            clippingpopup.PopupHorizontalAlign = PopupHorizontalAlign.WindowCenter;
            clippingpopup.PopupVerticalAlign   = PopupVerticalAlign.WindowCenter;
            ASPxLabel     lbX1                 = new ASPxLabel();
            ASPxLabel     lbX2                 = new ASPxLabel();
            ASPxLabel     lbY1                 = new ASPxLabel();
            ASPxLabel     lbY2                 = new ASPxLabel();
            ASPxLabel     lbW                  = new ASPxLabel();
            ASPxLabel     lbH                  = new ASPxLabel();
            ASPxLabel     lbwh                 = new ASPxLabel(); lbwh.Text = "自定义长宽:";
            ASPxButton    bwh                  = new ASPxButton(); bwh.Text = "确定修改";
            ASPxButton    clippingsubmit       = new ASPxButton(); clippingsubmit.Text = "确定剪裁";
            ASPxButton    clippingcancel       = new ASPxButton(); clippingcancel.Text = "取消剪裁";
            StringBuilder clippingpicshowtable = new StringBuilder();
            clippingpicshowtable.Append("<table><tr><td>");
            clippingpicshowtable.Append("<table cellpadding='0' cellspacing='0'><tr><td>");
            clippingpicshowtable.Append("<div style='width:500px;height:375px;text-align:center;overflow:scroll;'><img id='clippingimage" + ModuleField.FieldID + "' alt='' src='' /></div>");
            clippingpicshowtable.Append("</td><td>");
            clippingpicshowtable.Append("<table><tr><td align='center'><div style='width:180px;height:180px;'><div id='smalldiv1" + ModuleField.FieldID + "' style='width:180px;height:180px;overflow:hidden;'><img id='small1" + ModuleField.FieldID + "' alt='' src='' /></div></div></td></tr>");
            clippingpicshowtable.Append("<tr><td align='center'><div style='width:120px;height:120px;'><div id='smalldiv2" + ModuleField.FieldID + "' style='width:120px;height:120px;overflow:hidden;'><img id='small2" + ModuleField.FieldID + "' alt='' src='' /></div></div></td></tr>");
            clippingpicshowtable.Append("<tr><td align='center'><div style='width:60px;height:60px;'><div id='smalldiv3" + ModuleField.FieldID + "' style='width:60px;height:60px;overflow:hidden;'><img id='small3" + ModuleField.FieldID + "' alt='' src='' /><div></div></td></tr></table>");
            clippingpicshowtable.Append("</td></tr></table></td></tr><tr><td>");
            clippingpopup.Controls.Add(new LiteralControl(clippingpicshowtable.ToString()));
            clippingpopup.Controls.Add(new LiteralControl("<table><tr><td>"));
            clippingpopup.Controls.Add(lbX1); clippingpopup.Controls.Add(new LiteralControl("</td><td>"));
            clippingpopup.Controls.Add(lbY1); clippingpopup.Controls.Add(new LiteralControl("</td><td>"));
            clippingpopup.Controls.Add(lbX2); clippingpopup.Controls.Add(new LiteralControl("</td><td>"));
            clippingpopup.Controls.Add(lbY2); clippingpopup.Controls.Add(new LiteralControl("</td><td>"));
            clippingpopup.Controls.Add(lbW); clippingpopup.Controls.Add(new LiteralControl("</td><td>"));
            clippingpopup.Controls.Add(lbH); clippingpopup.Controls.Add(new LiteralControl("</td></tr><tr><td>"));
            clippingpopup.Controls.Add(new LiteralControl("<label>X1 <input type='text' size='4' id='X1" + ModuleField.FieldID + "' name='X1" + ModuleField.FieldID + "' readonly='readonly' /></label></td><td>"));
            clippingpopup.Controls.Add(new LiteralControl("<label>Y1 <input type='text' size='4' id='Y1" + ModuleField.FieldID + "' name='Y1" + ModuleField.FieldID + "' readonly='readonly' /></label></td><td>"));
            clippingpopup.Controls.Add(new LiteralControl("<label>X2 <input type='text' size='4' id='X2" + ModuleField.FieldID + "' name='X2" + ModuleField.FieldID + "' readonly='readonly' /></label></td><td>"));
            clippingpopup.Controls.Add(new LiteralControl("<label>Y2 <input type='text' size='4' id='Y2" + ModuleField.FieldID + "' name='Y2" + ModuleField.FieldID + "' readonly='readonly' /></label></td><td>"));
            clippingpopup.Controls.Add(new LiteralControl("<label>W <input type='text' size='4' id='W" + ModuleField.FieldID + "' name='W" + ModuleField.FieldID + "' /></label></td><td>"));
            clippingpopup.Controls.Add(new LiteralControl("<label>H <input type='text' size='4' id='H" + ModuleField.FieldID + "' name='H" + ModuleField.FieldID + "' /></label></td></tr>"));
            clippingpopup.Controls.Add(new LiteralControl("<tr><td colspan='4'><input type='checkbox' id='ar_lock" + ModuleField.FieldID + "'/><label for='ar_lock'>固定为正方</label></td><td>"));
            clippingpopup.Controls.Add(lbwh);
            clippingpopup.Controls.Add(new LiteralControl("</td><td>"));
            clippingpopup.Controls.Add(bwh);
            clippingpopup.Controls.Add(new LiteralControl("</td></tr><tr><td colspan='3' align='right'>"));
            clippingpopup.Controls.Add(clippingsubmit);
            clippingpopup.Controls.Add(new LiteralControl("</td><td colspan='3' align='left'>"));
            clippingpopup.Controls.Add(clippingcancel);
            clippingpopup.Controls.Add(new LiteralControl("</td></tr></table>"));
            clippingpopup.Controls.Add(new LiteralControl("</td></tr></table>"));
            #endregion
            //清空按钮
            clearpbutton.ClientInstanceName = "clearpbutton" + ModuleField.FieldID;
            clearpbutton.AutoPostBack       = false;
            clearpbutton.Text                   = "清空";
            clearpbutton.Width                  = 45;
            clearpbutton.Height                 = 25;
            clearpbutton.ClientEnabled          = false;
            clearpbutton.ClientSideEvents.Click = "function(s,e){ClearClickEvent(" + ModuleField.FieldID + ");}";
            //保存按钮
            savepbutton.ClientInstanceName = "savepbutton" + ModuleField.FieldID;
            savepbutton.AutoPostBack       = false;
            savepbutton.Text          = "保存";
            savepbutton.Width         = Unit.Percentage(100);
            savepbutton.Height        = 25;
            savepbutton.ClientEnabled = false;
            //文件显示列表
            listpround.HeaderText         = "图片列表";
            listpround.HeaderStyle.Height = 10;
            listpround.Width = Unit.Percentage(100);
            //girdview
            GridViewDataHyperLinkColumn namecolumn = new GridViewDataHyperLinkColumn();
            GridViewDataTextColumn      sizecolumn = new GridViewDataTextColumn();
            GridViewCommandColumn       operation  = new GridViewCommandColumn();
            namecolumn.Caption             = "文件名";
            namecolumn.Width               = 150;
            namecolumn.FieldName           = "picname";
            sizecolumn.Caption             = "文件大小";
            sizecolumn.Width               = 50;
            sizecolumn.FieldName           = "picsize";
            operation.Caption              = "文件操作";
            operation.Width                = 30;
            operation.DeleteButton.Visible = true;
            operation.DeleteButton.Text    = "删除";
            listgrid.Columns.Add(namecolumn);
            listgrid.Columns.Add(sizecolumn);
            listgrid.Columns.Add(operation);
            listgrid.Settings.ShowColumnHeaders = false;
            List <PicList> piclist = new List <PicList>();
            PicList        newrow  = new PicList();
            newrow.picname = "123.jpg";
            newrow.picsize = "123KB";
            piclist.Add(newrow);
            newrow         = new PicList();
            newrow.picname = "456.jpg";
            newrow.picsize = "456KB";
            piclist.Add(newrow);
            //gridview加入roundpanel
            listgrid.DataSource = piclist;
            listgrid.DataBind();
            listcontent.Controls.Add(listgrid);
            listpround.Controls.Add(listcontent);
            #region 页面构建
            Table pictable = new Table();
            panel.Controls.Add(new LiteralControl("<table width=\"500px\"><tr><td><table cellspacing=\"1\" cellpadding=\"2\"><tr><td colspan=\"3\" width=\"135px\">"));
            panel.Controls.Add(uploadpctrl);
            panel.Controls.Add(new LiteralControl("</td><td width=\"45px\">"));
            panel.Controls.Add(uploadpbutton);
            panel.Controls.Add(new LiteralControl("</td></tr><tr><td colspan=\"4\" width=\"180px\">"));
            panel.Controls.Add(uploadptext);
            panel.Controls.Add(new LiteralControl("</tr><tr><td colspan=\"2\" width=\"90px\">"));
            panel.Controls.Add(previewpbutton);
            panel.Controls.Add(previewpopup);
            panel.Controls.Add(new LiteralControl("</td><td width=\"45px\">"));
            panel.Controls.Add(clippingpbutton);
            panel.Controls.Add(clippingpopup);
            panel.Controls.Add(new LiteralControl("</td><td width=\"45px\">"));
            panel.Controls.Add(clearpbutton);
            panel.Controls.Add(new LiteralControl("</td></tr><tr><td colspan=\"4\" width=\"180px\">"));
            panel.Controls.Add(savepbutton);
            panel.Controls.Add(new LiteralControl("</td></tr></table></td><td  valign=\"top\" width=\"300px\">"));
            panel.Controls.Add(listpround);
            panel.Controls.Add(new LiteralControl("</td></tr></table>"));
            #endregion
            return(panel);
        }
        public override System.Web.UI.Control Build()
        {
            base.Build();
            ASPxPanel         panel            = new ASPxPanel();
            ASPxUploadControl upload           = new ASPxUploadControl();
            ASPxButton        uploadbotton     = new ASPxButton();
            ASPxLabel         uploadurl        = new ASPxLabel();
            ASPxButton        clippingbutton   = new ASPxButton();
            ASPxButton        previewbutton    = new ASPxButton();
            ASPxButton        clippingWH       = new ASPxButton();
            ASPxButton        clippingSubmit   = new ASPxButton();
            ASPxButton        clippingCancel   = new ASPxButton();
            ASPxPopupControl  clipping         = new ASPxPopupControl();
            ASPxPopupControl  preview          = new ASPxPopupControl();
            ASPxCallback      callbackpic      = new ASPxCallback();
            ASPxLabel         uploadfinishname = new ASPxLabel();
            ASPxButton        imagedelete      = new ASPxButton();
            ASPxCallback      callbackdelete   = new ASPxCallback();
            ASPxHiddenField   picturehf        = new ASPxHiddenField();

            //定义upload
            upload.ClientInstanceName  = "upload";
            upload.ShowProgressPanel   = true;
            upload.BrowseButton.Text   = "浏览";
            upload.FileUploadComplete += new EventHandler <FileUploadCompleteEventArgs>(uc_FileUploadComplete);
            //upload.ClientSideEvents.FilesUploadComplete = "function(s, e) { Uploader_PicturesUploadComplete(e); }";
            upload.ClientSideEvents.FileUploadComplete = "function(s, e) { Uploader_PictureUploadComplete(e); }";
            upload.ClientSideEvents.FileUploadStart    = "function(s, e) { Uploader_PictureUploadStart(); }";
            upload.ClientSideEvents.TextChanged        = "function(s, e) { PictureUpdateUploadButton(); }";
            upload.ValidationSettings.MaxFileSize      = 4194304;
            string[] fileExtensions = new string[4] {
                ".jpg", ".jpeg", ".jpe", ".gif"
            };
            upload.ValidationSettings.AllowedFileExtensions = fileExtensions;
            //定义上传按钮
            uploadbotton.AutoPostBack           = false;
            uploadbotton.Text                   = "上传";
            uploadbotton.ClientInstanceName     = "uploadpicturebotton";
            uploadbotton.ClientEnabled          = false;
            uploadbotton.ClientSideEvents.Click = "function(s, e) { imagedelete();upload.Upload();}";
            //定义剪裁按钮
            clippingbutton.AutoPostBack           = false;
            clippingbutton.Text                   = "剪裁";
            clippingbutton.ClientInstanceName     = "clippingbutton";
            clippingbutton.ClientEnabled          = false;
            clippingbutton.ClientSideEvents.Click = "function(s, e) { clipping();initialization();}";
            //弹出的剪裁窗口定义
            clipping.CloseAction          = CloseAction.CloseButton;
            clipping.Modal                = true;
            clipping.PopupHorizontalAlign = PopupHorizontalAlign.WindowCenter;
            clipping.PopupVerticalAlign   = PopupVerticalAlign.WindowCenter;
            clipping.ClientInstanceName   = "clippingview";
            clipping.HeaderText           = "图片剪裁";
            clipping.AllowDragging        = true;
            clipping.EnableAnimation      = false;
            clipping.EnableViewState      = false;
            clipping.MinWidth             = 500;
            clipping.MinHeight            = 400;
            clipping.ClientSideEvents.CloseButtonClick = "function(s, e) { destroy();}";
            clipping.ClientSideEvents.Init             = "function(s, e){s.hideBodyScrollWhenModal = false;}";
            //弹出剪裁窗口中的控件定义
            clippingWH.AutoPostBack           = false;
            clippingWH.Text                   = "更改长宽";
            clippingWH.ClientSideEvents.Click = "function(s, e) { clippingWHclick();}";

            clippingSubmit.AutoPostBack           = false;
            clippingSubmit.Text                   = "剪裁";
            clippingSubmit.ClientSideEvents.Click = "function(s, e) { clippingSubmit();}";

            //callback接收剪裁数据
            callbackpic.ClientInstanceName = "callbackpic";
            callbackpic.Callback          += new CallbackEventHandler(OnCallbackComplete);
            callbackpic.ClientSideEvents.CallbackComplete = "function(s, e) { CallbackComplete(e);}";

            clippingCancel.AutoPostBack           = false;
            clippingCancel.Text                   = "取消";
            clippingCancel.ClientSideEvents.Click = "function(s, e) { clippingview.Hide();destroy();}";
            clipping.Controls.Add(new LiteralControl("<table><tr><td>"));
            clipping.Controls.Add(new LiteralControl("<img src='' id='clippingpicture' alt='' />"));
            clipping.Controls.Add(new LiteralControl("</td><td>"));
            clipping.Controls.Add(new LiteralControl("<div style='width:150px;height:150px;overflow:hidden;' id='divsmall'>"));
            clipping.Controls.Add(new LiteralControl("<img src='' id='small' alt='' />"));
            clipping.Controls.Add(new LiteralControl("</div></td></tr></table>"));
            clipping.Controls.Add(new LiteralControl("<br />"));
            clipping.Controls.Add(new LiteralControl("<table><tr><td colspan='6'>可自定义框体长宽:</td>"));
            clipping.Controls.Add(new LiteralControl("<tr><td><label>X1 <input type='text' size='4' id='x1' name='x1' readonly='readonly' /></label></td>"));
            clipping.Controls.Add(new LiteralControl("<td><label>Y1 <input type='text' size='4' id='y1' name='y1' readonly='readonly' /></label></td>"));
            clipping.Controls.Add(new LiteralControl("<td><label>X2 <input type='text' size='4' id='x2' name='x2' readonly='readonly' /></label></td>"));
            clipping.Controls.Add(new LiteralControl("<td><label>Y2 <input type='text' size='4' id='y2' name='y2' readonly='readonly' /></label></td>"));
            clipping.Controls.Add(new LiteralControl("<td><label>W <input type='text' size='4' id='w' name='w' /></label></td>"));
            clipping.Controls.Add(new LiteralControl("<td><label>H <input type='text' size='4' id='h' name='h' /></label></td></tr>"));
            clipping.Controls.Add(new LiteralControl("<tr><td colspan='4'></td>"));
            clipping.Controls.Add(new LiteralControl("<td colspan='2' align='middle'>"));
            clipping.Controls.Add(clippingWH);
            clipping.Controls.Add(new LiteralControl("</td></tr>"));
            clipping.Controls.Add(new LiteralControl("<tr><td>"));
            clipping.Controls.Add(clippingSubmit);
            clipping.Controls.Add(new LiteralControl("</td>"));
            clipping.Controls.Add(new LiteralControl("<td>"));
            clipping.Controls.Add(clippingCancel);
            clipping.Controls.Add(new LiteralControl("</td>"));
            clipping.Controls.Add(new LiteralControl("<td>"));
            clipping.Controls.Add(new LiteralControl("<input type='checkbox' id='ar_lock'/><label for='ar_lock'>比例固定</label>"));
            clipping.Controls.Add(new LiteralControl("</td>"));
            clipping.Controls.Add(new LiteralControl("<td colspan='5'></td></tr></table>"));
            //定义Label
            uploadurl.Text = "";//文件名
            uploadurl.ClientInstanceName = "uploadurl";
            //定义预览按钮
            previewbutton.AutoPostBack           = false;
            previewbutton.Text                   = "预览";
            previewbutton.ClientInstanceName     = "previewbutton";
            previewbutton.ClientEnabled          = false;
            previewbutton.ClientSideEvents.Click = "function(s, e) { preview(); }";
            //弹出的预览窗口定义
            preview.CloseAction          = CloseAction.CloseButton;
            preview.Modal                = true;
            preview.PopupHorizontalAlign = PopupHorizontalAlign.WindowCenter;
            preview.PopupVerticalAlign   = PopupVerticalAlign.WindowCenter;
            preview.ClientInstanceName   = "previewview";
            preview.HeaderText           = "图片预览";
            preview.AllowDragging        = true;
            preview.EnableAnimation      = false;
            preview.EnableViewState      = false;
            preview.Controls.Add(new LiteralControl("<img id='previewpicture' alt='' src=''"));
            preview.ClientSideEvents.Init = "function(s, e){s.hideBodyScrollWhenModal = false;}";
            //定义上传后保存的文件名。uploadfinishname
            uploadfinishname.Text = "";
            uploadfinishname.ClientInstanceName = "uploadfinishname";
            //上传后,删除按钮
            imagedelete.AutoPostBack           = false;
            imagedelete.Text                   = "删除";
            imagedelete.ClientInstanceName     = "imagedeletebutton";
            imagedelete.ClientEnabled          = false;
            imagedelete.ClientSideEvents.Click = "function(s, e) { imagedelete(); }";
            //点击删除按钮callback服务器删除对应图片
            callbackdelete.ClientInstanceName = "callbackdeleteimg";
            callbackdelete.Callback          += new CallbackEventHandler(OnCallbackDeleteImg);
            //隐藏控件保存图片地址
            picturehf.ClientInstanceName = "picturehf";

            panel.Controls.Add(new LiteralControl("<table><tr><td>"));
            panel.Controls.Add(upload);
            panel.Controls.Add(new LiteralControl("</td><td>"));
            panel.Controls.Add(uploadbotton);
            panel.Controls.Add(new LiteralControl("</td></tr><tr><td>"));
            panel.Controls.Add(uploadurl);
            panel.Controls.Add(new LiteralControl("</td><td>"));
            panel.Controls.Add(clippingbutton);
            panel.Controls.Add(clipping);
            panel.Controls.Add(new LiteralControl("</td></tr><tr><td>"));
            panel.Controls.Add(uploadfinishname);
            panel.Controls.Add(new LiteralControl("</td><td>"));
            panel.Controls.Add(imagedelete);
            panel.Controls.Add(previewbutton);
            panel.Controls.Add(preview);
            panel.Controls.Add(new LiteralControl("</td></tr></table>"));
            panel.Controls.Add(callbackpic);
            panel.Controls.Add(callbackdelete);
            panel.Controls.Add(picturehf);
            return(panel);
        }
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            Page.RegisterRequiresControlState(this);

            hddData = new ASPxHiddenField()
            {
                ID = "hddData",
                ClientInstanceName = this.ClientID + "_hddData",
            };

            sqlDataSource = new SqlDataSource()
            {
                ID = this.ClientID + "_sqlDataSource",
                SelectCommandType = SqlDataSourceCommandType.Text,
            };

            bteTextInput = new ASPxButtonEdit()
            {
                ID = "bteTextInput",
                ClientInstanceName = this.ClientID + "_bteTextInput",
                ReadOnly           = true,
                Width = this.Width,
            };
            bteTextInput.ReadOnlyStyle.BackColor = System.Drawing.Color.WhiteSmoke;

            popDataList = new ASPxPopupControl()
            {
                ID = "popDataList",
                ClientInstanceName = this.ClientID + "_popDataList",
            };
            tree = new ASPxTreeList()
            {
                ID = "tree",
                ClientInstanceName = this.ClientID + "_tree",
                DataCacheMode      = TreeListDataCacheMode.Disabled,
                EnableViewState    = false,
                DataSourceID       = sqlDataSource.ID,
                KeyFieldName       = "NodeID",
                ParentFieldName    = "ParentNodeID",
                Width = Unit.Percentage(100),
            };
            tree.Columns.Add(new TreeListDataColumn()
            {
                Name      = "Code",
                FieldName = "Code",
                Caption   = "Code",
            });
            tree.Columns.Add(new TreeListDataColumn()
            {
                Name      = "Title",
                FieldName = "Title",
                Caption   = "Title",
            });
            tree.SettingsBehavior.ExpandCollapseAction = TreeListExpandCollapseAction.NodeDblClick;
            tree.SettingsBehavior.AutoExpandAllNodes   = true;
            tree.HtmlRowPrepared += new TreeListHtmlRowEventHandler(tree_HtmlRowPrepared);

            panel = new Panel()
            {
                ID     = "panel",
                Height = Unit.Pixel(500),
            };
            panel.ScrollBars = ScrollBars.Vertical;
        }
Beispiel #17
0
 public void Personalizar_Controles(Control Ctrl, int Opcion = 0)
 {
     if (Ctrl is ASPxMenu)
     {
         ASPxMenu Menu = (ASPxMenu)Ctrl;
         Menu.Theme = TemaButton;
     }
     else if (Ctrl is ASPxButton)
     {
         ASPxButton Button = (ASPxButton)Ctrl;
         if (Opcion == 1) //OCULTO
         {
             Button.BackColor = System.Drawing.ColorTranslator.FromHtml(Color_Panel_1);
         }
         else
         {
             Button.Theme = TemaButton;
         }
     }
     else if (Ctrl is ASPxGridView)
     {
         ASPxGridView GridView = (ASPxGridView)Ctrl;
         GridView.Styles.FocusedRow.BackColor       = System.Drawing.ColorTranslator.FromHtml(Color_Row_Grid);
         GridView.ControlStyle.BackColor            = System.Drawing.ColorTranslator.FromHtml(Color_BackColor_Grid);
         GridView.SettingsText.PopupEditFormCaption = Nombre_Sistema.ToString();
         GridView.Styles.TitlePanel.BackColor       = System.Drawing.ColorTranslator.FromHtml(Color_TitlePanel);
         GridView.Theme = TemaGrid;
     }
     else if (Ctrl is ASPxPopupControl)
     {
         ASPxPopupControl PopupControl = (ASPxPopupControl)Ctrl;
         if (Ctrl.ID != "PopupMensajes")
         {
             PopupControl.BackColor = System.Drawing.ColorTranslator.FromHtml(Color_Panel_1);
         }
         PopupControl.HeaderText      = Nombre_Sistema.ToString();
         PopupControl.HeaderImage.Url = "~/Imagenes/Usados/SF.png";
         PopupControl.Theme           = TemaPopup;
     }
     else if (Ctrl is ASPxPanel)
     {
         ASPxPanel APanelP = (ASPxPanel)Ctrl;
         if (Opcion == 0 || Opcion == 1)
         {
             APanelP.BackColor = System.Drawing.ColorTranslator.FromHtml(Color_Panel_1);
         }
         else if (Opcion == 2)
         {
             APanelP.BackColor = System.Drawing.ColorTranslator.FromHtml(Color_Panel_2);
         }
         else if (Opcion == 3)
         {
             APanelP.BackColor = System.Drawing.ColorTranslator.FromHtml(Color_Panel_3);
         }
     }
     else if (Ctrl is Panel)
     {
         Panel PanelP = (Panel)Ctrl;
         if (Opcion == 0 || Opcion == 1)
         {
             PanelP.BackColor = System.Drawing.ColorTranslator.FromHtml(Color_Panel_1);
         }
         else if (Opcion == 2)
         {
             PanelP.BackColor = System.Drawing.ColorTranslator.FromHtml(Color_Panel_2);
         }
         else if (Opcion == 3)
         {
             PanelP.BackColor = System.Drawing.ColorTranslator.FromHtml(Color_Panel_3);
         }
     }
 }
Beispiel #18
0
 public static void CerrarPopup(ASPxPopupControl APopup)
 {
     APopup.ShowOnPageLoad = false;
     ScriptManager.RegisterStartupScript((System.Web.UI.Page)System.Web.HttpContext.Current.Handler, typeof(Page), "popup",
                                         "<script language='javascript'>document.getElementsByTagName('html')[0].style.overflow = '';</script>", false);
 }
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            Page.RegisterRequiresControlState(this);

            tbControl = new Table()
            {
                CellPadding = 0, CellSpacing = 0
            };
            TableRow row = new TableRow();

            row.Cells.Add(new TableCell()
            {
                HorizontalAlign = HorizontalAlign.Left, VerticalAlign = VerticalAlign.Top
            });
            row.Cells.Add(new TableCell()
            {
                HorizontalAlign = HorizontalAlign.Left, VerticalAlign = VerticalAlign.Top
            });
            tbControl.Rows.Add(row);
            tbControl.Rows[0].Cells[1].Attributes.Add("style", "padding-left:2px");
            lblCustomerName = new ASPxLabel()
            {
                ID = "lblCustomerName",
                ClientInstanceName = this.ClientID + "_lblCustomerName",
            };
            hddMFCustomers = new ASPxHiddenField()
            {
                ID = "hddMFCustomers",
                ClientInstanceName = this.ClientID + "_hddMFCustomers",
            };
            sqlDataSource = new SqlDataSource()
            {
                ID = this.ID + "_sqlDataSource",
                SelectCommandType = SqlDataSourceCommandType.Text,
                ConnectionString  = base.ConnectionString,
                DataSourceMode    = SqlDataSourceMode.DataSet,
                EnableCaching     = false,
                EnableViewState   = false,
            };
            // CustomerID, CustomerNo, EffectiveFrom, EffectiveTo
            sqlDataSource.SelectParameters.Add("langCode", TypeCode.String, base.LanguageCode);

            cbClickGdvRow = new ASPxCallback()
            {
                ID = "cbClickGdvRow",
                ClientInstanceName = this.ClientID + "_cbClickGdvRow",
            };
            cbClickGdvRow.Callback += new CallbackEventHandler(cbClickGdvRow_Callback);

            bteMFCustomers = new ASPxButtonEdit()
            {
                ID = "bteMFCustomers",
                ClientInstanceName = this.ClientID + "_bteMFCustomers",
            };
            bteMFCustomers.Buttons.Add(new EditButton());

            popMFCustomers = new ASPxPopupControl()
            {
                ID = "popMFCustomers",
                ClientInstanceName   = this.ClientID + "_popMFCustomers",
                PopupHorizontalAlign = PopupHorizontalAlign.WindowCenter,
                PopupVerticalAlign   = PopupVerticalAlign.WindowCenter,
                CloseAction          = CloseAction.CloseButton,
                Modal           = true,
                EnableAnimation = false,
                HeaderText      = "ลูกค้า",
                AllowDragging   = true,
                AllowResize     = true,
                ResizingMode    = ResizingMode.Live,
                Width           = Unit.Pixel(400),
            };

            gdvMFCustomers = new ASPxGridView()
            {
                ID = "gdvMFCustomers",
                ClientInstanceName  = this.ClientID + "_gdvMFCustomers",
                EnableRowsCache     = false,
                EnableViewState     = false,
                DataSourceID        = sqlDataSource.ID,
                AutoGenerateColumns = false,
                Width = Unit.Percentage(100),
            };
            gdvMFCustomers.SettingsBehavior.ColumnResizeMode = ColumnResizeMode.Control;
            gdvMFCustomers.SettingsPager.PageSize            = 20;
            gdvMFCustomers.SettingsPager.AlwaysShowPager     = true;
            gdvMFCustomers.Settings.ShowFilterRow            = true;
            gdvMFCustomers.Settings.ShowFilterRowMenu        = true;
            gdvMFCustomers.KeyFieldName = "CustomerID";

            GridViewDataColumn column = null;

            column = new GridViewDataColumn()
            {
                Name      = "CustomerNO",
                FieldName = "CustomerNO",
                Caption   = "รหัสลูกค้า",
            };
            column.Settings.AutoFilterCondition = AutoFilterCondition.Contains;
            column.Settings.FilterMode          = ColumnFilterMode.DisplayText;
            gdvMFCustomers.Columns.Add(column);
            column = new GridViewDataColumn()
            {
                Name      = "CustomerName",
                FieldName = "CustomerName",
                Caption   = "ชื่อลูกค้า",
            };
            column.Settings.AutoFilterCondition = AutoFilterCondition.Contains;
            column.Settings.FilterMode          = ColumnFilterMode.DisplayText;
            gdvMFCustomers.Columns.Add(column);
            gdvMFCustomers.HtmlRowCreated          += new ASPxGridViewTableRowEventHandler(HandlerMethod.gdvItemListControl_HtmlRowCreated);
            gdvMFCustomers.CustomCallback          += new ASPxGridViewCustomCallbackEventHandler(gdvMFCustomers_CustomCallback);
            gdvMFCustomers.BeforePerformDataSelect += new EventHandler(gdvMFCustomers_BeforePerformDataSelect);
            if (MFCustomerType == PartyType.All)
            {
                cboType = new ASPxComboBox()
                {
                    ID = "cboType",
                    ClientInstanceName = this.ClientID + "_cboType",
                };
                cboType.ValueType = typeof(int);
                cboType.IncrementalFilteringMode = IncrementalFilteringMode.StartsWith;
            }
        }
Beispiel #20
0
        //popup窗口布局的设置 ,主要是将nav导航,显示这两个panel加入到popup窗口中
        public ASPxPopupControl PopupRender(ASPxPopupControl clipping)
        {
            string _table       = "Model";
            string _targetTable = string.Empty;

            _targetTable    = GetTargetTableName((int)ModuleField.FieldType);
            TargetTableName = _targetTable;
            string  sql     = "select * from model where modelname = '" + _targetTable + "'";//ModuleField.TargetModelName+"'";
            DataSet userset = SqlHelper.GetDataBySQL(sql, _table);

            IsTree = (bool)userset.Tables[_table].Rows[0]["IsTree"];

            #region 代码选择
            if (TargetTableName == "Dictionary")//ModuleField.TargetModelName == "Dictionary")
            {
                if (ModuleField.DisplayFormat == CommonField.Nav.ToString())
                {
                    // 如果没有层级结构(istree为false)的话,就不动态加载导航条
                    // nav导航条的变化用js控制
                    Dictionary _codecat = new Dictionary();
                    using (TestDBEntities entity = new TestDBEntities())
                    {
                        _codecat = entity.Dictionary.Where(o => o.DictionaryCode == ModuleField.CodeCat).FirstOrDefault();
                    }
                    IsTree = _codecat.IsTree;
                    Code   = ModuleField.CodeCat;

                    if (_codecat.IsTree)
                    {
                        clipping.Controls.Add(LoadNav(ModuleField.CodeCat));
                    }
                    //初始时刻默认将第一层级加载出来
                    clipping.Controls.Add(new LiteralControl("<div id='dyn_content'>"));
                    using (TestDBEntities entity = new TestDBEntities())
                    {
                        if (_codedetaillist == null)
                        {
                            if (_codecat.IsTree)
                            {
                                _codedetaillist = entity.DictionaryItem.Where(oo => oo.DictionaryItemCode.StartsWith(ModuleField.CodeCat) && oo.DictionaryItemCode.Length == 7).ToList();
                            }
                            else
                            {
                                _codedetaillist = entity.DictionaryItem.Where(oo => oo.DictionaryItemCode.StartsWith(ModuleField.CodeCat)).ToList();
                            }
                        }
                        // 默认初始打开第一层结构
                        else
                        {
                            //_codedetaillist = entity.DictionaryItem.Where(oo => oo.DictionaryItemCode.StartsWith(Code)).ToList();
                        }
                    }
                    clipping.Controls.Add(GetDisplayControl(_codedetaillist));
                    clipping.Controls.Add(new LiteralControl("</div><div id='test'></div>"));
                }
                if (ModuleField.DisplayFormat == CommonField.TreeList.ToString())
                {
                    clipping.Controls.Add(LoadTreeList(TargetTableName));
                }

                if (ModuleField.DisplayFormat == CommonField.GridView.ToString())
                {
                    clipping.Controls.Add(new LiteralControl("<div id='dyn_gridview'>"));
                    clipping.Controls.Add(LoadGridView(string.Empty, TargetTableName));
                    clipping.Controls.Add(new LiteralControl("</div>"));
                }
            }

            #endregion

            #region 机构、角色、用户、地区等
            else
            {
                if (IsTree)
                {
                    clipping.Controls.Add(LoadTreeList(TargetTableName));
                }
                else
                {
                    clipping.Controls.Add(new LiteralControl("<div id='dyn_gridview'>"));
                    clipping.Controls.Add(LoadGridView(string.Empty, TargetTableName));
                    clipping.Controls.Add(new LiteralControl("</div>"));
                }
            }
            #endregion

            return(clipping);
        }
Beispiel #21
0
        public override System.Web.UI.Control Build()
        {
            base.Build();

            hidden_sc.ID = "hidden_sc" + ModuleField.FieldID;
            hidden_sc.ClientInstanceName = "hidden_sc" + ModuleField.FieldID;

            #region   codevalue
            cstb.Width              = 100;
            cstb.AutoPostBack       = false;
            cstb.ClientInstanceName = "cstb" + ModuleField.FieldID;
            cstb.MaxLength          = Convert.ToInt16(ModuleField.MaxValue);
            cstb.ValidationSettings.RequiredField.IsRequired = ModuleField.IsRequired;
            cstb.ValidationSettings.RequiredField.ErrorText  = ModuleField.ErrorText;
            cstb.Text     = ModuleField.CurrentValue == null ? ModuleField.DefaultValue == null ? null : ModuleField.DefaultValue.ToString() : ModuleField.CurrentValue.ToString();
            cstb.NullText = ModuleField.NullText;
            cstb.ReadOnly = true;
            #endregion

            callback_sc.ClientInstanceName = "callback_sc" + ModuleField.FieldID;
            callback_sc.Callback          += new CallbackEventHandler(OnCallbackCompleteSC);                                         //处理客户端提交过来的callback请求
            callback_sc.ClientSideEvents.CallbackComplete = "function(s,e) { CallbackSCComplete(s,e," + ModuleField.FieldID + ");}"; //处理完后对客户端的处理
            callback_asyn.ClientInstanceName = "callback_asyn" + ModuleField.FieldID;
            callback_asyn.Callback          += new CallbackEventHandler(OnCallbackCompleteAsyn);
            callback_asyn.ClientSideEvents.CallbackComplete = "function(s,e) { CallbackSCCompleteContent(e);}";

            //弹出窗口的初始化
            clipping.CloseAction          = CloseAction.CloseButton;
            clipping.Modal                = true;
            clipping.PopupHorizontalAlign = PopupHorizontalAlign.WindowCenter;
            clipping.PopupVerticalAlign   = PopupVerticalAlign.WindowCenter;
            clipping.ClientInstanceName   = "selectcode" + ModuleField.FieldID;
            clipping.HeaderText           = "选择代码";
            clipping.AllowDragging        = true;
            clipping.EnableAnimation      = false;
            clipping.EnableViewState      = false;
            clipping.MinWidth             = ModuleField.Width;
            clipping.MinHeight            = ModuleField.Height;

            clipping = PopupRender(clipping);

            btnmodal.ClientInstanceName = "btnmodal" + ModuleField.FieldID;
            btnmodal.Text = "选择";
            btnmodal.ClientSideEvents.Click = "function(s,e) {ShowPopupWindow(" + ModuleField.FieldID + ");}";
            btnmodal.AutoPostBack           = false;
            btnconfirm.ClientInstanceName   = "btnconfirm" + ModuleField.FieldID;
            btnconfirm.Text = "确定";
            btnconfirm.ClientSideEvents.Click = "function(s,e) {  ReturnSelectedCode(e,'" + ModuleField.DisplayFormat + "','" + TargetTableName + "','" + IsTree + "');}";
            btnconfirm.AutoPostBack           = false;
            btncancel.ClientInstanceName      = "btncancel" + ModuleField.FieldID;
            btncancel.Text = "取消";
            btncancel.ClientSideEvents.Click = "function(s,e) {HidePopupWindow(" + ModuleField.FieldID + ");}";
            btncancel.AutoPostBack           = false;

            clipping.Controls.Add(new LiteralControl("<table align='center'><tr><td>"));
            clipping.Controls.Add(btnconfirm);
            clipping.Controls.Add(new LiteralControl("</td><td>"));
            clipping.Controls.Add(btncancel);
            clipping.Controls.Add(new LiteralControl("</td><td></td></tr></table>"));

            panel.Controls.Add(new LiteralControl("<table><tr><td>"));
            panel.Controls.Add(cstb);
            panel.Controls.Add(new LiteralControl("</td><td>"));
            panel.Controls.Add(btnmodal);
            panel.Controls.Add(clipping);

            panel.Controls.Add(new LiteralControl("</td><td></td></tr></table>"));
            panel.Controls.Add(callback_sc);
            panel.Controls.Add(callback_asyn);
            panel.Controls.Add(hidden_sc);
            panel.RenderMode = RenderMode.Div;//默认render的模式
            return(panel);
        }