Пример #1
0
        public DataSet GetClsDetailDataSet(string clsCd)
        {
            ICClsDetailNoARDao     d    = ComponentLocator.Instance().Resolve <ICClsDetailNoARDao>();
            IList <CClsDetailNoAR> list = d.GetClsDetailList(LangUtils.GetCurrentLanguage(), clsCd);
            DataTable dt = DataTableUtils.ToDataTable(list);

            dt.TableName = "CClsDetailNoAR";
            DataSet ds = new DataSet();

            ds.Tables.Add(dt);
            return(ds);
        }
Пример #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;
        }