示例#1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                ProductClass.DataSource     = ProductClassBLL.ReadRootList();
                ProductClass.DataTextField  = "Name";
                ProductClass.DataValueField = "ID";
                ProductClass.DataBind();

                int id = RequestHelper.GetQueryString <int>("Id");
                if (id > 0)
                {
                    CheckAdminPower("ReadAdImage", PowerCheckType.Single);

                    var adImage = AdImageBLL.Read(id);
                    Title.Text        = adImage.Title;
                    SubTitle.Text     = adImage.SubTitle;
                    LinkUrl.Text      = adImage.LinkUrl;
                    ImageUrl.Text     = adImage.ImageUrl;
                    OrderId.Text      = adImage.OrderId.ToString();
                    BgColor.Text      = adImage.MobileLinkUrl;
                    ProductClass.Text = adImage.ClassId.ToString();

                    _adType = adImage.AdType;
                }
                else
                {
                    OrderId.Text = AdImageBLL.MaxOrderId(AdImageInfo.TABLENAME).ToString();

                    _adType = RequestHelper.GetQueryString <int>("fp_type");
                }
            }
        }
示例#2
0
        protected override void OnInitComplete(EventArgs e)
        {
            base.OnInitComplete(e);
            if (!Page.IsPostBack)
            {
                BindFiles();

                ProductClass.DataSource = ProductClassBLL.ReadUnlimitClassList();
                ProductClass.DataBind();
            }
        }