Ejemplo n.º 1
0
        private void BindCombox()
        {
            List <frmGroup.GroupCol> list = new List <frmGroup.GroupCol>();

            frmGroup.GroupCol item = new frmGroup.GroupCol
            {
                valueMember = "R13",
                textMember  = "按剂型统计"
            };
            list.Add(item);
            item = new frmGroup.GroupCol
            {
                valueMember = "R11",
                textMember  = "按毒性统计"
            };
            list.Add(item);
            item = new frmGroup.GroupCol
            {
                valueMember = "R12",
                textMember  = "按农药类别统计"
            };
            list.Add(item);
            item = new frmGroup.GroupCol
            {
                valueMember = "F2",
                textMember  = "按生产企业统计"
            };
            list.Add(item);
            this.comboBox1.DataSource    = list;
            this.comboBox1.DisplayMember = "textMember";
            this.comboBox1.ValueMember   = "valueMember";
        }
Ejemplo n.º 2
0
 private void BindCombox()
 {
     List<frmGroup.GroupCol> list = new List<frmGroup.GroupCol>();
     frmGroup.GroupCol item = new frmGroup.GroupCol
     {
         valueMember = "R13",
         textMember = "按剂型统计"
     };
     list.Add(item);
     item = new frmGroup.GroupCol
     {
         valueMember = "R11",
         textMember = "按毒性统计"
     };
     list.Add(item);
     item = new frmGroup.GroupCol
     {
         valueMember = "R12",
         textMember = "按农药类别统计"
     };
     list.Add(item);
     item = new frmGroup.GroupCol
     {
         valueMember = "F2",
         textMember = "按生产企业统计"
     };
     list.Add(item);
     this.comboBox1.DataSource = list;
     this.comboBox1.DisplayMember = "textMember";
     this.comboBox1.ValueMember = "valueMember";
 }