Ejemplo n.º 1
0
        /*
         * 方法名称: cobBoBoxLinkage()
         * 方法功能描述:选择类别后,设备名称联动;
         *
         * 创建人:冯雪
         * 创建时间:2009-03-21
         *
         * 修改人:
         * 修改时间:
         * 修改内容:
         *
         */
        private void cobBoBoxLinkage()
        {
            long ekId;

            if (cbxKind.SelectedValue == null)
            {
                ekId = 0;
            }
            else
            {
                ekId = Convert.ToInt64(cbxKind.SelectedValue.ToString());
            }
            if (eLogic.InitialEName(ekId).Rows.Count != 0)
            {
                cbxName.DataSource    = eLogic.InitialEName(ekId);
                cbxName.DisplayMember = "设备名称";
                cbxName.ValueMember   = "id";
                cbxName.Text          = "";
                cbxName.SelectedIndex = -1;
            }
            else
            {
                cbxName.DataSource = eLogic.InitialEName(ekId);
            }
            cbxModel.Text          = "";
            cbxModel.SelectedIndex = -1;
        }