Пример #1
0
        private void selectCameraVersion_SelectedIndexChanged(object sender, EventArgs e)
        {
            string versionFind = "";
            string modelFind   = "模板名称";
            string sql         = "";

            if (selectCameraVersion.Text == "全景")
            {
                versionFind = "全景";
                PortNo      = 1;
                sql         = "SELECT * FROM 摄像头模板 WHERE" + versionFind;
                modelTextBox.AutoCompleteCustomSource = tempFix.fuzzyquery(sql, modelFind);
                modelTextBox.AutoCompleteMode         = AutoCompleteMode.Suggest;
                modelTextBox.AutoCompleteSource       = AutoCompleteSource.CustomSource;
            }
            else if (selectCameraVersion.Text == "其它")
            {
                versionFind = "其它";
                PortNo      = 0;
                sql         = "SELECT * FROM 摄像头模板 WHERE" + versionFind;
                modelTextBox.AutoCompleteCustomSource = tempFix.fuzzyquery(sql, modelFind);
                modelTextBox.AutoCompleteMode         = AutoCompleteMode.Suggest;
                modelTextBox.AutoCompleteSource       = AutoCompleteSource.CustomSource;
            }
        }
Пример #2
0
        private void changeComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            string find;
            string sql;

            this.findTextBox.Clear();
            if (changeComboBox.Text == "产品名称")
            {
                find = "产品名称";
                sql  = "SELECT * FROM 源数据 WHERE" + find;
                findTextBox.AutoCompleteCustomSource = tempFix.fuzzyquery(sql, find);
                findTextBox.AutoCompleteMode         = AutoCompleteMode.Suggest;
                findTextBox.AutoCompleteSource       = AutoCompleteSource.CustomSource;
            }
            else if (changeComboBox.Text == "型号")
            {
                find = "型号";
                sql  = "SELECT * FROM 源数据 WHERE" + find;
                findTextBox.AutoCompleteCustomSource = tempFix.fuzzyquery(sql, find);
                findTextBox.AutoCompleteMode         = AutoCompleteMode.Suggest;
                findTextBox.AutoCompleteSource       = AutoCompleteSource.CustomSource;
            }
            else if (changeComboBox.Text == "零部件编号")
            {
                find = "零部件编号";
                sql  = "SELECT * FROM 源数据 WHERE" + find;
                findTextBox.AutoCompleteCustomSource = tempFix.fuzzyquery(sql, find);
                findTextBox.AutoCompleteMode         = AutoCompleteMode.Suggest;
                findTextBox.AutoCompleteSource       = AutoCompleteSource.CustomSource;
            }
            else if (changeComboBox.Text == "产品名称配置")
            {
                find = "产品名称配置";
                sql  = "SELECT * FROM 源数据 WHERE" + find;
                findTextBox.AutoCompleteCustomSource = tempFix.fuzzyquery(sql, find);
                findTextBox.AutoCompleteMode         = AutoCompleteMode.Suggest;
                findTextBox.AutoCompleteSource       = AutoCompleteSource.CustomSource;
            }
        }