/// <summary> /// 加载平台列表 /// </summary> private void LoadType() { List <SelectListItem> typeList = new List <SelectListItem>(); //typeList.Add(new SelectListItem() { Text = "所有类别", Value = "0" }); foreach (var item in EnumHelper.BEnumToDictionary(typeof(Entity.SysDbBackType))) { string text = EnumHelper.GetDescription((Entity.SysDbBackType)item.Key); typeList.Add(new SelectListItem() { Text = text, Value = item.Key.ToString() }); } ViewData["TypeList"] = typeList; BLL.BLLSysDbBack bll = new BLL.BLLSysDbBack(); var db_list = bll.GetSysDbList(); List <SelectListItem> dbList = new List <SelectListItem>(); dbList.Add(new SelectListItem() { Text = "请选择数据库", Value = "" }); foreach (var item in db_list) { dbList.Add(new SelectListItem() { Text = item.name, Value = item.name }); } ViewData["dbList"] = dbList; }