/// <summary> /// 初始化日期下拉列表 /// </summary> private void SetDateList() { comboBox1.Items.Clear(); DataTable table = MapDBClass.GetPropertyDateList(_MapId, _LayerId, _Object.ID); for (int i = 0; i < table.Rows.Count; i++) { comboBox1.Items.Add(table.Rows[i][0].ToString()); } if (comboBox1.Items.Count > 0) { comboBox1.SelectedIndex = comboBox1.Items.Count - 1; } else { comboBox1_SelectedIndexChanged(null, null); } }