protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { BLL.ad_pos apBll = new BLL.ad_pos(); ddlAp.DataValueField = "id"; ddlAp.DataTextField = "title"; ddlAp.DataSource = apBll.GetAllList(); ddlAp.DataBind(); ddlAp.Items.Insert(0, new ListItem("全部", "0")); BindData(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BLL.ad_pos apBll = new BLL.ad_pos(); ddlAp.DataValueField = "id"; ddlAp.DataTextField = "title"; ddlAp.DataSource = apBll.GetAllList(); ddlAp.DataBind(); if (Request.QueryString["type"] != null) { ddlAp.SelectedValue = Request.QueryString["type"].ToString(); } bindPos(); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { if (Request.Params["id"] != null && Request.Params["id"].Trim() != "") { BLL.ad_pos apBll = new BLL.ad_pos(); ddlAp.DataValueField = "id"; ddlAp.DataTextField = "title"; ddlAp.DataSource = apBll.GetAllList(); ddlAp.DataBind(); int siId = (Convert.ToInt32(Request.Params["id"])); ShowInfo(siId); } } }
private void bindPos() { BLL.ad_pos apBll = new BLL.ad_pos(); Model.ad_pos model = apBll.GetModel(int.Parse(ddlAp.SelectedValue)); lblInfo.Text = "【" + ClassHelper.Ad_Type_Arr[model.types.Value] + "】 【宽:" + model.width + " 像素】【高:" + model.height + " 像素】"; if (model.types.Value == 0) { flPic.Visible = true; txtRemark.Visible = false; lblTypeName.Text = "图片"; } else if (model.types.Value == 1) { flPic.Visible = false; txtRemark.Visible = true; lblTypeName.Text = "文字"; } }