public static ChoicesetValueInfoCollection GetDictionaryFieldValue(ChoicesetInfo choicesetInfo, bool isShowEnable) { ChoicesetValueInfoCollection infos = new ChoicesetValueInfoCollection(); if (!string.IsNullOrEmpty(choicesetInfo.FieldValue)) { string[] strArray = choicesetInfo.FieldValue.Split(new char[] { '$' }, StringSplitOptions.RemoveEmptyEntries); for (int i = 0; i < strArray.Length; i++) { string[] strArray2 = strArray[i].Split(new char[] { '|' }); if (strArray2.Length == 3) { ChoicesetValueInfo item = new ChoicesetValueInfo(); item.DataTextField = strArray2[0]; item.IsEnable = DataConverter.CBoolean(strArray2[1]); item.IsDefault = DataConverter.CBoolean(strArray2[2]); item.DataValueField = i; if (isShowEnable) { if (item.IsEnable) { infos.Add(item); } } else { infos.Add(item); } } } } return(infos); }
protected override void OnInit(EventArgs e) { string tableName = DataSecurity.FilterBadChar(BasePage.RequestString("TableName", "PE_Client")); string fieldName = DataSecurity.FilterBadChar(BasePage.RequestString("FieldName", "Area")); this.choicesetInfo = Choiceset.GetChoicesetInfoByFieldAndTableName(tableName, fieldName); this.CreateFormFieldValueTable(); base.OnInit(e); }
private static ChoicesetInfo ChoicesetInfoFromrdr(NullableDataReader rdr) { ChoicesetInfo info = new ChoicesetInfo(); info.FieldId = rdr.GetInt32("FieldID"); info.Title = rdr.GetString("Title"); info.TableName = rdr.GetString("TableName"); info.FieldName = rdr.GetString("FieldName"); info.FieldValue = rdr.GetString("FieldValue"); return(info); }
public static ChoicesetValueInfoCollection GetDictionaryFieldValue(ChoicesetInfo choicesetInfo) { return(GetDictionaryFieldValue(choicesetInfo, false)); }