/// <summary> /// 加载字典类型 /// </summary> /// <param name="fddl">列表框</param> public static void LoadDictType(DropDownList fddl, int dicType) { fddl.Items.Clear(); DicCode dc = new DicCode(); IList<AlarmDicCodeInfo> dicList = dc.GetDicCode(dicType); foreach (AlarmDicCodeInfo dic in dicList) { ListItem ddlone = new ListItem(dic.DicName, dic.DicCode.ToString()); fddl.Items.Add(ddlone); } ListItem ddltwo = new ListItem("请选择", "0"); ddltwo.Selected = true; fddl.Items.Add(ddltwo); }
/// <summary> /// 加载字典类型 /// </summary> /// <param name="fddl">列表框</param> public static void LoadDictType(DropDownList fddl, int dicType) { fddl.Items.Clear(); DicCode dc = new DicCode(); IList <AlarmDicCodeInfo> dicList = dc.GetDicCode(dicType); foreach (AlarmDicCodeInfo dic in dicList) { ListItem ddlone = new ListItem(dic.DicName, dic.DicCode.ToString()); fddl.Items.Add(ddlone); } ListItem ddltwo = new ListItem("请选择", "0"); ddltwo.Selected = true; fddl.Items.Add(ddltwo); }