コード例 #1
0
ファイル: BarEdit.aspx.cs プロジェクト: scutsky/iyuewan
        protected void btnSave_Click(object sender, EventArgs e)
        {
            Spread.BLL.Adbanner bll = new Spread.BLL.Adbanner();
            Spread.Model.Adbanner model = bll.GetModel(this.Id);

            model.Title = this.txtTitle.Text.Trim();
            model.StartTime = DateTime.Parse(this.txtStartTime.Text.Trim());
            model.EndTime = DateTime.Parse(this.txtEndTime.Text.Trim());
            model.AdUrl = this.txtImgUrl.Text.Trim();
            model.LinkUrl = this.txtLinkUrl.Text.Trim();
            model.AdRemark = StringPlus.ToHtml(this.txtAdRemark.Text);
            model.IsLock =Convert.ToBoolean(this.rblIsLock.SelectedValue);
            bll.Update(model);
            JscriptPrint("广告修改成功啦!", "BarList.aspx?Pid=" + model.Aid, "Success");
        }
コード例 #2
0
ファイル: BarEdit.aspx.cs プロジェクト: scutsky/iyuewan
        private void ShowInfo(int _id)
        {
            Spread.BLL.Adbanner bll = new Spread.BLL.Adbanner();
            Spread.Model.Adbanner model = bll.GetModel(_id);

            this.pid = model.Aid;
            this.lblAdTitle.Text = model.Aid.ToString();
            this.txtTitle.Text = model.Title;
            this.txtStartTime.Text = model.StartTime.ToString("yyyy-MM-dd");
            this.txtEndTime.Text = model.EndTime.ToString("yyyy-MM-dd");
            this.txtImgUrl.Text = model.AdUrl;
            this.txtLinkUrl.Text = model.LinkUrl;
            this.txtAdRemark.Text = StringPlus.ToTxt(model.AdRemark);
            this.rblIsLock.SelectedValue = model.IsLock.ToString();

            //显示所属广告位
            GetAdType(this.pid);
        }