示例#1
0
 protected override void OnInit(EventArgs e)
 {
     this._panel = new Panel();
     this._panel.ID = "_panelImages";
     this._panel.AutoScroll = true;
     this._panel.BodyPadding = 8;
     Toolbar item = new Toolbar();
     Ext.Net.Button component = new Ext.Net.Button
     {
         Text = "选择文件",
         ID = "_btnSelectFile"
     };
     item.Add(component);
     Ext.Net.Button button2 = new Ext.Net.Button
     {
         ID = "_btnRemoveFileFromAll",
         Text = "清空"
     };
     Ext.Net.Button button3 = new Ext.Net.Button
     {
         Text = "上传",
         ID = "_btnStartUpload",
         Handler = "window.startUpload();"
     };
     button2.Handler = "window.btnRemoveAll_click();";
     item.Add(button2);
     item.Add(button3);
     this._panel.TopBar.Add(item);
     this.Items.Add(this._panel);
     this._hdn.Style.Add("display", "none");
     this._hdn.Listeners.Change.Fn = "window.updateFileUrl";
     this._hdn.Value = string.Join(",", new string[] { this.Files });
     this.Items.Add(this._hdn);
     this.FieldLabel = "图片";
     this.Layout = "fit";
     this._panel.Layout = "column";
     if (!Ext.Net.X.IsAjaxRequest)
     {
         this.AddScript(Resource .uploader.Replace("{uploadUrl}", this.UploadUrl).Replace("{fieldName}", this._hdn.ID));
     }
     this.ID = null;
     base.OnInit(e);
 }
        private void AddWindow()
        {
            Window window = new Window();

            window.ID            = "SystemCodeAdd";
            window.Title         = "字典信息管理";
            window.Width         = Unit.Pixel(400);
            window.Height        = Unit.Pixel(280);
            window.Modal         = true;
            window.Collapsible   = true;
            window.Maximizable   = false;
            window.Resizable     = false;
            window.Hidden        = true;
            window.AutoLoad.Mode = LoadMode.Merge;

            FormPanel tabs = new FormPanel();

            tabs.ID            = "TabPanel1";
            tabs.IDMode        = IDMode.Explicit;
            tabs.Border        = false;
            tabs.Width         = Unit.Pixel(400);
            tabs.Closable      = true;
            tabs.DefaultAnchor = "100%";
            Ext.Net.Panel tab = new Ext.Net.Panel();
            tab.Title   = "代码表";
            tab.Padding = 5;
            tabs.Add(tab);

            TextField tx = CommonExt.AddTextField("txtECodeType", "代码类型");

            tx.Text = Session["CodeId"] as string;
            tab.Items.Add(tx);
            tx.ReadOnly = true;
            tab.Items.Add(CommonExt.AddTextField("txtECodeId", "代码值"));
            tab.Items.Add(CommonExt.AddTextField("txtECodeDesc", "代码描述"));
            tab.Items.Add(CommonExt.AddTextField("txtECodeRemark", "备注"));
            tab.Items.Add(CommonExt.AddCheckbox("chkEIsUse", "是否启用"));

            Toolbar     toolbar     = new Ext.Net.Toolbar();
            ToolbarFill toolbarFill = new ToolbarFill();

            toolbar.Add(toolbarFill);
            window.BottomBar.Add(toolbar);
            CommonExt.AddButton(toolbar, "butSaveEdit", "保存", "Disk", "SystemCode.InfoSave()");
            CommonExt.AddButton(toolbar, "butCancelEdit", "取消", "Cancel", window.ClientID + ".hide()");
            window.Items.Add(tabs);
            window.Render(this.Form);
            window.Show();
        }
        public void AddWindow(string popMsg)
        {
            try
            {
                Window window = new Window();
                window.ID            = "ChartShow";
                window.Title         = "统计信息详细信息";
                window.Width         = Unit.Pixel(820);
                window.Height        = Unit.Pixel(600);
                window.Modal         = true;
                window.Collapsible   = true;
                window.Maximizable   = false;
                window.Resizable     = false;
                window.Hidden        = true;
                window.AutoLoad.Mode = LoadMode.Merge;

                Ext.Net.Panel tabs = new Ext.Net.Panel();
                tabs.ID     = "TabPanel1";
                tabs.IDMode = IDMode.Explicit;
                tabs.Border = false;

                Ext.Net.Panel tab = new Ext.Net.Panel();
                tab.Title            = "统计信息";
                tab.Padding          = 5;
                tab.AnchorHorizontal = "100%";
                tabs.Add(tab);
                string[] strs = popMsg.Split(',');
                double[] data = GetRowData(int.Parse(strs[1]));
                ChartDirector.WebChartViewer webChartViewer = new ChartDirector.WebChartViewer();
                Bll.Common.CreateCurvelineChart(webChartViewer, data, "小时", "识别率%", strs[0] + " - 识别率曲线");
                webChartViewer.Visible = true;
                tab.ContentControls.Add(webChartViewer);
                Toolbar     toolbar     = new Ext.Net.Toolbar();
                ToolbarFill toolbarFill = new ToolbarFill();
                toolbar.Add(toolbarFill);
                window.BottomBar.Add(toolbar);
                CommonExt.AddButton(toolbar, "butCancel", "退出", "Cancel", window.ClientID + ".hide()");
                window.Items.Add(tabs);
                window.Render(this.Form);
                window.Show();
            }
            catch (Exception ex)
            {
                ILog.WriteErrorLog(ex);
                logManager.InsertLogError("PassCarOcrCount.aspx-AddWindow", ex.Message + ";" + ex.StackTrace, "AddWindow has an exception");
            }
        }
示例#4
0
        /// <summary>
        /// 显示修改窗体
        /// </summary>
        private void AddWindowModify()
        {
            Window window = new Window();

            window.ID            = "UserModify";
            window.Title         = "密码修改";
            window.Width         = Unit.Pixel(400);
            window.Height        = Unit.Pixel(200);
            window.Modal         = true;
            window.Collapsible   = true;
            window.Maximizable   = false;
            window.Resizable     = false;
            window.Hidden        = true;
            window.AutoLoad.Mode = LoadMode.Merge;

            Ext.Net.Panel tabs = new Ext.Net.Panel();
            tabs.ID     = "TabPanel1";
            tabs.IDMode = IDMode.Explicit;
            tabs.Border = false;

            Ext.Net.Panel tab = new Ext.Net.Panel();
            tab.Title   = "";
            tab.Padding = 5;
            tab.Height  = 120;
            tabs.Add(tab);
            tab.Items.Add(CommonExt.AddTextFieldPassword("txtMFirstPassWord", "初始密码", false));
            tab.Items.Add(CommonExt.AddTextFieldPassword("txtMPassWord", "新密码", false));
            tab.Items.Add(CommonExt.AddTextFieldPassword_Confirm("txtMConfirmPassWord", "重复密码", false, "txtMPassWord"));

            Toolbar     toolbar     = new Ext.Net.Toolbar();
            ToolbarFill toolbarFill = new ToolbarFill();

            toolbar.Add(toolbarFill);
            window.BottomBar.Add(toolbar);
            CommonExt.AddButton(toolbar, "butSaveEdit2", "保存", "Disk", "UserManager.UpdateData()");
            CommonExt.AddButton(toolbar, "butCancelEdit2", "取消", "Cancel", window.ClientID + ".hide()");
            window.Items.Add(tabs);
            window.Render(this.Form);
            window.Show();
        }
 /// <summary>
 /// metodo que carrega as pesquisas existentes
 /// </summary>
 private void CarregarPesquisas()
 {
     foreach (PesquisaOpiniaoVO p in Pesquisas)
     {
         FieldSet fds = new FieldSet() { AutoWidth = true, AutoHeight = true, Title = p.Pergunta, TitleCollapse = true, Collapsible = true, Collapsed = false, AnimCollapse = true };
         Hidden hdf = new Hidden() { ID = "hdf_" + p.Id, Value = p.Id.ToString() };
         Ext.Net.RadioGroup group = new RadioGroup() { AutoWidth=true, ColumnsNumber = 1, GroupName = "group_" + p.Id, ID="group_"+p.Id, InvalidText="Selecione uma resposta.", AllowBlank = !(p.Status == StatusPesquisa.Iniciada), MsgTarget = MessageTarget.Side };
         foreach (RespostaVO r in p.Respostas)
         {
             Radio radio = new Radio() { BoxLabel = r.Descricao, HideLabel = true, AutoWidth = true, MinWidth = 150, ID = "radio_"+r.Id, Checked = r.Usuarios.Any(x=> x.Id == UsuarioLogado.Id) };
             group.Items.Add(radio);
         }
         fds.Items.Add(hdf);
         fds.Items.Add(group);
         if (p.Status == StatusPesquisa.Finalizada && p.MostrarResultado)
         {
             Ext.Net.Button btnGrafico = new Ext.Net.Button("Resultado");
             //btnGrafico.DirectEvents.Click.EventMask = new EventMask() { Msg = "Abrindo gráfico...", ShowMask = true, Target = MaskTarget.Page };
             btnGrafico.ID = "btnGrafico" + p.Id;
             btnGrafico.Listeners.Click.Handler = "Ext.net.DirectMethods.VisualizarGrafico('" + p.Id + "');";
             btnGrafico.Icon = Ext.Net.Icon.ChartBar;
             btnGrafico.Disabled = !hdfVisualizarGraficoResponderPesquisas.Value.ToInt32().ToBoolean();
             Toolbar toolbar = new Toolbar();
             toolbar.Add(btnGrafico);
             fds.TopBar.Add(toolbar);
         }
         group.Disabled = !(p.Status == StatusPesquisa.Iniciada);
         fds.AddTo(frmPesquisas);
     }
 }