示例#1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                 if (int.TryParse(Request.QueryString["pid"],out groupEventID) && groupEventID > 0)
                 {
                     this.hidPid.Value = groupEventID.ToString();
                     EventItemGroupEntity entity = bll.QueryGroupEntity(groupEventID);

                     if (entity != null && entity.GroupEventID > 0)
                     {
                         this.txtGroupEventName.Value = entity.GroupEventName;
                         this.txtPublishTime.Value = entity.PublishTime.ToString("yyyy-MM-dd HH:mm:ss");
                     }
                     else
                     {
                         WebMaster.EndPage();
                     }
                 }
                else
                 {
                     WebMaster.EndPage();
                 }
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (int.TryParse(Request.QueryString["groupid"], out eventGroupID) && eventGroupID > 0 &&
             int.TryParse(Request.QueryString["itemid"], out eventItemID) && eventItemID > 0)
         {
             EventItemGroupRelViewEntity entity = bll.QueryGroupRelViewEntity(eventGroupID, eventItemID);
             if (entity != null)
             {
                 this.txtTitle.Value        = entity.Title;
                 this.txtDisplayOrder.Value = entity.DisplayOrder.ToString();
                 this.hid_GroupID.Value     = eventGroupID.ToString();
                 this.hid_ItemID.Value      = eventItemID.ToString();
             }
             else
             {
                 WebMaster.EndPage();
             }
         }
         else
         {
             WebMaster.EndPage();
         }
     }
 }
示例#3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (!string.IsNullOrEmpty(Request.QueryString["groupid"]))
         {
             this.hidGroupID.Value = Request.QueryString["groupid"];
             this.hidFun.Value     = Request.QueryString["fun"];
         }
         else
         {
             WebMaster.EndPage();
         }
     }
 }
示例#4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int.TryParse(Request.QueryString["pid"], out eventItemID);
            if (!Page.IsPostBack)
            {
                InitData();

                if (eventItemID > 0)
                {
                    //绑定数据
                    BindData();
                }
                else
                {
                    WebMaster.EndPage();
                }
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     int.TryParse(Request.QueryString["pid"], out eventItemID);
     if (!IsPostBack)
     {
         if (eventItemID > 0)
         {
             this.hidPid.Value = eventItemID.ToString();
             DataTable table  = bllEventItem.QueryViewOnlyEventItemTable(eventItemID);
             string    advert = table.Rows[0]["Advert"].ToString();
             chkAdvert.Checked    = advert == "1" ? true : false;
             txtAdvertOrder.Value = table.Rows[0]["AdvertOrder"].ToString();
             txtAdsEndTime.Value  = Convert.ToDateTime(table.Rows[0]["AdsEndTime"]).Year == 4000 ? "" : Convert.ToDateTime(table.Rows[0]["AdsEndTime"]).ToString("yyyy-MM-dd HH:mm:ss");
             if (advert != "1")
             {
                 txtAdvertOrder.Attributes.Add("disabled", "disabled");
             }
         }
         else
         {
             WebMaster.EndPage();
         }
     }
 }
示例#6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Guid eventItemGUID;
                //判定是否是分享页
                string id  = Request["pid"];
                string pid = string.Empty;
                if (id.IndexOf("_") != -1)
                {
                    string[] urlSplit = id.Split('_');
                    if (urlSplit[0] == "1")
                    {
                        prefix             = "1_";
                        moblieShareHeader += "<header class='app-logo-box' style='display: none;' id='divMoblieShareHeader'>";
                        moblieShareHeader += "<div class='logo-box article-content'>";
                        moblieShareHeader += "<figure class='logo'>";
                        moblieShareHeader += "<img src='/images/app-logo.png' alt='开卷日历logo'/>";
                        moblieShareHeader += "</figure>";
                        moblieShareHeader += "<div class='app-open'>";
                        moblieShareHeader += "<a href='http://www.kjrili.com/app/download.html'>立即打开</a>";
                        moblieShareHeader += "</div>";
                        moblieShareHeader += "</div>";
                        moblieShareHeader += "</header>";

                        moblieShareFooter += " <div class='app-btn more' id='divMoblieShareFooter' style='display: none;'>";
                        moblieShareFooter += "<span></span><a href='http://www.kjrili.com/app/download.html' class='more-btn'><img src='/images/share_icon.png'/>";
                        moblieShareFooter += "打开开卷日历,看更多精彩内容</a> ";
                        moblieShareFooter += "</div> ";
                    }
                    pid = urlSplit[1];
                }
                else
                {
                    pid = id;
                }
                if (Guid.TryParse(pid, out eventItemGUID))
                {
                    this.hidGlobalGUID.Value = eventItemGUID.ToString();
                    BCtrl_EventItem bll = new BCtrl_EventItem();

                    EventItemViewEntity entity = bll.QueryViewEntity(eventItemGUID);


                    title = entity.Title;
                    if (title.Length > 25)
                    {
                        title = title.Substring(0, 25) + "...";
                    }
                    Page.Title = entity.Title;
                    desc       = entity.Content;
                    imgUrl     = entity.Domain + entity.PicturePath + "?imageView2/0/interlace/1/format/jpg";
                    //设置带有下载头的url
                    link = Request.Url.Host + Request.RawUrl;
                    CheckSignature(link);
                    this.hidNewsPath.Value = WebMaster.ArticleDomain + eventItemGUID.ToString() + ".html";
                }
                else
                {
                    WebMaster.EndPage();
                }
            }
        }