コード例 #1
0
        public void InitForm(MD_GuideLine _guideLine, string _paramValueSetting)
        {
            guideLineDefine  = _guideLine;
            ParameterDefines = MC_GuideLine.GetParametersFromMeta(_guideLine.GuideLineMeta);
            this.InputPanel.Controls.Clear();
            foreach (MD_GuideLineParameter _glp in ParameterDefines)
            {
                string _paramValue = GetValueOfParam(_glp.ParameterName, _paramValueSetting);
                switch (_glp.ParameterType)
                {
                case "逻辑型":
                    break;

                case "代码表":
                    SinoSZUC_GLQ_InputRefTable _refitem = new SinoSZUC_GLQ_InputRefTable(_glp);
                    _refitem.InputChanged += new EventHandler(_dateitem_InputChanged);
                    _refitem.Dock          = DockStyle.Top;
                    _refitem.SetValueByXml(_paramValue);
                    this.InputPanel.Controls.Add(_refitem);
                    _refitem.BringToFront();
                    break;

                case "日期型":
                    SinoSZUC_GLQ_InputDate _dateitem = new SinoSZUC_GLQ_InputDate(_glp);
                    _dateitem.SetValueByXml(_paramValue);
                    _dateitem.InputChanged += new EventHandler(_dateitem_InputChanged);
                    _dateitem.Dock          = DockStyle.Top;
                    this.InputPanel.Controls.Add(_dateitem);
                    _dateitem.BringToFront();
                    break;

                case "单位型(全部)":
                case "单位型(权限范围)":
                case "单位ID型(缉私局权限)":
                case "单位ID型(全部)":
                case "单位ID型(权限范围)":
                case "单位代码型(全部)":
                case "单位代码型(权限范围)":
                    SinoSZUC_GLQ_InputOrg _orgItem = new SinoSZUC_GLQ_InputOrg(_glp, _glp.ParameterType);
                    _orgItem.SetValueByXml(_paramValue);
                    _orgItem.Dock          = DockStyle.Top;
                    _orgItem.InputChanged += new EventHandler(_dateitem_InputChanged);
                    this.InputPanel.Controls.Add(_orgItem);
                    _orgItem.BringToFront();
                    break;

                default:
                    SinoSZUC_GLQ_InputItem _item = new SinoSZUC_GLQ_InputItem(_glp);
                    _item.SetValueByXml(_paramValue);
                    _item.Dock          = DockStyle.Top;
                    _item.InputChanged += new EventHandler(_dateitem_InputChanged);
                    this.InputPanel.Controls.Add(_item);
                    _item.BringToFront();
                    break;
                }
            }
        }
コード例 #2
0
        public void InitForm(MD_GuideLine _guideLine)
        {
            if (_guideLine == null)
            {
                this.Controls.Clear();
                this.Height = 5;
                return;
            }

            guideLineDefine  = _guideLine;
            ParameterDefines = MC_GuideLine.GetParametersFromMeta(_guideLine.GuideLineMeta);
            this.Controls.Clear();
            this.Height = this.ParameterDefines.Count * 24 + 5;

            foreach (MD_GuideLineParameter _glp in ParameterDefines)
            {
                switch (_glp.ParameterType)
                {
                case "逻辑型":
                    break;

                case "代码表":
                    break;

                case "日期型":
                    SinoSZUC_GLQ_InputDate _dateitem = new SinoSZUC_GLQ_InputDate(_glp);
                    _dateitem.InputChanged += new EventHandler(_dateitem_InputChanged);
                    _dateitem.Dock          = DockStyle.Top;
                    this.Controls.Add(_dateitem);
                    _dateitem.BringToFront();
                    break;

                case "单位型(全部)":
                case "单位型(权限范围)":
                case "单位ID型(缉私局权限)":
                case "单位ID型(全部)":
                case "单位ID型(权限范围)":
                case "单位代码型(全部)":
                case "单位代码型(权限范围)":
                    SinoSZUC_GLQ_InputOrg _orgItem = new SinoSZUC_GLQ_InputOrg(_glp, _glp.ParameterType);
                    _orgItem.Dock          = DockStyle.Top;
                    _orgItem.InputChanged += new EventHandler(_dateitem_InputChanged);
                    this.Controls.Add(_orgItem);
                    _orgItem.BringToFront();
                    break;

                default:
                    SinoSZUC_GLQ_InputItem _item = new SinoSZUC_GLQ_InputItem(_glp);
                    _item.Dock          = DockStyle.Top;
                    _item.InputChanged += new EventHandler(_dateitem_InputChanged);
                    this.Controls.Add(_item);
                    _item.BringToFront();
                    break;
                }
            }
        }