private void BindingReasonCategory() { List <DictionaryInfo> list; const string owner = "U"; if (ReferenceDropDownList != null) { list = Mapper.Map <List <DictionaryInfo>, List <DictionaryInfo> > ((List <DictionaryInfo>)ReferenceDropDownList.DataSource); } else { list = DictionaryInfoBll.QueryAll(DictionaryCategory.ReasonCode, owner); } if (ContainEmptyItem) { if (ReferenceDropDownList == null || (ReferenceDropDownList != null && !ReferenceDropDownList.ContainEmptyItem)) { list.Insert(0, new DictionaryInfo { Code = "", Name = "" }); } } UI.BindingDropDownList(this, list, "Name", "Code"); }
private void BindingUserGroup() { List <RightUserGroup> list; if (ReferenceDropDownList != null) { list = Mapper.Map <List <RightUserGroup>, List <RightUserGroup> > ((List <RightUserGroup>)ReferenceDropDownList.DataSource); } else { list = RightUserGroupBll.QueryAll(); } if (ContainEmptyItem) { if (ReferenceDropDownList == null || (ReferenceDropDownList != null && !ReferenceDropDownList.ContainEmptyItem)) { list.Insert(0, new RightUserGroup { GroupName = "", Sysid = "" }); } } UI.BindingDropDownList(this, list, "GroupName", "Sysid"); }
private void BindingReasonCode() { List <DictionaryItem> list; if (QueryCondition == null) { QueryCondition = new QueryCondition(); } QueryCondition.ReasonCategory = DictionaryCategory.ReasonCode.ToString(); if (ReferenceDropDownList != null) { list = Mapper.Map <List <DictionaryItem>, List <DictionaryItem> > ((List <DictionaryItem>)ReferenceDropDownList.DataSource); } else { list = DictionaryItemBll.QueryDictionaryItem(QueryCondition); } if (ContainEmptyItem) { if (ReferenceDropDownList == null || (ReferenceDropDownList != null && !ReferenceDropDownList.ContainEmptyItem)) { list.Insert(0, new DictionaryItem { Code = "", Name = "" }); } } UI.BindingDropDownList(this, list, "Name", "Code"); }