1 private void FormSaddle_Load(object sender, EventArgs e) 2 { 3 //清除TYPE列 4 cbbType.Items.Clear(); 5 //默认MAIN为选中 6 rbMain.Checked = true; 7 //获取TYPE表放入内存 8 tbType = GetAccessData(TypeName); 9 //查询TYPE列 10 TypeList = tbType.AsEnumerable() 11 .Where(p => (p.Field<double>("DnX") < DI && p.Field<double>("DnD") >= DI)) 12 .Select(p => p.Field<string>("Type2")).Distinct().ToList(); 13 //将列变成数组加入TYPE中 14 cbbType.Items.AddRange(TypeList.ToArray()); 15 }
时间: 2024-11-07 11:28:51