private void TableDropDownList_Load(object sender, EventArgs e)
        {
            if (IsDesignMode())
            {
                return;
            }

            ICTableDropDownListNoARDao     d    = ComponentLocator.Instance().Resolve <ICTableDropDownListNoARDao>();
            IList <CTableDropDownListNoAR> list = new List <CTableDropDownListNoAR>();

            if (this.languageFlg)
            {
                list = d.GetDetail(LangUtils.GetCurrentLanguage(), this.languageColumn, this.tableNm, this.valueColumn, this.nameColumn);
            }
            else
            {
                list = d.GetDetail(this.tableNm, this.valueColumn, this.nameColumn);
            }

            this.comboBox1.Items.Clear();
            if (autoaddblankitem)
            {
                ConditionVo vo = new ConditionVo();
                vo.ConditionValue = "";
                vo.ConditionName  = "";
                this.comboBox1.Items.Add(vo);
            }

            foreach (CTableDropDownListNoAR detail in list)
            {
                ConditionVo conditionvo = new ConditionVo();
                conditionvo.ConditionValue = detail.ICd;
                conditionvo.ConditionName  = detail.IName;
                this.comboBox1.Items.Add(conditionvo);
            }

            this.comboBox1.SelectedIndexChanged += new EventHandler(OnSelectChanged);
            this.comboBox1.SelectedIndex         = this.defaultselectedindex;
        }
Example #2
0
        private void ClsDetailCodeRefDropDownList_Load(object sender, EventArgs e)
        {
            if (IsDesignMode())
            {
                return;
            }

            ICClsDetailNoARDao     d    = ComponentLocator.Instance().Resolve <ICClsDetailNoARDao>();
            IList <CClsDetailNoAR> list = d.GetClsDetailList(LangUtils.GetCurrentLanguage(), this.clsCd);

            this.comboBox1.Items.Clear();
            if (autoaddblankitem)
            {
                ConditionVo vo = new ConditionVo();
                vo.ConditionValue = "";
                vo.ConditionName  = "";
                this.comboBox1.Items.Add(vo);
            }
            //IList<ConditionVo> result = new List<ConditionVo>();
            foreach (CClsDetailNoAR clsdetail in list)
            {
                ConditionVo conditionvo = new ConditionVo();
                conditionvo.ConditionValue = clsdetail.IClsDetailCd;
                if (showNameDesc)
                {
                    conditionvo.ConditionName = clsdetail.IClsNameDesc;
                }
                else
                {
                    conditionvo.ConditionName = clsdetail.IClsDetailDesc;
                }
                this.comboBox1.Items.Add(conditionvo);
            }


            this.comboBox1.SelectedIndexChanged += new EventHandler(OnSelectChanged);
            this.comboBox1.SelectedIndex         = this.defaultselectedindex;
        }