示例#1
0
文件: FrmShow.cs 项目: windygu/STIM
        private void ParamControlAdd(string arg0, string arg1)
        {
            int y = ParamCount * 30 + 10;

            ORG.UILib.Controls.PanelEx TempPanel = new ORG.UILib.Controls.PanelEx();
            TempPanel.Location = new System.Drawing.Point(10, y);
            TempPanel.Name     = "TempPanel_" + ParamCount.ToString();
            TempPanel.Size     = new System.Drawing.Size(220, 21);

            ORG.UILib.Controls.LabelEx lbl = new ORG.UILib.Controls.LabelEx();
            lbl.AutoSize  = true;
            lbl.Location  = new System.Drawing.Point(30, 0);
            lbl.Name      = "lbl_0";
            lbl.Size      = new System.Drawing.Size(53, 12);
            lbl.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            lbl.Text      = arg1;
            TempPanel.Controls.Add(lbl);

            ORG.UILib.Controls.TextBoxEx txt = new ORG.UILib.Controls.TextBoxEx();
            txt.Location = new System.Drawing.Point(100, 0);
            txt.Name     = "txt_0";
            txt.Tag      = arg0;
            txt.Size     = new System.Drawing.Size(120, 21);
            TempPanel.Controls.Add(txt);

            ParamCount++;
            FLPannel.Controls.Add(TempPanel);
        }
示例#2
0
        private void ParamControlAdd(string arg0, string arg1)
        {
            int y = ParamCount * 30;

            ORG.UILib.Controls.PanelEx TempPanel = new ORG.UILib.Controls.PanelEx();
            TempPanel.Location = new System.Drawing.Point(10, y);
            TempPanel.Name     = "TempPanel_" + ParamCount.ToString();
            TempPanel.Size     = new System.Drawing.Size(560, 21);

            ORG.UILib.Controls.LabelEx lbl = new ORG.UILib.Controls.LabelEx();
            lbl.AutoSize  = true;
            lbl.Location  = new System.Drawing.Point(30, 0);
            lbl.Name      = "lbl_0";
            lbl.Size      = new System.Drawing.Size(53, 12);
            lbl.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            lbl.Text      = "参数名:";
            TempPanel.Controls.Add(lbl);

            ORG.UILib.Controls.TextBoxEx txt = new ORG.UILib.Controls.TextBoxEx();
            txt.Location = new System.Drawing.Point(100, 0);
            txt.Name     = "txt_0";
            txt.Text     = arg0;
            txt.Size     = new System.Drawing.Size(120, 21);
            TempPanel.Controls.Add(txt);

            ORG.UILib.Controls.LabelEx lbl2 = new ORG.UILib.Controls.LabelEx();
            lbl2.AutoSize  = true;
            lbl2.Location  = new System.Drawing.Point(220, 0);
            lbl2.Name      = "lbl_1";
            lbl2.Size      = new System.Drawing.Size(53, 12);
            lbl2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            lbl2.Text      = "参数标签值:";
            TempPanel.Controls.Add(lbl2);

            ORG.UILib.Controls.TextBoxEx txt2 = new ORG.UILib.Controls.TextBoxEx();
            txt2.Location = new System.Drawing.Point(320, 0);
            txt2.Name     = "txt_1";
            txt2.Text     = arg1;
            txt2.Size     = new System.Drawing.Size(120, 21);
            TempPanel.Controls.Add(txt2);


            ORG.UILib.Controls.LinkLabelEx llblParamDelete = new ORG.UILib.Controls.LinkLabelEx();
            llblParamDelete.Location     = new System.Drawing.Point(450, 0);
            llblParamDelete.Name         = "lblDelete";
            llblParamDelete.Size         = new System.Drawing.Size(60, 21);
            llblParamDelete.Text         = "删除";
            llblParamDelete.LinkClicked += new LinkLabelLinkClickedEventHandler(llblParamDelete_LinkClicked);
            TempPanel.Controls.Add(llblParamDelete);

            ParamCount++;
            lblParamNum.Text = ParamCount.ToString();
            panelParam.Controls.Add(TempPanel);
        }
示例#3
0
文件: FrmShow.cs 项目: windygu/STIM
        private void btnSearch_Click(object sender, EventArgs e)
        {
            if (valueObject == null)
            {
                return;
            }
            string    SearchParam = valueObject.SearchParam;
            string    sql         = valueObject.ListSql;
            Hashtable ht          = new Hashtable();

            //用户界面参数和值
            foreach (Control ctrl in FLPannel.Controls)
            {
                if (ctrl is ORG.UILib.Controls.PanelEx)
                {
                    ORG.UILib.Controls.TextBoxEx txt = ctrl.Controls["txt_0"] as ORG.UILib.Controls.TextBoxEx;
                    ht.Add(txt.Tag.ToString(), txt.Text);
                }
            }
            //系统参数和值;
            PropertyGrid.Item.SysValue sv = new Item.SysValue();
            foreach (TxtValObject tv in sv.ValueList)
            {
                string key = tv.Val;
                if (sql.IndexOf(":" + key) > -1)
                {
                    ht.Add(":" + key, sv.GetValue(key));
                }
            }
            BLL.STIM_CONFIG bll = new BLL.STIM_CONFIG();
            DataSet         ds  = bll.getSearchResult(valueObject.ListSql, ht);

            if (ds != null && ds.Tables.Count > 0)
            {
                DGVList.DataSource = ds.Tables[0].DefaultView;
            }
        }