예제 #1
0
        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();
            }
        }
예제 #2
0
파일: Add.aspx.cs 프로젝트: tcld2269/HM_ED
        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();
            }
        }
예제 #3
0
        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);
                }
            }
        }
예제 #4
0
파일: Add.aspx.cs 프로젝트: tcld2269/HM_ED
 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  = "文字";
     }
 }