comboBox.DataSource绑定

            string strSql = "select AMID as [编号],AMLX as [类型] from SYS_AlarmType order by AMID";
            DataTable DT = TH.TracerEnerView.DBUtility.DbHelperSQL.Query(strSql).Tables[0];
            comboBoxType.DataSource = DT;
            comboBoxType.DisplayMember = "类型";
            comboBoxType.ValueMember = "编号";

posted @ 2012-01-30 16:54  晴天有时下鱼  阅读(956)  评论(0编辑  收藏  举报