private void bind() { model = manage.GetModel(Request["ID"].ToString()); txtChannelID.Text = model.CHANNEL; channelModel = mChannel.GetModel(model.CHANNEL); if (channelModel != null) { txtChannel.Text = channelModel.CHANNELNAME; } txtKeywords.Text = model.KEYWORDS; txtName.Text = model.TITLE; lblPUrl.Text = model.IMAGESHOW; lblVideo.Text = model.VIDEOSHOW; htmlMessage = model.NEWSTEXT; ds = mSchool.GetList(" status = '1'"); ddlSchool.DataSource = ds.Tables[0].DefaultView; ddlSchool.DataTextField = "SCHOOLNAME"; ddlSchool.DataValueField = "ID"; ddlSchool.DataBind(); ddlSchool.SelectedValue = model.SCHOOLID; dv = mBrand.GetList(" status = '1'"); ddlBrand.DataSource = dv.Tables[0].DefaultView; ddlBrand.DataTextField = "BRANDNAME"; ddlBrand.DataValueField = "ID"; ddlBrand.DataBind(); ddlBrand.SelectedValue = model.BRANDID; }
private void Bind() { model = new E_Model.NewsChannel(); model = manage.GetModel(Request["ID"].ToString()); txtChannelName.Text = model.CHANNELNAME; txtChannelCode.Text = model.CHANNELCODE; txtParent.Text = model.PARENTID; txtDescription.Text = model.DESCRIPTION; txtMainList.Text = model.SORTLIST.ToString(); if (model.STATUS == "0") { cblStatus.Checked = false; } if (model.STATUS == "1") { cblStatus.Checked = true; } if (model.PARENTID != "00000000-0000-0000-0000-000000000000") { model = new E_Model.NewsChannel(); txtParentID.Text = manage.GetModel(txtParent.Text).CHANNELNAME; } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(E_Model.NewsChannel model) { return(dal.Update(model)); }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(E_Model.NewsChannel model) { return(dal.Add(model)); }