private List<SelectListItem> GetCardPkg(List<SelectListItem> ddllist, object[] where) { ClubCardMgm cardMgm = new ClubCardMgm(); if(where!=null&&where.Length>0) { var pkgList = cardMgm.GetAvailablePkgs((int)where[0]); if (pkgList.Count > 0) { pkgList.ForEach(item => { if (ddllist.Count <= 0) ddllist.Add(new SelectListItem() { Text = item.PackageName, Value = item.ClubCardPackageID,Selected=true }); else ddllist.Add(new SelectListItem() { Text = item.PackageName, Value = item.ClubCardPackageID}); }); } else { ddllist.Add(new SelectListItem() { Text = "该会员无可用套餐", Value = "-1",Selected=true}); } } else { ddllist.Add(new SelectListItem() { Text = "会员id为空", Value = "-1", Selected = true }); } return ddllist; }