/// <summary> /// 界面加载 /// </summary> void InitializePage() { ContentModelCollection cmc = new ContentModelCollection(); ContentModelCollection orcmc = ModelHelper.GetAllContentModel(); foreach (We7.Model.Core.ContentModel c in orcmc) { if (c.Type == ModelType.ADVICE) { cmc.Add(c); } } ddlAdviceType.DataSource = cmc; ddlAdviceType.DataTextField = "label"; ddlAdviceType.DataValueField = "name"; ddlAdviceType.DataBind(); ddlAdviceType.Items.Insert(0, new ListItem("请选择", "")); adviceType = AdviceTypeHelper.GetAdviceType(AdviceTypeID); if (adviceType != null) { ConfigNameTextBox.Text = adviceType.Title.ToString(); ddlAdviceType.SelectedValue = adviceType.ModelName; } }
public void AddToCollection(ReadingModelBase model) { ContentModelCollection.Add(model); }