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); }
/// <summary> /// 根据区分代码和区分明细代码,检查数据表中是否存在 ///<param name="clsCd"></param> ///<param name="detailCd"></param> ///<param name="langCd"></param> /// <returns>Boolean</returns> /// <returns>CClsDetailNoAR</returns> /// </summary> public CClsDetailNoAR Check01Vo(string langCd, string clsCd, string detailCd) { CClsDetailNoAR vo = null; try { if (!String.IsNullOrEmpty(clsCd) && !(string.IsNullOrEmpty(detailCd)) && !(string.IsNullOrEmpty(langCd))) { ICClsDetailNoARDao d = ComponentLocator.Instance().Resolve <ICClsDetailNoARDao>(); vo = d.GetClsDetail(langCd, clsCd, detailCd); } } catch (Exception ex) { throw new ApplicationException(ex.Message, ex); } return(vo); }
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; }