Exemplo n.º 1
0
 private void dgvInParam_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     this.btnDelParam.Enabled = true;
     this.btnDelParam.Enabled = true;
     //this.btnUpdate.Enabled = true;
     //this.btnNewParam.Enabled = true;
     _currentParam                         = new Paramater(); int row = dgvInParam.CurrentRow.Index;
     _currentParam.PARAMETERID             = int.Parse(dgvInParam["参数ID", row].Value.ToString());
     _currentParam.PARAMETER               = dgvInParam["参数名", row].Value.ToString();
     _currentParam.DATALENGTH              = int.Parse(dgvInParam["大小", row].Value.ToString());
     _currentParam.PARAMETER_TYPE          = dgvInParam["Direction", row].Value.ToString();
     _currentParam.PARAMDATATYPE           = int.Parse(dgvInParam["数据类型", row].Value.ToString());
     _currentParam.PARAMETER_CN            = dgvInParam["参数别名", row].Value.ToString();
     _currentParam.REPORT_ID               = int.Parse(dgvInParam["REPORT_ID", row].Value.ToString());
     _currentParam.UIC_TYPE                = int.Parse(dgvInParam["控件类型", row].Value.ToString());
     _currentParam.FOREIGNER_FIELD_CN_NAME = dgvInParam["FOREIGNER_FIELD_CN_NAME", row].Value.ToString();
     _currentParam.FOREIGNER_FIELD_DB_NAME = dgvInParam["FOREIGNER_FIELD_DB_NAME", row].Value.ToString();
     _currentParam.FOREIGNER_FILTER_SQL    = dgvInParam["FOREIGNER_FILTER_SQL", row].Value.ToString();
     _currentParam.ENUMEID                 = int.Parse(dgvInParam["ENUMEID", row].Value.ToString());
     //this.txtParaName.Text = _currentParam.PARAMETER;
     //this.txtParamLength.Text = _currentParam.DATALENGTH.ToString();
     //this.txtParamter_cn.Text = _currentParam.PARAMETER_CN;
     //this.cmbParamterType.SelectedIndex = _currentParam.PARAMDATATYPE;
     //this.cmbInOut.SelectedIndex = 0;
 }
Exemplo n.º 2
0
        private List <Paramater> getlist(DataTable dbparamter, int reportid)
        {
            List <Paramater> newparalist = new List <Paramater>();
            Paramater        onepara     = null;
            DataTable        para        = dbparamter.Clone();

            DataRow[] drs = dbparamter.Select("REPORT_ID=" + reportid);
            foreach (DataRow dr in drs)
            {
                onepara                         = new Paramater();
                onepara.PARAMETER               = dr["PARAMETER"].ToString();                //d.PARAMETER;
                onepara.PARAMETER_CN            = dr["PARAMETER_CN"].ToString();             // mode.PARAMETER_CN;
                onepara.PARAMETER_TYPE          = dr["PARAMETER_TYPE"].ToString();           // mode.PARAMETER_TYPE;
                onepara.PARAMDATATYPE           = int.Parse(dr["PARAMDATATYPE"].ToString()); //mode.PARAMDATATYPE;
                onepara.REPORT_ID               = int.Parse(dr["REPORT_ID"].ToString());     // mode.REPORT_ID;
                onepara.ENUMEID                 = int.Parse(dr["ENUMEID"].ToString());       // mode.ENUMEID;
                onepara.PARAMETERID             = int.Parse(dr["PARAMETERID"].ToString());   //mode.PARAMETERID;
                onepara.FOREIGNER_FIELD_CN_NAME = dr["FOREIGNER_FIELD_CN_NAME"].ToString();  //mode.FOREIGNER_FIELD_CN_NAME;
                onepara.FOREIGNER_FIELD_DB_NAME = dr["FOREIGNER_FIELD_DB_NAME"].ToString();  // mode.FOREIGNER_FIELD_DB_NAME;
                onepara.FOREIGNER_TABLE         = dr["FOREIGNER_TABLE"].ToString();          // mode.FOREIGNER_TABLE;
                onepara.DATALENGTH              = int.Parse(dr["DATALENGTH"].ToString());    //mode.DATALENGTH;
                onepara.HEIGHT                  = int.Parse(dr["HEIGHT"].ToString());        //mode.HEIGHT;
                onepara.UIC_TYPE                = int.Parse(dr["UIC_TYPE"].ToString());      //mode.UIC_TYPE;
                onepara.UIC_X_LOCA              = int.Parse(dr["UIC_X_LOCA"].ToString());    //mode.UIC_X_LOCA;
                onepara.UIC_Y_LOCA              = int.Parse(dr["UIC_Y_LOCA"].ToString());    //mode.UIC_Y_LOCA;
                onepara.WIDTH                   = int.Parse(dr["WIDTH"].ToString());         //mode.WIDTH;
                onepara.FOREIGNER_FILTER_SQL    = dr["FOREIGNER_FILTER_SQL"].ToString();     // mode.FOREIGNER_FILTER_SQL;
                newparalist.Add(onepara);
            }
            return(newparalist);
        }
        public void Paramater_should_generate_code()
        {
            var pv        = ParamaterValue.Create(123);
            var paramater = new Paramater("param", pv);

            paramater.GeneratorCode().Should().Be("param=123");
        }
Exemplo n.º 4
0
 /// <summary>
 /// 加载窗体
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void FrmReport_Load(object sender, EventArgs e)
 {
     _currentReport = new Reportdat();
     _currentParam  = new Paramater();
     _reportProcess = new ReportProcess();
     _Paramprocess  = new ParamProcess();
     loadReportdata();
 }
Exemplo n.º 5
0
        void sourceCtrl_Click(object sender, EventArgs e)
        {
            txtWidth.TextChanged      -= new EventHandler(txtWidth_TextChanged);
            txtHeight.TextChanged     -= new EventHandler(txtHeight_TextChanged);
            txtLocationX.ValueChanged -= new EventHandler(txtLocation_ValueChanged);
            txtLocationY.ValueChanged -= new EventHandler(txtLocation_ValueChanged);

            txtWidth.Text      = ((Control)sender).Width.ToString();
            txtHeight.Text     = ((Control)sender).Height.ToString();
            txtLocationX.Value = ((Control)sender).Left;
            txtLocationY.Value = ((Control)sender).Top;

            txtWidth.TextChanged      += new EventHandler(txtWidth_TextChanged);
            txtHeight.TextChanged     += new EventHandler(txtHeight_TextChanged);
            txtLocationX.ValueChanged += new EventHandler(txtLocation_ValueChanged);
            txtLocationY.ValueChanged += new EventHandler(txtLocation_ValueChanged);

            foreach (Control ctrl in plControls.Controls)
            {
                if (ctrl is TextBox)
                {
                    ((TextBox)ctrl).BackColor = Color.White;
                    ((TextBox)ctrl).ForeColor = Color.Black;
                }
                if (ctrl is CheckBox)
                {
                    ((CheckBox)ctrl).BackColor = Color.Transparent;
                    ((CheckBox)ctrl).ForeColor = Color.Black;
                }
            }

            if (((Control)sender) is TextBox)
            {
                ((TextBox)sender).BackColor = SystemColors.Highlight;
                ((TextBox)sender).ForeColor = SystemColors.HighlightText;
            }
            if (((Control)sender) is CheckBox)
            {
                ((CheckBox)sender).BackColor = SystemColors.Highlight;
                ((CheckBox)sender).ForeColor = SystemColors.HighlightText;
            }

            if (tabeIndexEditing)
            {
                Paramater config = (Paramater)((Control)sender).Tag;
                //config.TABINDEX = currentTabIndex;
                //currentTabIndex = currentTabIndex + 1;
                if (((Control)sender) is TextBox)
                {
                    ((TextBox)sender).Text = config.PARAMETER;
                }
                if (((Control)sender) is CheckBox)
                {
                    ((CheckBox)sender).Text = config.PARAMETER;
                }
            }
        }
Exemplo n.º 6
0
 private void FrmReportShow_Load(object sender, EventArgs e)
 {
     _currentReport = new Reportdat();
     _currentParam  = new Paramater();
     _reportProcess = new ReportProcess();
     _Paramprocess  = new ParamProcess();
     loadReportdata();
     Reportparamter = _Paramprocess.Getparalist_all(_currentGroupId);
 }
Exemplo n.º 7
0
        public override void OnEnter()
        {
            // 註冊事件
            GameCore.Event.Subscribe(NetDataEvent.CastleEvent.EventId, onCastleEvent);
            GameCore.Event.Subscribe(NetDataEvent.UpdatePopulationEvent.EventId, onUpdatePopulation);
            GameCore.Event.Subscribe(NetDataEvent.ResetBuildingEvent.EventId, onResetBuilding);
            GameCore.Event.Subscribe(ZoomEventsArgs.EventId, onZoom);

            collectInterval = Paramater.GetCollectInterval();
        }
Exemplo n.º 8
0
    public void UpdateFocus()
    {
        Paramater[] currentParamaters = new Paramater[currentSettings.Count];

        for (int i = 0; i < currentParamaters.Length; i++)
        {
            currentParamaters[i] = currentSettings[i].editing;
        }

        currentFocus.UpdateWithParams(currentParamaters);
    }
Exemplo n.º 9
0
        public List <Paramater> GetParaValue()
        {
            List <Paramater> linshipara = new List <Paramater>();

            foreach (Control ctrl in propertyPanel.Controls)
            {
                object objvalue   = null;
                object objvaluecn = null;
                if (ctrl is Label)
                {
                    continue;
                }
                if (ctrl.Tag == null)
                {
                    continue;
                }
                Paramater paramaterlinshi = new Paramater();
                paramaterlinshi = (Paramater)ctrl.Tag;
                if ((ReControlTyp)paramaterlinshi.UIC_TYPE == ReControlTyp.QueryText)
                {
                    objvalue   = ((GWI.HIS.Windows.Controls.QueryTextBox)ctrl).MemberValue;
                    objvaluecn = ((GWI.HIS.Windows.Controls.QueryTextBox)ctrl).Text;
                }
                else if ((ReControlTyp)paramaterlinshi.UIC_TYPE == ReControlTyp.CheckBox)
                {
                    objvalue = ((CheckBox)ctrl).Checked ? 1 : 0;
                }
                else if ((ReControlTyp)paramaterlinshi.UIC_TYPE == ReControlTyp.ComboBox)
                {
                    objvalue   = ((ComboBox)ctrl).SelectedValue;
                    objvaluecn = ((ComboBox)ctrl).Text;
                }
                else if ((ReControlTyp)paramaterlinshi.UIC_TYPE == ReControlTyp.TextBox)
                {
                    objvalue = ((TextBox)ctrl).Text;
                }
                else if ((ReControlTyp)paramaterlinshi.UIC_TYPE == ReControlTyp.dateTimePicker)
                {
                    objvalue   = ((DateTimePicker)ctrl).Value; //.ToString("yyyy-MM-dd");
                    objvaluecn = ((DateTimePicker)ctrl).Value; //.ToString("yyyy-MM-dd");
                }
                else
                {
                }
                paramaterlinshi.objvalue   = objvalue;
                paramaterlinshi.objvalueCN = objvaluecn;
                linshipara.Add(paramaterlinshi);
            }
            Paramater paramater = new Paramater();

            return(linshipara);
        }
Exemplo n.º 10
0
 //初始化参数
 private void btnInitialize_Click(object sender, EventArgs e)
 {
     if (_currentReport != null)
     {
         if (MessageBox.Show("参数初始化会把之前的参数清除,重新加载此存储过程的参数,确定要初始化吗?", "询问", MessageBoxButtons.OK) == DialogResult.OK)
         {
             Paramater paramter = new Paramater();
             paramter.REPORT_ID = _currentReport.REPORT_ID;
             paramter.InitializeParamToReport(_currentReport.PROCEDURES);
             LoadParam();
         }
     }
 }
Exemplo n.º 11
0
    public override void Start()
    {
        displayName = "Influence Light";

        if (paramaters == null)
        {
            paramaters    = new Paramater[1];
            paramaters[0] = new DecimalParamater("Radius:", radius);
        }

        thisType = StructureType.Light;

        base.Start();
        UpdateRadius();
    }
Exemplo n.º 12
0
    public override void Start()
    {
        displayName = "Pressure Plate";

        if (paramaters == null)
        {
            paramaters = new Paramater[1];

            paramaters[0] = new DecimalParamater("Sustain", 0.5f);

            thisType = StructureType.PressurePlate;
        }

        base.Start();
    }
Exemplo n.º 13
0
        private void btnOk_Click(object sender, EventArgs e)
        {
            locationSettings = new List <Paramater>();

            foreach (Control ctrl in this.plControls.Controls)
            {
                Paramater config = (Paramater)ctrl.Tag;
                config.UIC_X_LOCA = ctrl.Left;
                config.UIC_Y_LOCA = ctrl.Top;
                //config.GRID_COL_WIDTH = dgvColumn.Columns[config.FIELD_DB_NAME].Width;

                locationSettings.Add(config);
            }

            this.DialogResult = DialogResult.OK;
            this.Close();
        }
Exemplo n.º 14
0
    public override void Start()
    {
        displayName = "Unit Spawn";

        paramaters = new Paramater[2];

        paramaters[0] = new DecimalParamater("Spawn Inerval (seconds)", 1f);

        List <string> faceOptions = new List <string>
        {
            "Up",
            "Down",
            "Left",
            "Right"
        };

        paramaters[1] = new DropdownParamater("Starting direction", faceOptions);

        timeToNextSpawn = spawnInterval;
        base.Start();
    }
Exemplo n.º 15
0
        private void btnGetReportParam_Click(object sender, EventArgs e)
        {
            DataTable dataoutPara;
            Paramater outpara;

            if (_currentReport != null && _currentReport.PROCEDURES != "")
            {
                FrmGetInParater frmGetpara = new FrmGetInParater(_Paramprocess.getPara(_currentReport.REPORT_ID), _user, _dept);

                if (frmGetpara.ShowDialog() == DialogResult.OK)
                {
                    Paramlist = frmGetpara.paralist;
                }
                else
                {
                    return;
                }

                dataoutPara = _reportProcess.getOutParamter(_currentReport, Paramlist);
                if (dataoutPara != null)
                {
                    for (int index = 0; index < dataoutPara.Columns.Count; index++)
                    {
                        outpara                = new Paramater();
                        outpara.PARAMETER      = dataoutPara.Columns[index].ColumnName;
                        outpara.PARAMETER_TYPE = "";
                        if (dataoutPara.Columns[index].DataType.Name == "String")
                        {
                            outpara.PARAMDATATYPE = 0;
                        }
                        else
                        {
                            outpara.PARAMDATATYPE = 1;
                        }
                        outpara.REPORT_ID = _currentReport.REPORT_ID;
                        outpara.addParamter();
                    }
                }
            }
        }
Exemplo n.º 16
0
    public override void Start()
    {
        displayName = "Rotator";

        if (paramaters == null)
        {
            paramaters = new Paramater[1];

            List <string> faceOptions = new List <string>
            {
                "Up",
                "Down",
                "Left",
                "Right"
            };
            paramaters[0] = new DropdownParamater("Turn to face:", faceOptions);
        }

        thisType = StructureType.Rotator;

        base.Start();
    }
Exemplo n.º 17
0
 private void dgvInParam_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     _currentParam = new Paramater();
     _currentParam = (Paramater)dgvInParam.CurrentRow.Tag;
 }
Exemplo n.º 18
0
        /// <summary>
        /// 初始化控件
        /// </summary>
        public void CreateControls()
        {
            propertyPanel.Controls.Clear();
            bool dtbegin = true;

            for (int i = 0; i < _paralist.Count; i++)
            {
                Paramater config = new Paramater();
                config = _paralist[i];

                Control ctrl = new Control();

                #region 设置控件和列样式
                if (config.UIC_TYPE == 2)
                {
                    ctrl = new CheckBox();
                    ((CheckBox)ctrl).Text     = config.PARAMETER_CN;
                    ((CheckBox)ctrl).AutoSize = true;
                }
                else if (config.UIC_TYPE == 1)
                {
                    ctrl = new ComboBox();
                    DataTable dtcopy = new DataTable();
                    if (config.ENUMEID > 0)
                    {
                        string    strWhere = HIS.BLL.Tables.base_enumeorder.ENUMEID + "=" + config.ENUMEID;
                        DataTable tb       = HIS.SYSTEM.Core.BindEntity <HIS.Model.BASE_ENUMEORDER> .CreateInstanceDAL(HIS.Base_BLL.BaseDataController.oleDb).GetList(strWhere);

                        if (config.ENUMEID == 1) //医生枚举
                        {
                            DataRow[] rows = tb.Select("enumvalue <> " + employeeid + "");
                            dtcopy = tb.Clone();
                            if (rows != null && rows.Length > 0)
                            {
                                dtcopy.Clear();
                                DataRow row = dtcopy.NewRow();
                                row["NAME"]      = employeename;
                                row["ENUMVALUE"] = employeeid;
                                dtcopy.Rows.Add(row);
                                for (int j = 0; j < rows.Length; j++)
                                {
                                    dtcopy.Rows.Add(tb.Rows[j].ItemArray);
                                }
                            }
                        }
                        else //if (HIS.BLL.Tables.base_enumeorder.ENUMEID.ToString().Trim() == "2") //科室枚举
                        {
                            DataRow[] rows = tb.Select("enumvalue <> " + _dept.DeptID + "");
                            dtcopy = tb.Clone();
                            if (rows != null && rows.Length > 0)
                            {
                                dtcopy.Clear();
                                DataRow row = dtcopy.NewRow();
                                row["NAME"]      = _dept.Name;;
                                row["ENUMVALUE"] = _dept.DeptID;
                                dtcopy.Rows.Add(row);
                                for (int j = 0; j < rows.Length; j++)
                                {
                                    dtcopy.Rows.Add(tb.Rows[j].ItemArray);
                                }
                            }
                        }
                        ((ComboBox)ctrl).DataSource       = dtcopy;
                        ((ComboBox)ctrl).DisplayMember    = HIS.BLL.Tables.base_enumeorder.NAME;
                        ((ComboBox)ctrl).ValueMember      = HIS.BLL.Tables.base_enumeorder.ENUMVALUE;
                        ((ComboBox)ctrl).DropDownStyle    = ComboBoxStyle.DropDown;
                        ((ComboBox)ctrl).MaxDropDownItems = 25;
                        ((ComboBox)ctrl).DropDownStyle    = ComboBoxStyle.DropDownList;
                        //((ComboBox)ctrl).Text = employeename;
                        //((ComboBox)ctrl).SelectedValue = employeeid.ToString();
                    }
                    else
                    {
                        //如果是外键,设置外键的数据来源和显示字段,值字段
                        try
                        {
                            DataTable tb = BaseDataController.GetBaseTableData(config.FOREIGNER_TABLE, new string[] { "rtrim(cast(" + config.FOREIGNER_FIELD_DB_NAME + " as char(30))) as " + config.FOREIGNER_FIELD_DB_NAME, config.FOREIGNER_FIELD_CN_NAME }, config.FOREIGNER_FILTER_SQL);
                            if (tb.Rows.Count > 0 && config.FOREIGNER_TABLE == "HIS_WORKERS")
                            {
                                if (isblobal == 0)
                                {
                                    DataTable dbfor = tb.Clone();
                                    DataRow[] rows  = tb.Select("workid=" + HIS.SYSTEM.Core.EntityConfig.WorkID);
                                    foreach (DataRow dr in rows)
                                    {
                                        dbfor.Rows.Add(dr.ItemArray);
                                    }
                                    tb = new DataTable();
                                    tb = dbfor;
                                }
                                else
                                {
                                    //DataRow drr = tb.NewRow();
                                    //drr[0] = 0;
                                    //drr[1] = "全部医院";
                                    //tb.Rows.Add(drr);
                                    for (int index = 0; index < tb.Rows.Count; index++)
                                    {
                                        if (Convert.ToInt32(tb.Rows[index]["workid"].ToString()) == 42)
                                        {
                                            tb.Rows[index]["workid"] = 0;
                                            break;
                                        }
                                    }
                                }
                            }


                            ((ComboBox)ctrl).DataSource       = tb;
                            ((ComboBox)ctrl).DisplayMember    = config.FOREIGNER_FIELD_CN_NAME;
                            ((ComboBox)ctrl).ValueMember      = config.FOREIGNER_FIELD_DB_NAME;
                            ((ComboBox)ctrl).DropDownStyle    = ComboBoxStyle.DropDown;
                            ((ComboBox)ctrl).MaxDropDownItems = 25;
                            ((ComboBox)ctrl).DropDownStyle    = ComboBoxStyle.DropDownList;
                        }
                        catch { }
                    }
                }
                else if (config.UIC_TYPE == 0)
                {
                    ctrl = new TextBox();
                    ((TextBox)ctrl).MaxLength = config.DATALENGTH;
                }
                else if (config.UIC_TYPE == 3)
                {
                    DateTimePicker dtpicter = new DateTimePicker();
                    dtpicter.CustomFormat = "yyyy-MM-dd HH:mm:ss";
                    dtpicter.Format       = DateTimePickerFormat.Custom;

                    if (dtbegin)
                    {
                        dtpicter.Value = Convert.ToDateTime(DateTime.Now.Date.ToString("yyyy-MM-dd") + " 00:00:00");
                        dtbegin        = false;
                    }
                    else
                    {
                        dtpicter.Value = Convert.ToDateTime(DateTime.Now.Date.ToString("yyyy-MM-dd") + " 23:59:59");
                    }
                    ctrl = dtpicter;
                }
                else
                {
                    ctrl         = new TextBox();
                    ctrl.Text    = employeeid.ToString();
                    ctrl.Visible = false;
                }



                #endregion

                #region 创建控件和列
                //定义标签
                Label lbl = new Label();
                lbl.Text     = config.PARAMETER_CN != "" ? config.PARAMETER_CN : config.PARAMETER;
                lbl.AutoSize = true;
                int lblWidth  = 0;
                int lblHeight = 0;
                using (System.Drawing.Graphics g = propertyPanel.CreateGraphics())
                {
                    System.Drawing.SizeF size = g.MeasureString(lbl.Text, propertyPanel.Font);
                    lblWidth  = Convert.ToInt32(size.Width);
                    lblHeight = Convert.ToInt32(size.Height);
                }

                //定义控件
                ctrl.Name     = config.PARAMETER;
                ctrl.Size     = new System.Drawing.Size(config.WIDTH, config.HEIGHT);
                ctrl.Location = new System.Drawing.Point(config.UIC_X_LOCA, config.UIC_Y_LOCA);
                ctrl.Enabled  = true;

                //ctrl.KeyPress += new KeyPressEventHandler(ctrl_KeyPress);
                ctrl.Tag = config;

                if (config.UIC_TYPE != 2 && config.UIC_TYPE != 4)
                {
                    lbl.Left = ctrl.Left - lblWidth - 4;
                    lbl.Top  = ctrl.Top + (ctrl.Height - lblHeight);
                    //if (!config.ALLOW_EMPTY)
                    //    lbl.ForeColor = System.Drawing.Color.Red;
                    propertyPanel.Controls.Add(lbl);
                }


                propertyPanel.Controls.Add(ctrl);


                #endregion
            }
        }
Exemplo n.º 19
0
        /// <summary>
        /// 初始化控件
        /// </summary>
        public void CreateControls()
        {
            Paramater    _para        = new Paramater();
            ParamProcess _paraProcess = new ParamProcess();

            propertyPanel.Controls.Clear();
            bool    dtbegin = true;
            Control ctrl    = new Control();

            int y_local = 9;

            for (int i = 0; i < _paralist.Count; i++)
            {
                Paramater config = new Paramater();
                config = _paralist[i];

                #region 设置控件和列样式
                if (config.PARAMETER == "V_CURREMPLOYEEID")
                {
                    ctrl         = new TextBox();
                    ctrl.Enabled = false;
                    ctrl.Text    = _employyid.ToString();
                }
                else if (config.PARAMETER == "V_CURRDEPTID")
                {
                    ctrl         = new TextBox();
                    ctrl.Enabled = false;
                    ctrl.Text    = _deptid.ToString();
                }
                else if (config.UIC_TYPE == 4)
                {
                    #region  quertytext
                    GWI.HIS.Windows.Controls.QueryTextBox txtDepartment = new QueryTextBox();
                    txtDepartment.AllowSelectedNullRow = false;
                    txtDepartment.BackColor            = System.Drawing.Color.White;
                    txtDepartment.DisplayField         = "name";
                    txtDepartment.Location             = new System.Drawing.Point(120, 12);
                    txtDepartment.MatchMode            = GWI.HIS.Windows.Controls.MatchModes.ByAnyString;
                    txtDepartment.MemberField          = "id";
                    txtDepartment.MemberValue          = null;
                    txtDepartment.Name               = "txtDepartment";
                    txtDepartment.NextControl        = null;
                    txtDepartment.NextControlByEnter = false;
                    txtDepartment.OffsetX            = 0;
                    txtDepartment.OffsetY            = 0;
                    txtDepartment.QueryFields        = new string[] {
                        "PY_CODE"
                    };
                    txtDepartment.SelectedValue = null;
                    txtDepartment.SelectionCardAlternatingRowBackColor = System.Drawing.Color.WhiteSmoke;
                    txtDepartment.SelectionCardBackColor          = System.Drawing.Color.White;
                    txtDepartment.SelectionCardColumnHeaderHeight = 20;
                    GWI.HIS.Windows.Controls.SelectionCardColumn selectionCardColumn1 = new GWI.HIS.Windows.Controls.SelectionCardColumn();
                    GWI.HIS.Windows.Controls.SelectionCardColumn selectionCardColumn2 = new GWI.HIS.Windows.Controls.SelectionCardColumn();
                    GWI.HIS.Windows.Controls.SelectionCardColumn selectionCardColumn3 = new GWI.HIS.Windows.Controls.SelectionCardColumn();
                    GWI.HIS.Windows.Controls.SelectionCardColumn selectionCardColumn4 = new GWI.HIS.Windows.Controls.SelectionCardColumn();
                    selectionCardColumn1.AutoFill      = true;
                    selectionCardColumn1.DataBindField = "name";
                    selectionCardColumn1.HeaderText    = "名称";
                    selectionCardColumn1.IsNameField   = false;
                    selectionCardColumn1.IsSeachColumn = true;
                    selectionCardColumn1.TextAlign     = System.Windows.Forms.DataGridViewContentAlignment.NotSet;
                    selectionCardColumn1.Visiable      = true;
                    selectionCardColumn1.Width         = 75;
                    selectionCardColumn2.AutoFill      = false;
                    selectionCardColumn2.DataBindField = "PY_CODE";
                    selectionCardColumn2.HeaderText    = "拼音码";
                    selectionCardColumn2.IsNameField   = false;
                    selectionCardColumn2.IsSeachColumn = true;
                    selectionCardColumn2.TextAlign     = System.Windows.Forms.DataGridViewContentAlignment.NotSet;
                    selectionCardColumn2.Visiable      = false;
                    selectionCardColumn2.Width         = 75;
                    selectionCardColumn3.AutoFill      = false;
                    selectionCardColumn3.DataBindField = "id";
                    selectionCardColumn3.HeaderText    = "id";
                    selectionCardColumn3.IsNameField   = false;
                    selectionCardColumn3.IsSeachColumn = false;
                    selectionCardColumn3.TextAlign     = System.Windows.Forms.DataGridViewContentAlignment.NotSet;
                    selectionCardColumn3.Visiable      = false;
                    selectionCardColumn3.Width         = 75;


                    DataTable dtSource = new DataTable();
                    if (config.FOREIGNER_FILTER_SQL != "")
                    {
                        dtSource = _para.GetDataSource(config.FOREIGNER_FILTER_SQL);
                    }
                    else
                    {
                        if (config.ENUMEID != -1)
                        {
                            dtSource = _para.GetDataSource(_paraProcess.GetEnumSql(config.ENUMEID).REMARK);
                        }
                    }
                    if (dtSource.Columns.Contains("备注"))
                    {
                        selectionCardColumn1.AutoFill      = false;
                        selectionCardColumn4.AutoFill      = true;
                        selectionCardColumn4.DataBindField = "备注";
                        selectionCardColumn4.HeaderText    = "备注";
                        selectionCardColumn4.IsNameField   = false;
                        selectionCardColumn4.IsSeachColumn = false;
                        selectionCardColumn4.TextAlign     = System.Windows.Forms.DataGridViewContentAlignment.NotSet;
                        selectionCardColumn4.Visiable      = true;
                        selectionCardColumn4.Width         = 200;
                        txtDepartment.SelectionCardColumns = new GWI.HIS.Windows.Controls.SelectionCardColumn[] {
                            selectionCardColumn1,
                            selectionCardColumn2,
                            selectionCardColumn3,
                            selectionCardColumn4
                        };
                        txtDepartment.SelectionCardWidth = 350;
                    }
                    else
                    {
                        txtDepartment.SelectionCardColumns = new GWI.HIS.Windows.Controls.SelectionCardColumn[] {
                            selectionCardColumn1,
                            selectionCardColumn2,
                            selectionCardColumn3
                        };
                        txtDepartment.SelectionCardWidth = 150;
                    }
                    txtDepartment.SelectionCardFont                 = null;
                    txtDepartment.SelectionCardHeight               = 200;
                    txtDepartment.SelectionCardInfoLabelBackColor   = System.Drawing.Color.Empty;
                    txtDepartment.SelectionCardRowHeaderWidth       = 35;
                    txtDepartment.SelectionCardRowHeight            = 23;
                    txtDepartment.SelectionCardSelectedRowBackColor = System.Drawing.Color.DarkBlue;
                    txtDepartment.SelectionCardType                 = GWI.HIS.Windows.Controls.SelectionCardTypes.List;
                    //  txtDepartment.SelectionCardWidth = 225;
                    txtDepartment.ShowRowNumber = true;
                    txtDepartment.ShowSelectionCardAfterEnter = true;
                    txtDepartment.Size       = new System.Drawing.Size(123, 21);
                    txtDepartment.TabIndex   = 0;
                    txtDepartment.TextFormat = GWI.HIS.Windows.Controls.TextFormatStyle.AnyString;
                    txtDepartment.Visible    = true;
                    #endregion
                    if (config.FOREIGNER_FILTER_SQL != "")
                    {
                        txtDepartment.SetSelectionCardDataSource(dtSource);
                    }
                    else
                    {
                        if (config.ENUMEID != -1)
                        {
                            txtDepartment.SetSelectionCardDataSource(dtSource);
                        }
                    }
                    txtDepartment.DisplayField = "name";
                    txtDepartment.MemberField  = "id";
                    txtDepartment.MemberValue  = -1;
                    ctrl = txtDepartment;
                }
                else if (config.UIC_TYPE == 2)
                {
                    #region checkbox
                    ctrl = new CheckBox();
                    ((CheckBox)ctrl).Text     = config.PARAMETER_CN;
                    ((CheckBox)ctrl).AutoSize = true;
                    #endregion
                }
                else if (config.UIC_TYPE == 1)
                {
                    #region combobox
                    ctrl = new ComboBox();

                    if (config.FOREIGNER_FILTER_SQL != "")
                    {
                        ((ComboBox)ctrl).DataSource = _para.GetDataSource(config.FOREIGNER_FILTER_SQL);
                    }
                    else
                    {
                        if (config.ENUMEID != -1)
                        {
                            string sql = _paraProcess.GetEnumSql(config.ENUMEID).REMARK;
                            if (sql != null && sql != "")
                            {
                                ((ComboBox)ctrl).DataSource = _para.GetDataSource(sql);
                            }
                            else
                            {
                                ((ComboBox)ctrl).DataSource = _paraProcess.GetEnumOrders(config.ENUMEID);
                            }
                        }
                    }
                    ((ComboBox)ctrl).DisplayMember    = "name";
                    ((ComboBox)ctrl).ValueMember      = "id";
                    ((ComboBox)ctrl).MaxDropDownItems = 25;
                    ((ComboBox)ctrl).DropDownStyle    = ComboBoxStyle.DropDownList;

                    #endregion
                }
                else if (config.UIC_TYPE == 0)
                {
                    #region textbox
                    ctrl = new TextBox();

                    ((TextBox)ctrl).MaxLength = config.DATALENGTH;
                    #endregion
                }
                else if (config.UIC_TYPE == 3)
                {
                    #region datetimepicker
                    DateTimePicker dtpicter = new DateTimePicker();
                    dtpicter.CustomFormat = "yyyy-MM-dd HH:mm:ss";
                    dtpicter.Format       = DateTimePickerFormat.Custom;

                    if (dtbegin)
                    {
                        dtpicter.Value = Convert.ToDateTime(DateTime.Now.Date.ToString("yyyy-MM-dd") + " 00:00:00");
                        dtbegin        = false;
                    }
                    else
                    {
                        dtpicter.Value = Convert.ToDateTime(DateTime.Now.Date.ToString("yyyy-MM-dd") + " 23:59:59");
                    }
                    ctrl = dtpicter;
                    #endregion
                }
                else
                {
                }

                #endregion

                #region 创建控件和列
                // 定义标签
                Label lbl = new Label();
                lbl.Text     = config.PARAMETER_CN != "" ? config.PARAMETER_CN : config.PARAMETER;
                lbl.AutoSize = true;
                int lblWidth  = 0;
                int lblHeight = 0;
                using (System.Drawing.Graphics g = propertyPanel.CreateGraphics())
                {
                    System.Drawing.SizeF size = g.MeasureString(lbl.Text, propertyPanel.Font);
                    lblWidth  = Convert.ToInt32(size.Width);
                    lblHeight = Convert.ToInt32(size.Height);
                }

                //定义控件
                ctrl.Name     = config.PARAMETER;
                ctrl.Size     = new System.Drawing.Size(140, 21);
                ctrl.Location = new System.Drawing.Point(117, y_local);
                ctrl.Tag      = config;

                if (config.UIC_TYPE != 2)
                {
                    lbl.Left = ctrl.Left - lblWidth - 4;
                    lbl.Top  = ctrl.Top + (21 - lblHeight);
                    propertyPanel.Controls.Add(lbl);
                }
                if (_paralist[i].PARAMETER_TYPE == "OUT")
                {
                    ctrl.Visible = false;
                    lbl.Visible  = false;
                }
                propertyPanel.Controls.Add(ctrl);
                y_local += 27;

                #endregion
            }
        }