| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 | using System;using System.Collections.Generic;using System.Text;namespace FPER{    /**                <!--Combobox에 item 넣기 사용예-->     *                  cboUse_Flag.Items.Clear();     *                  ArrayList ary = new ArrayList();     *                  ary.Add(new cboitem("Y", "사용함"));     *                  ary.Add(new cboitem("N", "사용안함"));     *      *                 cboUse_Flag.DataSource = ary;     *                 cboUse_Flag.DisplayMember = "text";     *                 cboUse_Flag.ValueMember = "value";     *      *      *                <!--Combobox에 item value 읽어오기 사용예-->     *                   CType(cboYear.SelectedItem, cmbValue).ToString();     *      *      ***/    public class cboitem    {        private object cboValue = null;        private object cboText = null;        public cboitem(object val, object txt)        {            //base();            this.cboValue = val;            this.cboText = txt;        }        public object ValueObject        {            get            {                return this.cboValue;            }        }        public String value        {            get            {                return this.cboValue.ToString();            }        }        public String text        {            get            {                return this.cboText.ToString();            }        }        public override string ToString()        {            if (this.cboValue == null) return "";            else return this.cboValue.ToString();            //return "";        }    }}
 |